The other day I tried to setup a Full disk encryption on a test system (ArchLinux) within virtualbox. (I want to use this kind of a setup on my main machine so I wanted to test it out first)
I created two harddisks (sda, sdb2) sda has an efi, boot, root and home partition with the root and home partition encrypted. The root partition gets decrypted from grub with a keyfile sitting on a USB drive. The home partition is decrypted by a keyfile (/root/keyfile). So far everything works perfekt
Than I created two partitions on sdb each of them also encrypted, using the same key as for the home partition. When I try to decrypt them at boottime using crypttab with the same settings as for the home partition of course changing the UUID and name I get an error "Failed to start Cryptography Setup for ..." for the home- and both of the partitions on sdb. However if I remove one of the two sdb partitons from the crypttab file (does not matter which) everything works fine again.
Seems having more than one partition of one device does mess things up
my crypttab looks sth like that:
#home partition
crypthome UUID=xxxxxxxxx-xxx-xx /root/keyfile luks
#sdb partition1
cryptb1 UUID=yyyyyyyyy-yyy-yy /root/keyfile luks
#sdb partition2
cryptb2 UUID=zzzzzzzzz-zzz-zz /root/keyfile luks
As said commenting out one of the sdb entries lets the system start without any error
Anyone encountered the same problem or has any idea what to do?
/
) partition it is mounted atop the temporary/
from initramfs; so whencryptsetup
looks for the keyfile for the other partitions/root
is no longer where it was... andkeyfile
must now exist in the new/root
.