Unlock LUKS encrypted Debian root with key file on boot partition
19
votes
6
answers
30695
views
I'm trying to decrypt the Debian root with a key file stored in the boot partition (decrypted partition). This will break the security, but it doesn't matter now. I have to conclude this successfully or die trying.
I have created the hooks to the
initramfs
and the key file is on the /boot
directory inside the initrd.img-*
file. The path to the key file (/boot/keyfile
) is on the /etc/crypttab
file.
I updated the initramfs
with sudo update-initramfs -u
but I received this message: cryptsetup: WARNING: target sdaX_crypt uses a key file, skipped.
Ignoring the message and rebooting results in a unbootable disk. The message Gave up waiting for root device.
is displayed and drops to initramfs
shell.
In the initramfs
environment the cryptsetup
don't exists. *(It should exists?)*
Seens that the update-initramfs -u
"thinks" the sdaX_crypt
device will be mounted in another way and don't configure to decrypt with the keyfile.
*How can I do that?*
Asked by Fusgyus
(191 rep)
Oct 27, 2014, 07:29 AM
Last activity: Jul 5, 2025, 12:11 PM
Last activity: Jul 5, 2025, 12:11 PM