-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi all,
Almost two years ago, I followed the procedure to the letter (except the infamous "-keysize" parameter) to successfully encrypt my root partition for my Debian 11 based Raspberry Pi OS installation.
Now that I’ve gained more experience with Linux stuff, I decided to be a little more adventurous during my upgrade to Debian 12 based RPi OS. Note that I’ve selected the standard, not lite, not full, official Raspberry Pi image.
So in the hope to help to streamline the procedure, there are my observations :
- Only cryptsetup package is needed to be installed, busybox and initramfs-tools are present by default.
- RPi OS seems to implement initramfs auto update already with proper parameters upon kernel updates. So it is not necessary to create the /etc/kernel/postinst.d/initramfs-rebuild script.
- /etc/initramfs-tools/hooks/luks_hooks on the other hand, has to be created. BTW I installed the optional cryptsetup-initramfs package, that seems to include cryptsetup and also probably fdisk binaries to the initramfs. However, resize2fs is naturally not included.
- /etc/initramfs-tools/modules is completely empty by default and need to be populated as described.
- Now the creation of initramfs can be done with the simple command
sudo update-initramfs -u. It will include all the needed binaries and modules, and create the images with the appropriate filenames and all other components conforming with the distribution’s configuration. Notably, each installed kernel version will keep a dedicated image, and for the comfort of non-qwerty keyboard users like me, the proper keymap will be set for use during initramfs operations and passphrase input during boot. - The file /boot/firmware/config.txt can be left untouched as it already includes the line
auto_initramfs=1 - The rest of the procedure is OK except the final initramfs rebuild that has to be dealt again with the command
sudo update-initramfs -u.
Voilà :)
JmmyGun and kub3let
Metadata
Metadata
Assignees
Labels
No labels