Comment 13 for bug 1506139

Revision history for this message
Hadmut Danisch (hadmut) wrote :

Further observations:

I meanwhile figured out three modes:

1) putting the swap flag into /etc/crypttab -> crashes the partition every now and then, but not always.

2) removing the flag from /etc/crypttab, but keeping it in /etc/fstab and keeping it in
/etc/initramfs-tools/conf.d/resume: Everything works well , but a) initramfs asks for the password twice (once per partition), which is sort of annoying, maybe the password sharing scripts coming with cryptsetup might work (didn't try yet with 15.10).

3) as 2, but removing /etc/initramfs-tools/conf.d/resume: Interesting effect. The bootprocess asks for password only once for the root partition(!), but systemd nevertheless mounts the swap partition as a second luks device without needing the password. Source code says something about a password cache, so the password from the root device seems to be cache for some time and accessible. Nice, but resume from hibernation does not work.

Unfortunately the ubuntu installer produces mode 1, which does not really work.

This mess should really be fixed for 16.04 LTS. In my eyes it's a major problem of systemd, but the initramfs code could also be extended to use the password cache (which is there and caches anyway) to avoid asking twice.

regards