mbod
September 17, 2021, 5:01am
1
Yesterday I did a new installation on my laptop. With luks encrypted btrfs and a swap partition for hibernation. The installer gave me these options.
But now, when I start the laptop it says:
Failed to open key file.
ERROR: resume: hibernation device '/dev/mapper/luks.....'
Nevertheless the laptop starts and I can log in. And the free command shows that swap is on.
Any idea what is going on here? I certainly need hibernation.
No resolution found yet …
Hello, I installed EndeavourOS on my DELL XPS 15 laptop, no dual boot, default BTRFS partition layout with swap & hibernate, and encrypted partition.
At boot, after entering the correct partition encryption password, and choosing one of the boot options in GRUB, I see:
Starting version 249.4-1-arch
Failed to open key file.
And then a completely black screen… I don’t know if it’s related, but this happened after I ran nvidia-installer-dkms, without errors. Also, secure boot is disabled.
This …
What are the contents of /etc/crypttab
?
Can you decrypt from live environment using the keyfile?
sudo cryptsetup open /dev/sdxY --key-file=[path]crypto_keyfile.bin crypt
Personally I think this is an existing issue with the new installer and btrfs on luks with swap.
mbod
September 17, 2021, 1:02pm
3
swap is working just fine. The system is swapping. I checked it with the stress
tool. That tells me that the key file is working. key file in crypttab is /crypto_keyfile.bin
. Same file as for /.
It is just not resuming from it.
QAP
September 17, 2021, 1:14pm
4
Curious. I dumped my Arch and moved to EndeavourOS to one machine and had same error on fresh install too. Same as @Moultipass fresh install.
“Failed to open key file” at boot, after GRUB
Although I can easily re-install and run my package scripts & configs to be back up and running in 15 mins…still would be curious on this
Spunkie
September 21, 2021, 7:05am
5
@mbod I found a github issue that has a suggested fix and at first glance looks like it resolved this issue on my manjaro system, needs more testing though.
opened 02:41PM - 17 Mar 21 UTC
closed 11:08PM - 20 Jul 22 UTC

Failed to open key file.
ERROR: resume: hibernation device ... not found
Calamares version : v3.2.38
Calamares config : v21.03.11
https://github.com/arcolinux/arco-calamares-config/releases/tag/21.03.11
ArcoLinux version : 21.03.11
https://github.com/arcolinux/arcolinux-iso/releases/tag/21.03.11
mkinitcpio-openswap version : 0.1.0-3
Package list : https://pastebin.com/uR6F5CSq
1 Probe link hardware and software overview : https://linux-hardware.org/?probe=79e3573fed
2 Probe link hardware and software overview : https://linux-hardware.org/?probe=d91551dac1
We do however boot up and we have a working system. Working on it now. See for more info in the probe link number 1.
Gparted

Lsblk

Lsblk -f

fstab

crypttab

default/grub

1 Like
should work what I give there tested by myself and this guy there too already …
But indeed needs more testing or better background information…
Best way to set up hibernation in BTRFS encrypted subvol system is to use swapfile…
mbod
September 21, 2021, 11:13am
7
I was considering a swap file on btrfs. But the documentation says it needs to be located on an uncompressed volume. Didnt want to look up how to do that. And resume_offset calculation is more complicate too. I didnt want to go that way. Too complicated. I am back to XFS + swapfile.