Running Distro "DietPi" on RPi4 - RootFS encryption issues solved

Hi there,

I am running a Distro called DietPi, which is actually an optimized RaspbianOS customized with a bunch of well maintained scripts. I am trying to encrypt RootFS following the tutorial of Zymbit.

I am running Debian Bookworm (DietPi-version is 8.25.1).

I noticed problems when running the script from https://s3.amazonaws.com/zk-sw-repo/mk_encr_sd_rfs.sh in phase 2 of the script, so actually within /usr/local/bin/cfg_SD_crfs.sh

Problem 1: zstd is not installed in the Distro by default. apt install -y zstd before running the script solves this problem.

Problem 2: update-initramfs after chrooting into /mnt/cryptfs calls for zstd-compression supported by the kernel. Adding a echo "CONFIG_RD_ZSTD=y" > /boot/config-6.1.21-v8+ right before #Make the initramfs solves this issue at the time of writing.

Maybe someone with more advanced knowledge could update the script for use-cases like mine.

Thanks!