filesystem not expanding after pishrink

Hi Guys,

I know this is probably not the ideal place to ask this but it might be specific to a change between DietPi and Raspbian.

Pishrink creates the img fine, I tried both “regular” and gzipped formats. rpi-imager has no problem writing them.

When the 4B boots, the filesystem has not expanded. For example I have around 12G of installed-system and the card is 32G. If use dd to copy the full image from one SD card with an installed system to a new card, the new system boots fine and everything is like just back home. If I use rpi-imager (not sure if I tried dd) to install a pshrink’d img the file system on the new card shows as 13G on the 4B when it comes up. The rest of the card is not used.

This is apparently a “known issue” with distros that are not close enough to Raspbian in their file layout. But I’m using a vanilla DietPi install, just the two partitions.

Any ideas?

Thanks,

John

Usually DietPi is a set of scripts on top of a normal Raspberry OS. Just some configs and the reduced amount of packages are the differences.

If you like to generate a compressed DietPi image, you could use dietpi-imager script. This script can be executed via

sudo bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/master/.meta/dietpi-imager)"

MichaIng
any thoughts?

If I understand it right, it’s not a fresh image but one that was setup already, right?

The auto-expansion is done via systemd service at first boot which deactivates itself when done. So you need to re-enable it, before creating the image:

systemctl enable dietpi-fs_partition_resize