this post was submitted on 02 Sep 2024
55 points (98.2% liked)

Linux

47237 readers
3343 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

My laptop isn't under my supervision most of the time. And I'd hate it if someone were to steal my SSD, or whole laptop even, when I'm not around. Is there a way to encrypt everything, but still keep the device in sleep, and unclock it without much delay. It's a very slow laptop. So decryption on login isn't viable, takes too long. While booting up also takes forever, so it needs to be in a "safe" state when simply logged out. Maybe a way that's decrypt-on-demand?

I'm on Arch with KDE.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 2 weeks ago (1 children)

Is your idea to do the easier decrypt on boot, and optimize the boot times?

I could probably do that, but someone else said that there is a decrypt on hibernate, seems better.

[–] [email protected] 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Yeah im thinking do “normal” decrypt on boot. It’ll be easier to troubleshoot and recover from if something goes wrong and there’s fewer pitfalls to deal with.

I also suspect that theres a problem with your computer because boot times have been pretty fast for many years now.

E: I just now saw that you’re using an eighth generation intel processor, plenty of ram and an ssd.

I have the same situation but a much older processor and my boot times from button press to desktop are ~10 seconds.

Unless your expectations for boot times are way out of line, you ought to have no problem using decrypt on boot.

One possibility is that your ssd has aged and is having to read those old system file blocks hundreds of times to get it right. Badblocks -n or spinrite level 2 or 3 scan fixes this problem.

[–] [email protected] 1 points 2 weeks ago (1 children)

I bought it used, so I'm interested in your last point. I've reinstalled it - first thing I did. Do SSDs slow down overtime? And there is a linux command to fix that? Sound crazy, can you elaborate?

[–] [email protected] 1 points 2 weeks ago

Yeah badblocks -n /dev/your_target_device launched from a different boot device.

You can’t run it from your install because it’s gonna read every block into memory and then write some crap to it and read it back to make sure the block works then write what was originally there back to it.

It’s really important that you check yourself before you wreck yourself with the badblocks command because you can destroy data if you use the wrong flags.

Another program that fixes that problem is spinrite. It costs money but it’s very useful and has a lot of good documentation.

Each cell in the ssd isn’t a digital “1” or “0” but a charge coupled device that stores a voltage. Over time that potential changes in a way that’s directly proportional to the number of read cycles and age of the data from first write. When it changes enough, the controller has to try to read it many times to get a sane result it can send down the bus.

That results in your ssd seeming slow.

How long does it take to boot though, and what do you expect?