You are not logged in.

#1 2014-01-23 17:37:39

indianahorst
Member
Registered: 2008-08-23
Posts: 128

cryptsetup: Swap encryption with supend-to-disk doesn't work

Hello Community,

i'm trying to get swap encryption with suspend-to-disk support to a working state.
On my system only the /home partition is encrypted with cryptsetup-LUKS.

I'm using the howto on "Using a swap file" (with /home/swapfile as swap file) in the wiki: https://wiki.archlinux.org/index.php/Dm … sk_support

I followed exactly the given instructions:

From /etc/mkinitcpio.conf

HOOKS="base udev autodetect encrypt block resume filesystems keymap fsck"

From /etc/default/grub

GRUB_CMDLINE_LINUX="pcie_aspm=force pcie_aspm.policy=powersave pcie_port=native ipv6.disable=1 init=/usr/lib/systemd/systemd resume=/dev/mapper/crypthome resume_offset=16721572"

From /etc/fstab:

/home/swapfile	none	swap	defaults	0 0

The swapfile is working. Suspend-to-disk also works. But when resuming, I always get:

ERROR: failed to open encryption mapping 
The device UUID=... is not a LUKS volume and the crypto= parameter was not specified
running hook [resume]
Waiting 10 seconds for /dev/mapper/crypthome
ERROR: resume: hibernation device  /dev/mapper/crypthome not found

Then the system recovers the filesystem of / and later after the passphrase input of /dev/mapper/home it is forced to recover the filesystem of /home.

Shouldn't I get a passphrase input when running the [resume] hook?

Where is the problem I have missed?

Thanks in advance!

Last edited by indianahorst (2014-01-23 17:39:31)

Offline

#2 2014-01-23 17:51:32

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: cryptsetup: Swap encryption with supend-to-disk doesn't work

You haven't fully set up the Luks stuff it seems.  See 'mkinitpcio -H encrypt'.

Offline

#3 2014-01-23 18:22:11

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: cryptsetup: Swap encryption with supend-to-disk doesn't work

It seems that you've specified your home partition for the resume parameter, that is wrong. It should be the swap partition: https://wiki.archlinux.org/index.php/Su … parameters

Offline

#4 2014-01-23 20:26:50

indianahorst
Member
Registered: 2008-08-23
Posts: 128

Re: cryptsetup: Swap encryption with supend-to-disk doesn't work

ball wrote:

It seems that you've specified your home partition for the resume parameter, that is wrong. It should be the swap partition: https://wiki.archlinux.org/index.php/Su … parameters

No. Have you read my posting completely?

I don't use a swap partition.  I'm using a Swapfile on my encrypted home partition. See the link in the first posting and go to "Using a swap file".

Offline

#5 2014-01-23 20:38:25

indianahorst
Member
Registered: 2008-08-23
Posts: 128

Re: cryptsetup: Swap encryption with supend-to-disk doesn't work

WonderWoofy wrote:

You haven't fully set up the Luks stuff it seems.  See 'mkinitpcio -H encrypt'.

Thank you, but changing the kernel line in the grub config to

...resume=/dev/sda2:crypthome...

doesn't change anything beside the error I get at boot / resuming:

ERROR: resume: hibernation device  /dev/sda2:crypthome not found

Offline

Board footer

Powered by FluxBB