0

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?

| improve this question | | | | |
  • Once you have decrypted the root (/) partition it is mounted atop the temporary / from initramfs; so when cryptsetup looks for the keyfile for the other partitions /root is no longer where it was... and keyfile must now exist in the new /root. – AlexP Oct 10 '19 at 17:51
  • Crypsetup does find the correct keyfile as it decrypts the home partiton (/dev/sda4) and one of the partitions on sdb. As long as I only try to decrypt one partiton on drive sdb (either 1 or 2) there is no problem. Only if I want to decrypt both partitons of sdb i get an error – peter Oct 10 '19 at 20:05
0

After some digging through the bootlog I found an error mentioning that the cryptprocess was out of memory. After increasing the system memory of the virtual machine now everything works as expected.

Maybe this helps someone encountering a similar problem, since I did not read anything about minimum memory requirements for de decryption process

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.