News for hackers. Stuff that matters.
Re:3x faster linux boot with e4rat by kijin on Sunday May 06, 2012 @06:22PM (#3936555)
I try to avoid using sleep/resume when I'm away from home, because it partially defeats the purpose having full-disk encryption on my laptop. A thief who steals it when it's powered off has no access to my files. On the other hand, a thief who steals it when it's asleep might be able to get around the login once it wakes up.

So yes, it sucks to wait 30-40 seconds for a reboot.

Re:3x faster linux boot with e4rat by 1amzave on Sunday May 06, 2012 @06:58PM (#3936690)
Wouldn't the ideal solution then be to modify the OS to purge the disk encryption keys from memory on sleep? If you're concerned about unencrypted file contents in memory, purge the page/buffer cache while you're at it.

Then ask the user to re-enter the key on resume and get back to business...am I missing some obvious problem here?

I guess depending on one's level of paranoia, there might be sensitive non-file data sitting in memory...you could then quit the applications you're concerned about, and have the kernel wipe any unallocated memory before sleeping (I think by default it doesn't wipe pages until they're reallocated to something else, on Linux at least).

Obviously with flushing caches and quitting applications and so forth you're trading off some of the benefit of keeping the system alive, but presumably it still beats a cold boot every time you come back to your laptop.

Re:3x faster linux boot with e4rat by NickNameNick on Sunday May 06, 2012 @07:58PM (#3936897)
I've been reading guides on getting lion to do just that, snow-leopard supposedly supported it, with filevault.

Unfortunately, lion/filevault 2 no longer supports it, and if you try to force the options, the computer simply crashes on resume.

Re:3x faster linux boot with e4rat by ryannielsen on Monday May 07, 2012 @12:28AM (#3937588)
FileVault 2 does support purging keys on sleep:

  sudo pmset -a destroyfvkeyonstandby 1 hibernatemode 25
From the pmset man page:

  destroyfvkeyonstandby - Destroy File Vault Key when going to
  standby mode. By default File vault keys are retained even when
  system goes to standby. If the keys are destroyed, user will be
  prompted to enter the password while coming out of standby
  mode.(value: 1 - Destroy, 0 - Retain)
and

  hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The
  system will store a copy of memory to persistent storage (the disk), and
  will remove power to memory. The system will restore from disk image. If
  you want "hibernation" - slower sleeps, slower wakes, and better battery
  life, you should use this setting.
So, under Lion, turn on FileVault, run that command and always sleep your Mac (close the clamshell, Apple Menu > Sleep, or Option-Command-Eject) when you want to be secure.

If your computer crashes under resume after having done so, something's amiss. Remember that you'll need to auth twice on wake-from-sleep if you are logged in – once to unlock the volume, and again to unlock your user's session.

Re:3x faster linux boot with e4rat by there on Sunday May 06, 2012 @07:49PM (#3936871)
Which operating system? On OS X Lion, you can make the system hibernate when the lid is closed, writing encrypted memory to disk. Slower wakeup times than suspend, but quicker than a full startup.

https://news.ycombinator.com/item?id=3785762

Re:3x faster linux boot with e4rat by maaku on Sunday May 06, 2012 @10:57PM (#3937376)
If hibernate is quicker than a clean boot on OS X 10.7, you either A) need an SSD, or B) need more RAM.

Hibernate takes a full 48 seconds on my laptop. A clean boot takes 8-9 seconds.

Re:3x faster linux boot with e4rat by acdha on Tuesday May 08, 2012 @09:24AM (#3943458)
How long does re-opening all of your apps and files take? People who dislike rebooting usually tend to have plenty of things open.
Re:3x faster linux boot with e4rat by teach on Sunday May 06, 2012 @08:43PM (#3937021)
I wish my Ubuntu desktop booted in 40 seconds. Thanks to btrfs, a reboot is a 30-minute affair.
Re:3x faster linux boot with e4rat by krakensden on Sunday May 06, 2012 @09:44PM (#3937186)
Is it doing a full fsck every time? Or is this just... the beta tax?
Re:3x faster linux boot with e4rat by pja on Monday May 07, 2012 @07:20AM (#3938518)
Since my SSD-equipped, btrfs using laptop (Thinkpad X60s running Debian testing, kernel 3.2.15) boots from power on to graphical login in 27 seconds (13.5s of which is the time taken to get through the BIOS boot sequence) I suspect it's something specific to the parent poster's system.
Re:3x faster linux boot with e4rat by obtu on Monday May 07, 2012 @11:19AM (#3939334)
I have btrfs (with lzo compression) on a rotating disk, and the boot feels a little slower (one or two minutes total?) for reasons I haven't really examined. I'll have to check if something messed with ureadahead.
Re:3x faster linux boot with e4rat by teach on Wednesday May 09, 2012 @10:22PM (#3951555)
It's a 2TB drive doing a full fsck each time, though I don't know why.
Re:3x faster linux boot with e4rat by idleloops on Sunday May 06, 2012 @06:41PM (#3936614)
While I like a fast boot, you've go to get these things a little into perspective, a minute to the desktop isn't that bad.
Re:3x faster linux boot with e4rat by Osiris on Sunday May 06, 2012 @06:45PM (#3936631)
But 20 seconds is even easier. When I switched to an SSD in my laptop I saw boot times from drop almost one minute to just about 15 seconds. I no longer dread having to reboot after system updates.
Re:3x faster linux boot with e4rat by nl on Sunday May 06, 2012 @07:30PM (#3936805)
A minute to the desktop is exactly why the tablets are so useful.

If I'm sitting on the couch the instant on nature of my tablet is the main reason I'll reach for that to look at something rather than my laptop.

Re:3x faster linux boot with e4rat by DanBC on Sunday May 06, 2012 @06:45PM (#3936633)
It's not bad, but spread over X million workers on desktops 5 days a week means a lot of wasted time, and maybe energy.
Re:3x faster linux boot with e4rat by hmottestad on Sunday May 06, 2012 @06:54PM (#3936673)
If 5 million people save 1 minute every day for 200 days a year. Then you have saved 1 minute every day per person, not 5 000 000 * 1 * 200 minutes in total per year.

That kind of math just doesn't work.

Re:3x faster linux boot with e4rat by idleloops on Monday May 07, 2012 @06:51AM (#3938462)
Yeah but you don't have to just sit there and twiddle your thumbs while your machine boots. You can just do something else. I'm sure we waste far more time during the day doing other things. We don't necessarily obsess over those types of time inefficiencies. If you wanted to save time you could brush your teeth in the shower etc.