How to install Fedora 25 on your Raspberry Pi

Read on about the first officially supported version of Fedora for the Pi.
493 readers like this.
How to install Fedora 25 on your Raspberry Pi

Opensource.com

In October 2016, the release of Fedora 25 Beta was announced, along with initial support for the Raspberry Pi 2 and 3. The final "general availability" version of Fedora 25 was released a month later, and since then I have been playing around with the many different Fedora spins available for the latest versions of the Raspberry Pi.

This article is not as much a review of Fedora 25 on the Raspberry Pi 3 as a collection of tips, screenshots, and my own personal thoughts on the very first officially supported version of Fedora for the Pi.

Before I start, it is worth mentioning that all of the work I have done to write this article was done on my personal laptop, which is running Fedora 25. I used a microSD to SD adapter to copy and edit all of the Fedora images into a 32GB microSD card, which I used to boot up my Raspberry Pi 3 on a Samsung TV. The Raspberry Pi 3 used an Ethernet cable connection for network connectivity because the built-in Wi-Fi is not yet supported by Fedora 25. Finally, I used a Logitech K410 wireless keyboard and touchpad for input.

If you don't have the opportunity to use an Ethernet wire connection to play around with Fedora 25 on your Raspberry Pi, I was able to get an Edimax Wi-Fi USB adapter to work on Fedora 25 as well, but for the purposes of this article, I only used the Ethernet connection.

Before you install Fedora 25 on your Raspberry Pi

Read over the Raspberry Pi support documentation on the Fedora Project wiki. You can download the Fedora 25 images you need for installation from the wiki, and everything that is supported and not supported is listed there. 

Also, be mindful that this is an initially supported version and a lot of new work and support will be coming out with the release of Fedora 26, so feel free to report bugs and share feedback of your own experience with Fedora 25 on the Raspberry Pi via Bugzilla, Fedora's ARM mailing list, or on the Freenode IRC channel #fedora-arm.

Installation

I downloaded and installed five different Fedora 25 spins: GNOME (Workstation default), KDE, Minimal, LXDE, and Xfce. For the most part, they all had pretty consistent and easy-to-follow steps to ensure my Raspberry Pi 3 would boot up properly. Some have known bugs that people are working on, and some followed standard operating procedure via the Fedora wiki.

GNOME on Raspberry Pi

Fedora 25 workstation, GNOME on Raspberry Pi 3.

Steps for installation

1. On your laptop, download one of the Fedora 25 images for the Raspberry Pi from the links on the support documentation page.

2. On your laptop, copy the image onto your microSD using either fedora-arm-installer or the command line:

xzcat Fedora-Workstation-armhfp-25-1.3-sda.raw.xz | dd bs=4M status=progress of=/dev/mmcblk0

Note: /dev/mmclk0 was the device that my microSD to SD adapter mounted on my laptop, and even though I am using Fedora on my laptop and I could have used the fedora-arm-installer, I preferred the command line.

3. Once you've copied the image, don't boot up your system yet. I know it is tempting to just go for it, but you still need to make a couple of tweaks.

4. To keep the image file as small as possible for download convenience, the root file system on the image was kept to a minimum, so you must grow your root filesystem. If you don't, your Pi will still boot up, but if you run dnf update to upgrade your system, it will fill up the file system and bad things will happen, so with the microSD still on your laptop grow the partition:

growpart /dev/mmcblk0 4
resize2fs /dev/mmcblk0p4

Note: In Fedora, the growpart command is provided by cloud-utils-growpart.noarch RPM.

5. Once the file system is updated, you will need to blacklist the vc4 module. Read more about this bug.

I recommend doing this before you boot up the Raspberry Pi because different spins will behave in different ways. For example, (at least for me) GNOME came up first after I booted, without blacklisting vc4, but after doing a system update, it no longer came up. The KDE spin wouldn't come up at all during the first initial boot. We might as well blacklist vc4 even before our first boot until the bug is resolved.

Blacklisting should happen in two different places. First, on your microSD root partition, create a vc4.conf under etc/modprode.d/ with content: blacklist vc4. Second, on your microSD boot partition add rd.driver.blacklist=vc4 to the end of the append line in the extlinux/extlinux.conf file.

6. Now, you are ready to boot up your Raspberry Pi.

Booting Up

Be patient, especially for the GNOME and KDE distributions to come up. In the age of SSDs (Solid-State Drives), and almost instant bootups, it's easy to become impatient with write speeds for the Pi, especially the first time you boot. Before the Window Manager comes up for the first time, an initial configuration screen will pop up, which will allow you to configure root password, a regular user, time zones, and networking. Once you get that configured, you should be able to SSH into your Raspberry Pi, which can be very handy for debugging display issues.

