I just booted Fedora on my new raspberry pi and the instructions to expand the file system are not working

I just booted my fedora install on my raspberry pi. I tried to expand the file system but the instructions provided on

aren’t working.

instead of

$ growpart /dev/mmcblk0p4

I had to use

$ growpart /dev/mmcblk0 4

then when I try the next command,

xfs_growfs -d /

it says:

xfs_growfs: ? is not a mounted XFS filesystem

I am a newbie to linux admin so any help would be appreciated.

I use the following command, adjust as you need, to write Fedora to an SDcard and resize the file system.


sudo arm-image-installer --image=$PWD/Fedora-Minimal-38-1.6.aarch64.raw.xz --target=rpi4 --media=/dev/sda --showboot --addkey=$HOME/.ssh/id_rsa.pub --resizefs

I think this should added to the fedora docs.

If using the xfs file system it seems you installed fedora server. Is that correct?

Workstation uses btrfs and does expand the file system properly when written to the sd card with the arm-image-installer.

Working with an xfs file system is different than most other linux file systems.

A quick online search gave me this tutorial, and if you skip past the parts about installing the tools (they are already installed on fedora server) then you can see the needed 2 commands in step 4.
sudo growpart <device> <partition>
and
sudo xfs-growfs /
Note: That can only be done when the file system is mounted and for the root file system is usually done when the system is properly booted and running.
Also note that both commands must be done either when logged in as root or by using sudo.

I installed workstation. The instructions I was reading didn’t specify different instructions for Server vs Workstation so I didn’t know.

So I should be good. I knew to use df to check disk space but am confused on the blocksize (I’m an old Vax VMS user where 512bytes per block??)

I guess if I multiplied by 512 and divided by 1024 I would have figured it out :slight_smile:

Thank you

If you used the fedora arm-image-installer the command with no options (or with the --help option) gives a full list of what can be done, and the --resizefs option will automatically resize the root file system to fill the sdcard size.

To create the image I started at:

then since I’m a mac user i followed the mac instructions which told me to “Follow the instructions provided by the Raspberry Pi foundation …” where I used the raspberry pi imager to write the image to the SD Card. If there’s a better way on a mac I would appreciate trying that… I have written images for flightaware using
“sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskN; sync” but didn’t think that would be appropriate for this application.

In your case, since you followed the instructions for use with the mac that is great.

Since the raspberry pi imager does not automatically resize the partition or file system that must be done manually after booting, which it appears you did.

It is worth reading the man page for df as it will tell you the units it is using.
I use the human output option most of the time to have easy to read output.

df -h

You can force df to use a block size of your choice using the --block-size option.

Thank you very much for helping me to understand the details of the install of the Workstation image and df details I didn’t know about. I think I’m good (until I submit a new issue regarding it shutting down on me!)