Skip to contentSkip to conversation

dm-crypt Digest, Vol 5, Issue 5

dm-crypt Luca Berra 1 participant 1 message Nov 6, 2009

lore
Share & tools
lore

Luca Berra

author
#0 lore raw
Quoted 9 lines · Hans Hallan

Dear all,
I have succeed in encrypting hard disk with cryptsetup. Now, I want to modify mkinitrd with automatically passphrase. I found this line in /sbin/mkinitrd:

echo Setting up disk encryption: /dev/sda4
plymouth ask-for-password --command "cryptsetup luksOpen /dev/sda4 luks-sda4"

Quoted 6 lines

the second line ask me to type the passphrase,
is there anybody know how to make it automatically ? like:

echo "passphrase" | cryptsetup luksOpen /dev/sda4 root ? I have tried this command and make new initrd but it did not work. It sound weird but, that is what I am asked to do.

it does not sound weird, it sounds incredibly stupid, besides that try looking at the --key-file option of cryptsetup

L.