I encrypted the root partition of my RPI 5 like this:
- Burn the image to the SD card and perform a regular boot.
- Install
cryptsetupandcryptsetup-initramfs. - Make the following modifications (see e.g. here):
/boot/config.txt: Setauto_initramfs=0and appendinitramfs initramfs_2712 followkernelbelow./boot/cmdline.txt: Setroot=/dev/mapper/sdcardand appendcryptdevice=/dev/mmcblk0p2:sdcard./etc/fstab: Change/device to/dev/mapper/sdcard./etc/crypttab: Appendsdcard /dev/mmcblk0p2 none luks.
- Shutdown. On a separate system, encrypt the root partition of the SD card (so that the underyling data remains unchanged) or follow this tutorial.
Now, on booting the disk, the initramfs seems to hang at some point. I quickly figured out that this is actually not the case. I can type my passphrase, hit enter and the boot process continues, but there was no "Please unlock..." printed.
How can I fix the missing "Please unlock..." prompt?
The operating system is Raspberry Pi OS Lite 64-bit, Kernel 6.6, Debian 12 (bookworm).