filesystem not expanding after pishrink

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
John Long
Posts: 22
Joined: Tue Jun 29, 2021 11:17 pm

filesystem not expanding after pishrink

Post by John Long »

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
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: filesystem not expanding after pishrink

Post by Joulinar »

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

Code: Select all

sudo bash -c "$(curl -sSfL https://raw.githubusercontent.com/MichaIng/DietPi/master/.meta/dietpi-imager)"
@MichaIng
any thoughts?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: filesystem not expanding after pishrink

Post by MichaIng »

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:

Code: Select all

systemctl enable dietpi-fs_partition_resize
Post Reply