Skip to content

Raspberry Pi

This page details how to use Alma Linux 8 on a Raspberry Pi, perfect to use as a bastion/utilities host when hardware is tight.

The Raspberry Pi tested in this case was a Pi3 Model B v1.2.

Ref. https://github.com/AlmaLinux/raspberry-pi/

You'll need xz:

sudo dnf install xz -y

Download

https://repo.almalinux.org/rpi/images/AlmaLinux-8-RaspberryPi-latest.aarch64.raw.xz

Extract

unxz AlmaLinux-8-RaspberryPi-latest.aarch64.raw.xz

Obtain device

Use fdisk to identify existing storage devices on your system, then insert the MicroSD card, using fdisk again to identify the card:

fdisk -l
Example output:

Disk /dev/sda: 14.84 GiB, 15931539456 bytes, 31116288 sectors
Disk model: Card  Reader    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4bab99d1

Write the image

sudo dd if=AlmaLinux-8-RaspberryPi-latest.aarch64.raw of=/dev/sda status=progress; sync

Power on the Raspberry Pi and login with user root with password almalinux.

Change the root password:

passwd

Change Hostname

hostnamectl set-hostname pi.lab.local

Set Networking

To change the IP Address do the following:

nmcli con show
nmcli con mod 'Wired connection 1' ipv4.method manual ipv4.addresses 192.168.1.80/24 ipv4.gateway 192.168.1.254 ipv4.dns 192.168.1.80 connection.autoconnect yes

Updates

Reboot the Pi, ensure you can log in and the hostname and IPAddress are as expected.

Install any updates:

dnf update -y

Optional

I toggle between always doing things correctly to reenforce good habits and, well not. Sometimes, when working with local test and development labs, and especially when learning or trying something new it's useful to eliminate potential pitfalls. Therefore, you can disable Firewalld and SELinux while implementing things, and with a known working configuration, reintroduce things and see the cause and effect, troubleshooting accordingly.

Stop and disable Firewalld:

systemctl stop firewalld
systemctl disable firewalld

Disable SELinux:

/etc/sysconfig/selinux
SELINUX=disabled