[Nix-dev] Failure to boot after hibernate

Bas van Dijk v.dijk.bas at gmail.com
Mon Apr 24 12:33:03 CEST 2017


On 24 April 2017 at 12:20, Danylo Hlynskyi <abcz2.uprola at gmail.com> wrote:
> Probably too late, but can you boot with hibernate=no kernel parameter?

Hi Danylo, thanks. Unfortunately I can't edit the kernel parameters.
My system is using the default EFI loader and isn't using grub which
does allow editing the kernel command line.

> In general I found this[1] article great on debugging suspend/hibernate
> issues on Nixos (which I had twice).
>
> [1] https://wiki.ubuntu.com/DebuggingKernelSuspend

Thanks, I will study it.

My plan is to boot from a NixOS USB stick, mount the file systems and
then delete/modify some file that stores the state that determines
whether the system is hibernated or not. Any idea which file is
storing that information?

Bas

> 2017-04-24 2:20 GMT+03:00 Bas van Dijk <v.dijk.bas at gmail.com>:
>>
>> I made a few pictures and a video of the boot process:
>> https://goo.gl/photos/vrAkb5TFmZZ1J9kn9. In the video you can see that
>> after I've input my passphrase the following lines are printed before
>> the blinking cursor appears:
>>
>>   killall: cryptsetup: no process killed
>>   starting device mapper and LVM...
>>     2 logical volume(s) in volume group "MyStorage" now active
>>   _
>>
>> Bas
>>
>>
>> On 24 April 2017 at 00:48, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
>> > 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
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>
>


More information about the nix-dev mailing list