How to resize the root filesystem in Fedora IoT if you forgot it?

Here you should definitively pass --resizefs to arm-image-installer
(Also maybe let’s better add it to that example there. I tried, but Pagure and things just showed me erros during validating.)

Because if you forget it, AFAIK resizing the root filesystem could be tricky, is not it?

Is there an easy way you can do after you’ve already booted the device?

1 Like

BTW my best guess would to just put the SD card into another computer and then use GParted or GNOME Disks or so to manually increase the size of the root partition. That should work. :wink:

In my case I just reinstalled/reflashed it though. :slightly_smiling_face:

Old topic but this is how I managed to live resize partitions. A re-install or offline resize is probably the better option if available tho.

Process

  1. Grow sda3 partition to use all remaining space
  2. Remount sysroot as read-write without modifying fstab
  3. Resize ext4 filesystem to use full partition space
  4. Reboot or remount sysroot as read-only

Commands

parted /dev/sda "resizepart 3 100%"
mount --options-mode ignore -o remount,rw /sysroot 
resize2fs /dev/sda3
systemctl reboot
# OR
# mount --options-mode ignore -o remount,ro /sysroot