Arch Linux on Raspberry Pi 4
August 29, 2022  |  Raspberry Pi

The most popular Linux distros for Raspberry Pi 4 are the official Raspberry Pi OS and a special version of Ubuntu. I’d expect them to be pretty similar since both of them are Debian-based, but let’s collect some high-level data to see if they have any fundamental differences:

Raspberry Pi OS:

raspinfo

Raspberry Pi 4 Model B Rev 1.2
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"

Linux xxx 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

Ubuntu 20.04:

lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

uname -a

Linux xxx 5.15.0-1013-raspi #15-Ubuntu SMP PREEMPT Mon Aug 8 06:33:06 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Clearly, those are very similar distributions and they both run the same minor version of the same custom Linux kernel. That’s a bummer, I’d like to see more diversity, and I prefer using mainline kernel, if possible, so I started looking for an alternative distribution which isn’t Debian-based and which runs on a mainline Linux kernel out of the box. After reading about a few options, I finally settled on Arch Linux ARM.

The first thing which I noticed is how fast it boots up, compared with Raspberry Pi OS and Ubuntu.

Ubuntu 20.04:

systemd-analyze

Startup finished in 6.951s (kernel) + 13.325s (userspace) = 20.276s
graphical.target reached after 11.717s in userspace

Arch Linux Arm:

systemd-analyze 

Startup finished in 4.887s (kernel) + 7.442s (userspace) = 12.330s 
graphical.target reached after 7.442s in userspace.

That’s a 60% reduction in startup time, which is pretty impressive. I’ve been running Arch on my Raspberry Pi 4 for a few months already and the only issue I noticed was related to USB 3 port not mounting an external SSD automatically during the system boot. I had to move that drive to a USB 2 port since I didn’t really need USB 3 bandwidth. This morning, I decided to check that USB 3 port again with the most recent mainline kernel, and it looks like this issue is gone in 5.19:

uname -a 

Linux xxx 5.19.4-1-aarch64-ARCH #1 SMP PREEMPT Sat Aug 27 14:19:21 MDT 2022 aarch64 GNU/Linux

lsblk | grep sda

sda           8:0    0 931.5G  0 disk 
`-sda1        8:1    0 931.5G  0 part /run/data