Hibernation using full disk encryption

From Tom's notes
Revision as of 00:34, 20 April 2018 by Tom (talk | contribs) (Created page with "A simple example with just an encrypted swap partition, this could also be part of LVM if you're careful to run everything LVM related in read-only. To Hibernate: <source lan...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A simple example with just an encrypted swap partition, this could also be part of LVM if you're careful to run everything LVM related in read-only.

To Hibernate:

cryptsetup luksOpen /dev/<swap> crypt
swapon -a
s2disk -P encrypt=N --resume_device=/dev/mapper/crypt

To resume: Make sure the initramfs has a /dev/snapshot. It can be created using

mknod /dev/snapshot c 10 231

If there's no snapshot device, resume will hang with message:

resume: libgcrypt version x.y.z

Open the encrypted swap and resume:

cryptsetup luksOpen /dev/<swap> crypt
resume --resume_device=/dev/mapper/crypt