System updates

Once you have Fedora 25 up and running on your Raspberry Pi, you will eventually (or immediately) want to apply system updates.

First, when doing kernel upgrades, become familiar with your /boot/extlinux/extlinux.conf file. If you upgrade your kernel, the next time you boot, unless you manually pick the right kernel, you will most likely boot into Rescue mode. The best way to avoid that is to take the five lines that define the Rescue image on your extlinux.conf and move them to the bottom of the file, so the latest kernel will automatically boot up next time. You can edit the /boot/extlinux/extlinux.conf directly on the Pi or by mounting on your laptop:

label Fedora 25 Rescue fdcb76d0032447209f782a184f35eebc (4.9.9-200.fc25.armv7hl)
            kernel /vmlinuz-0-rescue-fdcb76d0032447209f782a184f35eebc
            append ro root=UUID=c19816a7-cbb8-4cbb-8608-7fec6d4994d0 rd.driver.blacklist=vc4
            fdtdir /dtb-4.9.9-200.fc25.armv7hl/
            initrd /initramfs-0-rescue-fdcb76d0032447209f782a184f35eebc.img

Second, if for whatever reason your display goes dark again after an upgrade and you are sure that vc4 is blacklisted, run lsmod | grep vc4. You can always boot into multiuser mode, instead of graphical mode, and run startx from the command line. Read the content of /etc/inittab for directions on how to switch targets. 

KDE on Raspberry Pi 3

A Fedora 25 workstation, KDE on Raspberry Pi 3.

The Fedora spins

Out of all of the Fedora spins I have tried, the only one that gave me a problem was the XFCE spin, and I believe it was due to this known bug.

GNOME, KDE, LXDE, and minimal spins worked pretty well when I followed the steps I've shared here. Given that KDE and GNOME are a bit more resource heavy, I would recommend LXDE and Minimal for anyone who wants to just start playing with Fedora 25 on the Raspberry Pi. If you are a sysadmin who wants a cheap server backed by SELinux to cover your security concerns and all you want is to run your Raspberry Pi as some sort of server and you are happy with an IP address and port 22 open and vi, go with the Minimal spin. For developers or people starting to learn Linux, the LXDE may be the better way to go because it will give quick and easy access to all the GUI-based tools like browsers, IDEs, and clients you may need.

LXDE on Raspberry Pi 3

Fedora 25 workstation, LXDE on Raspberry Pi 3.

It is fantastic to see more and more Linux distributions become available on ARM-based Raspberry Pi computers. For its very first supported version, the Fedora team has provided a polished experience for the everyday Linux user. I will certainly be looking forward to the improvements and bug fixes for Fedora 26.

User profile image.
Anderson was introduced to Linux by his uncle back in 1996. In the early 2000s, he transitioned from being a developer to a system administrator. Today, Anderson leads the Red Hat Information Security Incident Response team. He is also an active Fedora package maintainer.

4 Comments

There are three guys who work on a remix of Fedora ARM specifically for the Raspberry Pi 2 and 3... named FedBerry (http://fedberry.org/). The don't build all of the various desktop spins but they do offer a minimal, XFCE, and LXDE images if I remember correctly. I've been using it since their Fedora 24-based build and it works great out of the box including easy kernel upgrades with Wifi and Bluetooth supported. I think analog speakers might work (HDMI audio doesn't seem to) but I haven't plugged in any speakers to find out.

Once support for all of the Raspberry Pi 3 hardware makes it upstream, maybe FedBerry will quit but for now anyway, if you want more hardware support, it is handy.

Hello Mr. Dowdle, Reason for not registering is I joined too many forums. Anyway, I installed the Fedora 23 Workstation. Was able to connect internet through ethernet connected to my laptop Windows 7's ICS(internet connecting sharing). The workstation is a bit slow on the Raspberry pi 3. What exactly is the Fedora Minimal? Fedora Project do not have Xfc or LXDE distro. I google Fedora Minimal, but I can not find my answer. Hope you are able to respond. I will be grateful if you do.
Thank you.

In reply to by Scott Dowdle

I ran Pidora on my RPis a few years ago and loved it. I've been quite happy, lately, with the CentOS Pi build. The default install is *very* minimal, and even after adding EPEL, it doesn't have all the packages that Fedora has, but for certain use cases (including the one where you rebuild SRPMs to suit), it's perfect.

https://wiki.centos.org/Download

At last! Freedom from Debian and apt-get. I used Pidora when I got my first RPi but that wasn't supported for long.

In reply to by sethkenlon

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.