#372 Add instructions on how to resize the main partition on the microSD card
Merged a year ago by copperi. Opened 2 years ago by crimsonking.
fedora-docs/ crimsonking/quick-docs rpi-install-linux  into  main

@@ -38,7 +38,38 @@ 

  $ xzcat *Fedora-IMAGE-NAME.raw.xz* | sudo dd status=progress bs=4M of=*/dev/XXX*

  ----

  +

- . Resize the Root Partition on the microSD using gparted:

+ . To resize the main partition, run `parted` and select the device.

+ +

+ ----

+ (parted) select /dev/sdX

+ ----

+ +

+ . Inspect the amount of unallocated space at the end and resize the root partition.

+ +

+ ----

+ (parted) print free

+ (parted) resizepart <partition_number> <target_size>

+ ----

+ +

+ . Resize the LVM physical volume so it takes up all the available space. For this to work you must deactivate any logical volumes within.

+ +

+ ----

+ # pvresize /dev/sdaX

+ ----

+ +

+ . Then extend the logical volume that corresponds to the root directory (`/dev/fedora_fedora/root` in this example).

+ +

+ ----

+ # lvextend -l +100%FREE /dev/fedora_fedora/root

+ ----

+ +

+ . Finally, resize the XFS filesystem in the logical volume (`/dev/mapper/fedora_fedora-root` in this example).

+ +

+ ----

+ # xfs_growfs -d /dev/mapper/fedora_fedora-root

+ ----

+ +

+ . Alternatively, you can use gparted to resize the Root Partition on the microSD:

  +

  ----

  $ gparted /dev/XXX

Added more specific instructions on how to resize the main partition on the microSD card due to the increased complexity of the partition layout on recent versions of Fedora. I faced this difficulty myself and found out that others have too.

The arm-image-installer tool automates all of this, but it's not always available depending on the distribution.

I've tested these instructions on a system running Fedora Workstation 34. Parted was already installed by default.

Does anyone know how to make it so that we don't have to specify a target size? Something that makes it grow through all the available space automatically (like the lvextend -l +100%FREE command)

(parted) resizepart <partition_number> <target_size>

Metadata Update from @pbokoc:
- Pull-request tagged with: needs info

2 years ago

Not sure what happened here, @crimsonking : could you reply here again please?

Wow, that was strange. I think ProtonMail just sent my message encrypted.

Here's the message:

That's interesting, but unfortunately I can't test it anymore. Someone else will have to continue this

Besides, I was unaware of the fact that Fedora doesn't officially support the Raspberry Pi 4, which is what I was using...

Metadata Update from @ankursinha:
- Pull-request tagged with: help wanted, needs changes

2 years ago

rebased onto 1d70d81

a year ago

Pull-Request has been merged by copperi

a year ago