Install RHEL 9 on Raspberry Pi4

---

Posted by Andreas Stolzenberger on August 10, 2022 · 5 mins read
Contributors:
Andrea Battaglia

.

Introduction

The next guide will show how to roll-out RHEL 9 on a single board 64-bit native computer: Raspberry Pi 4.

The purpose of this blog is to demo the capability of Red Hat Enterprise Linux on ARMv8 devices.

Please keep in mind RPi 4 is not officially supported by Red Hat OS.

Hardware

For this demo you’ll need the following components:

  • Raspberry Pi4 with 4 or 8 GB Specs

  • SD-Card to boot your OS from (4+ Gb recommended)

  • A USB-Stick (temporary) for the installation process

rpi4

Software

For this demo you’ll need the following components:

Preparation

Follow the steps below to prepare your SD card.

  • Plug the SD-Card into your PC or Notebook

  • as root, start the partition manager tool of your choice and partition the card as follows:

  • Partition 1, 100 MB, partition type EFI (ef)

  • Partition 2, 1000 MB, Type Linux

  • Partition 3, rest of the SD-Card, Type Linux

  • Format your Partition 1 as FAT (12, 16 or 32, doesn’t matter)

  • Download EFI Firmware for PI4

  • Unpack content of the EFI-Firmware compressed archive to the Partition 1 of the SD Card

  • Copy the RHEL 9 ARM64 ISO to your USB Stick (we recommend using the 'dd' command)

Installation

  • Plug the SD-Card, USB-Stick, Mouse, Keyboard, Network Cable and HDMI-Monitor into your RPi 4

  • Boot the device and Press ESC on the EFI Boot Screen

  • Go to the device manager and make sure, that "limit RAM to 3 GB" is turned OFF (on by default!), save the device config

  • Enter the Boot Manager, chose USB Stick to boot from

  • Run through the RHEL-9-Setup Dialog, choose Packages, Registration, Locales, Timezone etc as needed

  • Set a root password and create a standard user.

Disk config

WARNING The RHEL-Installer does not accept the existing EFI-Partition as a valid filesystem.

As a workaround you’ll create a new one and (re)transfer the Pi-UEFI-Firmware back to the SD-Card after the RHEL 9 installation.

  • Select Partition 1

    • Select "reformat partition" and choose "EFI System Parttion";

    • Select "/boot/efi" as mountpoint

  • Select Partition 2 (1000MB);

    • Select reformat

    • Choose ext4 Filesystem and "/boot" as Mountpoint

  • Select Partition 3 (remaining space on the SD Card);

    • Select Reformat;

    • Choose ext4 or xfs as Filesystem and "/" as Mountpoint

  • Ignore the warning "no swap partition specified".

Install RHEL 9 and shut down the Pi4 after the installer finished.

At this point, your PI 4 will not start into RHEL 9, since the RHEL 9 Installer created a new EFI-Partition without the Pi4 specific files.

How to Fix EFI

  • Turn of the PI4, put the SD-Card back into your PC and mount the first partition (EFI).

  • Copy the PI4 EFI Firmware to that Partition (again), leave the EFI-Directory from the RHEL-9-Installer as it is.

  • Plug the SD back into the Pi4

  • Boot the Pi4 and enter the EFI Boot Shell (F1)

  • On the shell type:

FS0:
bcfg boot add 0 FS0:\EFI\redhat\grubaa64.efi

You should get a message like:

"Target = 000x, bcfg Add Boot000x as 0"

This step added the RHEL 9 Boot loader as the Default EFI Boot target.

  • Type reset;

Your Pi4 will now boot into the RHEL 9 Installation.

rhel9 screenshot

Share this: