quick-docs/modules/ROOT/pages/_partials/proc_installing-fedora-on-a-raspberry-pi-for-linux-users.adoc

100 lines
3.6 KiB
Text
Raw Normal View History

// Module included in the following assemblies:
//
// <List assemblies here, each on a new line>
// Base the file name and the ID on the module title. For example:
// * file name: doing-procedure-a.adoc
// * ID: [id='doing-procedure-a']
// * Title: = Doing procedure A
// The ID is used as an anchor for linking to the module. Avoid changing it after the module has been published to ensure existing links are not broken.
[id='installing-fedora-on-a-raspberry-pi-for-linux-users_{context}']
// The `context` attribute enables module reuse. Every module's ID includes {context}, which ensures that the module has a unique ID even if it is reused multiple times in a guide.
= Installing Fedora on a Raspberry Pi for Linux users
// Start the title of a procedure module with a verb, such as Creating or Create. See also _Wording of headings_ in _The IBM Style Guide_.
This procedure shows Linux users how to add Fedora ARM to a microSD for use with a Raspberry Pi.
._Prerequisites_
* A supported Raspberry Pi
* A microSD Card (16 GB or larger).
* A computer running Linux.
* Root user access (via `su` or `sudo`).
* SD card reader.
2023-05-08 11:44:01 +00:00
* A Fedora ARM aarch64 Workstation or server image from: link:https://fedoraproject.org/[].
._Procedure_
2023-05-08 11:44:01 +00:00
. Download a Fedora ARM image from the link:https://fedoraproject.org/[Fedora website].
+
. Run the following command to extract the `.raw` image and write the image to your microSD card:
+
[NOTE]
The location of your microSD card will be /dev/sdX or /dev/mmcblkX depending on your computer hardware.
+
[subs="quotes"]
----
$ xzcat *Fedora-IMAGE-NAME.raw.xz* | sudo dd status=progress bs=4M of=*/dev/XXX*
----
+
. 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
----
+
For information on using gparted resize a partition, see: https://gparted.org/display-doc.php?name=help-manual#gparted-resize-partition[GNOME Partition Editor: GParted Manual - Resizing a Partition].
+
[NOTE]
The root partition is shrunk to the smallest size possible to ensure a small download.
You currently need to resize it manually.
Ideally we would like this to happen automatically (great community project idea!).
Your microSD card is ready to be used with your Raspberry Pi.
ifeval::["{context}" == "rpi"]
.Next Steps
For information on starting and configuring Fedora on Raspberry Pi, see: xref:booting-fedora-on-a-raspberry-pi-for-the-first-time_{context}[].
endif::[]
.Additional Resources
* For information on using `gparted`, see: link:https://gparted.org/display-doc.php?name=help-manual[GNOME Partition Editor: GParted Manual].
* For assistance or support, see:
** link:https://ask.fedoraproject.org/[Ask Fedora]
** link:https://lists.fedoraproject.org/admin/lists/arm%40lists.fedoraproject.org/[Fedora ARM mailing list]
** link:https://web.libera.chat/?channels=#fedora-arm[IRC via the #fedora-arm channel on Libera.Chat]