After each hibernation process I get a corrupted root filesystem. My setup is a LUKS encrypted root and swap partition on LVM. I use a GPG encrypted key for the root filesystem and a unencrypted key file on the root partition for swap decryption. The initramfs is generated by genkernel with
genkernel --lvm --luks --gpg initramfs
For the hibernation setup I followed the Gentoo Wiki. I tried using
pm-hibernate
s2disk -r /dev/mapper/swap
echo disk > /sys/power/state
but all result in a corrupted root partition. I am not using tuxonice as (afaik) I would need to switch to other kernel sources or apply patches.
System:
Gentoo
Kernel 4.9.6-gentoo-r1
genkernel 3.4.52.4-r2
pm-utils 1.4.1-r7
Disk layout:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 477G 0 disk
├─sda2 8:2 0 128M 0 part /boot
├─sda3 8:3 0 410G 0 part
│ ├─vg1-swap 253:1 0 30G 0 lvm
│ │ └─swap 253:3 0 30G 0 crypt [SWAP]
│ └─vg1-root 253:0 0 380G 0 lvm
│ └─root 253:2 0 380G 0 crypt /
└─sda1 8:1 0 2M 0 part
LVM
. On the other handLLVM
is a compiler toolkit.