Running Fedora on Raspberry Pi.
The Raspberry Pi Foundation has produced many models over the years. The installation process in this article has been tested on the third generation Raspberry Pi: 3B v1.2 and B+ (the older Raspberry Pi 2 and the new Raspberry Pi 4 have not yet been tested). These are credit card-sized Raspberry Pis that have been released for several years.
Gathering Hardware
You will need some hardware components, including a Raspberry Pi. You do not need any HaT (Hardware Attached on Top) boards or USB antennas. If you have used a Raspberry Pi before, you may have these.
The keyboard and monitor together form the local console. Even without a console, it can be operated (although it is complex), for example, by setting up an automatic installation and then connecting via the network. The local console can easily respond to configuration questions when Fedora first boots. Similarly, errors during AP configuration could corrupt the network configuration, preventing remote users from connecting.
Downloading Fedora Minimal
The Fedora Minimal image is one of the other optional downloads of Fedora, containing all the necessary core packages and network packages (well, almost, note the dnsmasq below). This image contains a ready-to-use filesystem that has over 400 installed packages. This minimal image does not include popular packages like development environments, internet services, or desktops. These types of software are not necessary here, and installing them could consume too much memory.
The Fedora Minimal raw image can be installed on a small SD card and run in less than 1GB of memory (these older Raspberry Pis have 1GB of memory).
The name of the downloaded file is similar to Fedora-Minimal-32-1.6.aarch64.raw.xz
. The file is compressed, about 700MB in size. Once uncompressed, the file is 5GB. This is an ext4 filesystem that is mostly empty: about 1GB used, 4GB free. This empty space is why the compressed file is much smaller than the uncompressed raw file.
Copying to micro-SD Card
This may be more complicated than it sounds and could lead to a painful experience. Finding a good micro-SD card takes effort. Then there’s the challenge of inserting the card into the computer. Perhaps your laptop has a full-size SD card slot, and you will need a card adapter, or you need a USB adapter. Then, during the copying process, the operating system may help you or may hinder you. You might be lucky to have Fedora Media Writer, or use these Linux commands:
unxz ./Fedora-Minimal-32-1.6.aarch64.raw.xz
dd if=./Fedora-Minimal-32-1.6.aarch64.raw of=/dev/mmcblk0 bs=8M status=progress oflag=direct
Installing Fedora
The initial configuration of the operating system takes a few minutes. Waiting for the boot takes a few minutes, and it also takes some time to fill in the questions in Anaconda’s text installer. In the example below, the username is nick
, and is also an administrator (a member of the wheel
group).
Congratulations! Your Raspberry Pi has booted and is operational.
Updating Software
Over the years, many have worked hard to make the Raspberry Pi work properly. Use the latest software to ensure that you benefit from their hard work. If you skip this step, you might find that some things do not work correctly.
This update downloads and installs about a hundred packages. Since the storage device is a micro-SD card, the process of writing new software is slow. This is what it feels like to use storage in the 90s.
Things You Can Tinker With
If you want to tinker, you can set up some other things at this time. These are all optional. Try these.
localhost
hostname.via: https://fedoramagazine.org/install-fedora-on-a-raspberry-pi/
Author: Nick Hardiman Edited by: lujun9972 Translator: geekpi Proofread by: wxy
This article is originally compiled by LCTT, proudly presented by Linux China