Dietpi-update wants zstd install

Afternoon.

I noticed today during a Bookworm update that an install step output mentioned me not having zstd. I’ve installed it now; I assume this is worth having for future updates? Just curious. Thanks.

would be good to share the entire message. Otherwise quite some guessing.

1 Like

Sorry!

W: No zstd in /usr/bin:/sbin:/bin, using gzip

a couple of more lines would be helpful to see where the message pops up.

anyway its a waring not an issue or a request to install stuff. It’s an information about zstd missing but using gzip instead.

Preparing to unpack .../08-linux-image-6.12.47+rpt-rpi-v8_1%3a6.12.47-1+rpt1~bookworm_arm64.deb ...
Unpacking linux-image-6.12.47+rpt-rpi-v8 (1:6.12.47-1+rpt1~bookworm) ...
Selecting previously unselected package linux-image-rpi-v8.
Preparing to unpack .../09-linux-image-rpi-v8_1%3a6.12.47-1+rpt1~bookworm_arm64.deb ...
Unpacking linux-image-rpi-v8 (1:6.12.47-1+rpt1~bookworm) ...
Selecting previously unselected package raspi-utils-core.
Preparing to unpack .../10-raspi-utils-core_20251002-1~bookworm_arm64.deb ...
Unpacking raspi-utils-core (20251002-1~bookworm) ...
Setting up cpio (2.13+dfsg-7.1) ...
update-alternatives: using /bin/mt-gnu to provide /bin/mt (mt) in auto mode
Setting up linux-base (4.9) ...
Setting up libklibc:arm64 (2.0.12-1) ...
Setting up raspi-firmware (1:1.20250915-1~bookworm) ...
'/boot/vmlinuz-6.12.47+rpt-rpi-v8' -> '/boot/firmware/kernel8.img'
Setting up libgpiolib0:arm64 (20251002-1~bookworm) ...
Setting up klibc-utils (2.0.12-1) ...
No diversion 'diversion of /usr/share/initramfs-tools/hooks/klibc to /usr/share/initramfs-tools/hooks/klibc^i-t by klibc-utils', none removed.
Setting up raspi-utils-core (20251002-1~bookworm) ...
Setting up initramfs-tools-core (0.142+rpt4+deb12u3) ...
Setting up initramfs-tools (0.142+rpt4+deb12u3) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.12.47+rpt-rpi-v8 (1:6.12.47-1+rpt1~bookworm) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.12.47+rpt-rpi-v8
I: /initrd.img.old is now a symlink to boot/initrd.img-6.12.47+rpt-rpi-v8
I: /vmlinuz is now a symlink to boot/vmlinuz-6.12.47+rpt-rpi-v8
I: /initrd.img is now a symlink to boot/initrd.img-6.12.47+rpt-rpi-v8
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.12.47+rpt-rpi-v8
W: No zstd in /usr/bin:/sbin:/bin, using gzip
'/boot/initrd.img-6.12.47+rpt-rpi-v8' -> '/boot/firmware/initramfs8'
/etc/kernel/postinst.d/z50-raspi-firmware:
'/boot/vmlinuz-6.12.47+rpt-rpi-v8' -> '/boot/firmware/kernel8.img'

it’s not really related to DietPi as this one is a message from apt package manager to inform you about the unzipping tool used. Not a real issue.

1 Like

Yeah,I guess I just figured it’s worth having installed if the dietpi-update command is going to default to looking for that software. Sounds like it’s more performant than gzip, anyway. Thanks for the info, @Joulinar !

this has nothing to do with dietpi-update or any DietPi tool. It’s the default Debian package manager apt

1 Like

Some background: This is from initramfs-tools generating the initramfs image /boot/initrd.img-6.12.47+rpt-rpi-v8.

Generally, it supports multiple compression algorithms to make the initramfs image smaller. Until Debian Bullseye (the initramfs-tools version it provides), the default was gzip, which is always installed on every system as core component. Since Debian Bookworm, the default has been changed to zstd, which has better compression ratio at better decompression speeds, i.e. a reasonable change. However, zstd is not a system core component, but strictly required by anything, hence usually not pre-installed. And initramfs-tools hence falls back to gzip in that case, but shows a warning, indicating the new default.

Since zstd is indeed better, reducing file size/writes and boot performance (marginally), we pre-install it on any system where we expect an initramfs to be used, i.e. were dietpi-installer installs initramfs-tools for that purpose. However, for Raspberry Pi images, we do not do that, since the Raspberry Pi bootloader+kernel combination does not require an initramfs. The package is still pulled as dependency of the kernel package stack, but we configure it to remain unused.

But I recognized, that our kernel migration script does not disable the initramfs. I’ll add this for next release, just need to be careful to not do that if the initramfs was enabled with the old kernel stack before, since there are situation where it is required, like booting with Brtfs root filesystem type, booting encrypted rootfs and such things. However, if you did not intentionally enable the initramfs, you can disable it, making kernel upgades faster and less disk I/O intense, reducing disk usage as well:

G_SUDO G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware
sudo rm -f /boot/initrd.img-* /boot/firmware/initramfs*

Will be also done on next DietPi update: RPi: disable initramfs generation on firmware migration · MichaIng/DietPi@f64ee29 · GitHub