Just found out how to do this: edit /etc/initramfs-tools/hooks/cryptroot to add the key file to the boot image:
# Prepare the initramfscopy_exec /sbin/cryptsetup /sbincopy_exec /sbin/dmsetup /sbincopy_exec <path to my key file>/my.key /sbin # Doneexit 0
then edit /etc/initramfs-tools/scripts/local-top/cryptroot to use the key file instead of reading from console:
else # $cryptcreate < /dev/console > /dev/console 2>&1 $cryptcreate --key-file=/sbin/my.key fi
finally run this to recreate the image:
update-initramfs -u
<code>
<blockcode>
<foo>
[foo]
More information about formatting options
Just found out how to do
Just found out how to do this:
edit /etc/initramfs-tools/hooks/cryptroot to add the key file to the boot image:
then edit /etc/initramfs-tools/scripts/local-top/cryptroot to use the key file instead of reading from console:
finally run this to recreate the image:
Done ! How could I improve it ? Reading a key file from inside the boot image isn't really smart :P