Posted on 6 Comments

How to Install Rocky Linux 8 on Arm, Using a Raspberry Pi 4

As you have probably read, Red Hat is changing the way that CentOS builds are delivered, moving the project to a Stream release, which brings in updates and patches faster, but may have less stability and potential for bugs to be introduced.  For some users, the more timely updates are a good thing, but for others, enterprise stability and long release cycles are better.  For those users who desire less frequent builds and have stricter testing and integration cycles, several projects sprang up to fill the hole left by CentOS.  One such new distro is Rocky Linux, which just had it’s first official release, known as Rocky Linux 8.4.

Let’s take a look at how to install Rocky Linux on Arm, as they produce a native aarch64 build typically geared towards Arm Servers, though in this case we will use a Raspberry Pi 4 just to demonstrate it works.

First and foremost, let’s cover what we’ll need for this project:

  • Raspberry Pi 4B
  • SD Card
  • USB stick for install media
  • USB Stick or USB-to-SSD adapter for destination (permanent storage) media

To begin our process, we need to download the community built UEFI firmware for the Raspberry Pi, which we will use to boot up the Pi, as opposed to the normal u-boot and device tree methodology used by Raspberry Pi OS.  The UEFI firmware will go onto an SD Card just like normal, and when the Pi is powered up it will read the firmware from the SD Card and can then proceed to boot from USB or over the network.  To install the UEFI firmware, simply go to https://github.com/pftf/RPi4/releases and download the latest release .zip file (RPi4_UEFI_Firmware_v1.28.zip at the time of this writing). 

Next, grab an SD Card and make sure it has a FAT32 partition.  Extract the contents of the .zip file you downloaded, and copy those contents to the FAT32 partition on the SD Card.  Once the files are in place, it should look like this:

At this point the SD Card is ready, and the Pi should be able to boot from it, but let’s set is aside for a moment as there are a few more steps to tackle.

Next, it’s time to grab a copy of Rocky Linux.  Head to https://rockylinux.org and click on the Download button.  You’ll see both the x86 and the Arm64 (aarch64) versions, we of course want the Arm distribution.  Choose the version you want from Minimal, DVD, or Boot, but make note, they are large files.  Even the “Minimal” installation .iso is 1.6gb, which is what we’ll use in this tutorial.  So, go ahead and download the “Minimal” aarch64 .iso, and wait for the download to complete.

Once downloaded, we’ll need to flash that .iso installation file to a USB stick.  You can use Etcher, WinDisk32, Rufus, or just `dd` it to your USB stick, whatever you prefer.

At this point, we’re almost ready to power up the Pi and start installing, but still have one more task to accomplish.  We need to figure out what storage media we are going to eventually install Rocky Linux to.  The SD Card slot is taken for the firmware, so we could perhaps use a second USB stick and let that be our long term storage medium where the OS lives, or perhaps a better idea is to purchase a USB-to-SATA adapter and use an SSD, just like a normal PC or laptop would use for storage.  This might prove to be more reliable long term, so let’s go for it.

Attach the SSD to the adapter, plug it into a USB3 port, hook up a keyboard and monitor, insert the UEFI firmware SD Card, and finally plug in the USB stick with Rocky Linux installer.  Now power up, and you should see a Pi logo, and after a moment the Pi will attempt to boot from the USB stick, which contains the Rocky Linux installation process (it’s nearly identical to the Fedora, CentOS, and Red Hat installers, if you have used those before).

In the installation wizard, you can add a user account, set your timezone, setup networking, and select the drive to install to.  Once you have everything configured, the installation will begin, and files are copied from the installer USB stick to the SSD.  This will take a while since we are using a RaspPi in this demo, but could potentially be much faster on big Arm Servers like an Ampere Altra, ThunderX, or even a SolidRun Honeycomb. 

At the end of the installation, you’ll be prompted to reboot.  You can remove the installation USB stick, reboot, and when the Pi boots back up it will automatically boot directly from the SSD.  At this point, you’ve successfully installed Rocky Linux on your Raspberry Pi!

Good luck and have fun with Rocky Linux 8 on your Raspberry Pi!

6 thoughts on “How to Install Rocky Linux 8 on Arm, Using a Raspberry Pi 4

  1. Did you have any problems with the network at all? I tried this on my RasPi 400 and the server just doesn’t see any network devices other than loopback, even after booting from a dvd image.

    1. that’s because the necessary kernel modules aren’t included and this article fails to mention that.

      unfortunately ibm/redhat doesn’t care about rpi, the only images that you can find are from the forums.

  2. Great guide except for EUFI configuration not letting the networking of Rocky run. Even the screen shots have “No Network Device Available”. Has this been fixed? Or is there another way to get RedHat based Linux distributions running on the PI 4?

  3. […] few weeks ago, we took a look at how to install the new Rocky Linux 8 on Arm, using a Raspberry Pi, as a replacement for CentOS.  This is due to Red Hat altering the […]

  4. Hey all, Skip G. from the Rocky Linux project here.

    I have an unofficial Rocky Linux 8 image produced for the RPi 3+4 that is ready to go. It should work completely fine out of the box (including ethernet and wifi). In my opinion, it’s way easier and more functional than following this page.

    The image and information is linked from our Wiki page on the Rpi: https://wiki.rockylinux.org/en/special-interest-groups/alt-arch/raspberry-pi

    Images and kernel repo are hosted on my personal site: http://skiprocky.linuxdn.org/RockyRpi/

    I’m going to try and e-mail the author to get this article updated. Thanks!

  5. Gotta enjoy being in a community that shares solutions and advances technology for us little guys. Thanks for the insights, looking forward to trying this on PI.

Leave a Reply to bait_article Cancel reply

Your email address will not be published. Required fields are marked *