(For Linux enthusiasts, enhance your Linux skills)
Source: Linux China
Running Fedora on Raspberry Pi.
The Raspberry Pi Foundation has produced many models over the years. The installation process described 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 the credit card-sized Raspberry Pis that have been released for several years.
Getting 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 Raspberry Pi before, you might have these.
-
Current network. Perhaps your home lab.
-
Network cable. To connect the current network to the Raspberry Pi
-
Raspberry Pi 3, model B or B+.
-
Power supply.
-
8 GB or larger micro-SD card.
-
Keyboard and monitor.
The keyboard and monitor together form a local console. Even without a console, it can be operated (though it’s complicated), for example, setting up an automated installation and then connecting via the network. During the first boot of Fedora, the local console can easily respond to configuration questions. Similarly, errors during AP configuration can disrupt network settings, preventing remote users from connecting.
Download Fedora Minimal
-
Find Fedora’s other optional architecture images.
-
Download the ARM® aarch64 architecture image.
The Fedora Minimal image is one of Fedora’s other optional downloads, containing all necessary core packages and network packages (well, almost; see below about dnsmasq). This image includes a ready-to-use file system with 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 may 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 and is about 700MB in size. Once decompressed, the file size is 5GB. This is an ext4 file system 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.
Copy to micro-SD Card
-
Copy the image to the micro-SD card.
This might be more complicated than it sounds and can 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-sized SD card slot, and you need a card adapter, or you need a USB adapter. Then, when copying, the operating system might help you or hinder you. You might be lucky to have Fedora Media Writer, or use these Linux commands:
unxz ./Fedora-Minimal-32-1.6.aarch64.raw.xzdd if=./Fedora-Minimal-32-1.6.aarch64.raw of=/dev/mmcblk0 bs=8M status=progress oflag=direct
Install Fedora
-
Connect the Raspberry Pi, power cable, network cable, and micro-SD card.
-
Turn on the power.
-
When the graphics chip powers up, see a colored box.
-
Wait for the anaconda installer to start.
-
Answer the setup questions from anaconda.
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 out the questions in anaconda’s text installer. In the example below, the username is nick
, and it is also an administrator (a member of the wheel
group).
Congratulations! Your Raspberry Pi has booted and is running.
Update Software
-
Use
dnf update
to update packages. -
Reboot with
systemctl reboot
.
Over the years, many people have worked hard to make the Raspberry Pi work properly. Use the latest software to ensure you benefit from their hard work. If you skip this step, you may find that some things do not work properly.
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 to Tinker With
If you want to tinker, you can set up some additional things at this point. These are all optional. Try these.
-
sudo hostnamectl set-hostname raspi
replaces thelocalhost
hostname. -
Use
ip addr
to find the IP address. -
Try SSH login, or even use
ssh-copy-id
to set up key-based login. -
Use
systemctl poweroff
to shut down.
– EOF –
1. Giving up MBP to work a day with 8GB Raspberry Pi 4, this is the feeling
2. Here it comes! Raspberry Pi 4 released 8GB new version
3. Build a server with Raspberry Pi to run a website permanently
Did you find this article helpful? Please share it with more people
Follow “Linux Enthusiasts” to enhance your Linux skills
Great article, I am reading it❤️