Fedora 39 Minimal won’t fit onto a 4 GB storage device and Fedora 39 Workstation won’t fit onto a 16 GB storage device, even though they are expected to do so.
Fedora images got gradually larger in the last few years, we failed to notice and the images are larger than expected.
Bugzilla report: #2247611
Option A) Use a larger storage device
Finding a larger storage device is often the easy solution.
For Minimal, at least 8 GB storage device is needed.
For Workstation, at least 32 GB storage device is needed.
Option B) Shrink the official disk image
It is possible to shrink the official disk image to a smaller size. This can be only performed with the Workstation disk image, to make it fit a 16 GB storage device. For Minimal, the contents is too large and can’t fit 4 GB storage.
Warning: This might be dangerous and can corrupt the filesystem of the shrunk image, if the resize operations don’t go as planned. We can’t guarantee reliability of the following instructions.
- Decompress the downloaded file:
unxz -kv Fedora-Workstation-39-1.5.aarch64.raw.xz
- Attach the image to a loopback device. This will create a new device in
/dev, such as
/dev/loop0(we will assume this name). You’ll be able to treat the image as any other disk:
sudo losetup -P -f Fedora-Workstation-39-1.5.aarch64.raw
Using GNOME Disks or GParted, find the new device (its partitions will reference the
/dev/loop0device). Shrink the third partition (
/dev/loop0p3) to 10 GB. After the operation is complete, make sure the partition is unmounted.
Detach the image from loop device:
sudo losetup -d /dev/loop0
- Create a new 14 GB image disk (the number is intentionally lower, to make sure it fits to any “16 GB” storage) based on your adjusted Workstation image. The third partition will get automatically expanded to fill all extra space.
sudo dnf install guestfs-tools truncate -s 14G F39-smaller.raw virt-resize --expand /dev/sda3 Fedora-Workstation-39-1.5.aarch64.raw F39-smaller.raw
- Compress the image, because
arm-image-installerexpects xz-compressed image:
xz -k -v -0 -T0 F39-smaller.raw
- You can now use arm-image-installer with your new
F39-smaller.raw.xz. It should fit to your 16 GB storage device.
You can discuss this issue here.