here the configuration I have : - 2 hard drives, - first one is encrypted using LUKS and LVM. I'd like to add in the volume group encrypted a second hard drive. I have successfully installed it and encrypted it. But when I boot, I have to enter 2 passphrases to decrypt both hard drives.

Isn't there a way to use only one ?

link|improve this question
feedback

3 Answers

I finally find a trick to enter only one password and have all my physical disks encrypted.

I encrypt the first one with a passphrase, I encrypt the second one using a keyfile that I store on the first hard drive (/root/mykeyfile).

And with the corrects line in /etc/crypttab file, it does the trick.

Update /etc/crypttab

sda5_crypt UUID=fb07f1e8-a569-4db9-9fd7-fc1994e093b5 none luks

sdb1_crypt UUID=4c0687f0-d7af-4f2e-9c57-5ca8e909d492 /root/mykeyfile luks

link|improve this answer
dd if=/dev/urandom of=/root/mykeyfile bs=1024 count=20 This is an example of how to create a random string to be used as a 'keyfile'. – earthmeLon May 22 at 1:57
feedback

No, there is no way to do that out-of-the box.

link|improve this answer
feedback

You can theoretically set a temporary environmental variable in a custom boot script which is then referenced by the initialization scripts for your decryption process. I actually did this a few years ago.

Your other option is to axe your existing init scripts for your hard drive and write a custom one which inputs your password once and then proceeds with the two decryption processes.

As an alternative you might be able to extend your LVM volume to the second drive. If I remember correctly the encryption should carry over.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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