Suspend to disk a.k.a. Hybernation doesn’t quite work when running openSUSE in an encrypted root file system and swap on LUKS on LVM, as with Ludwig Nussel’s instructions. The system is not able to resume from the swap area, because the initial ramdisk opens the lvm system before the luks. This results in only root logical volume being opened at that time, but not the swap volume. A regular boot follows.
Here’s the mkinitd boot scripts (or their symlinks, rather) in question:
$ ls -1 /lib/mkinitrd/boot
...
61-lvm2.sh
71-luks.sh
...
Until all this is properly supported, here is a quirk to make it work: Make the lvm2 initrd boot script depend on the luks one*.
Edit /lib/mkinitrd/scripts/boot-lvm2.sh
(this is what 61-lvm2.sh points to) and change the third line from
#%depends: evms
to
#%depends: evms luks
Recreate the initrd.
$ cp -iv /boot/mkinitrd /boot/mkinitrd.backup
$ mkinitrd
You will notice that the symlinks were renamed now:
71-luks.sh
72-lvm2.sh
No try suspending to disk, you should be prompted for your luks password and resume from disk should work.
$ s2disk
*This of course assumes that you only have lvm devices inside luks, not the other way around. It’s not too hard to have both – simply duplicate and adjust the luks script and run one instance before and one after lvm.