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

**URL:** https://community.zymbit.com/t/running-distro-dietpi-on-rpi4-rootfs-encryption-issues-solved/1619
**Category:** Encrypting File System
**Created:** [January 5, 2024, 8:37am UTC](https://community.zymbit.com/t/running-distro-dietpi-on-rpi4-rootfs-encryption-issues-solved/1619 "2024-01-05T08:37:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![LeFish](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@LeFish](https://community.zymbit.com/u/LeFish)
#### Post date: [January 5, 2024, 8:37am UTC](https://community.zymbit.com/t/running-distro-dietpi-on-rpi4-rootfs-encryption-issues-solved/1619/1 "2024-01-05T08:37:04Z")

</div>

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](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!
