[Nix-dev] Failure to boot after hibernate

Bas van Dijk v.dijk.bas at gmail.com
Mon Apr 24 00:48:06 CEST 2017


Dear list,

Two weeks ago I installed NixOS natively on my Mac Book Pro (I was
running NixOS in virtualbox before that). It ren well for two weeks
but today I hit a snag.

I was doing some work when my battery power became too low. Then I
believe my system hibernated (suspended to disk) before it shut down.
Note that I've set:

  powerManagement.enable = true;

Now when I boot my system it asks me for the encryption passphrase for
my LUKS drive. After I enter it I see a cursor blinking for a few
seconds before it freezes. After that my system is unresponsive.

As mentioned I have an encrypted LUKS drive. On top of that I have a
LVM root and swap volume. So what I believe has happened is that my
system saved its memory to the encrypted swap before it shut down. Now
when it boots up it tries to load that memory back in but fails for
some reason. I guess the trouble starts somewhere here:

  https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh#L407

Note that I have not set: boot.resumeDevice. Also note that I have set:

  swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];

Any idea how to fix this?

Bas


More information about the nix-dev mailing list