Contents

Arch Linux on Raspberry Pi 5: Back from the trenches

Contents

I have some software packages on the Arch User Repositry (AUR), making it easy to deploy on various devices. It used to be a bit tricky to install Arch on the raspberry pi, but now it is possible to get to a running system quite fast, so here are notes on how to get going, and get your Pi running with Arch.

Download the ISO

First of all, we need the ISO for install. The iso/zip I downloaded was from rasparch on sourceforge. Directly burned the file to the SD card, using standard tools Etcher. I inserted the SD card in the Pi, plug the power, and the small beast started booting …

../raspberry5.jpg

Boot

The ArchPi boots into a quite ugly login screen. The default user is archpi / raspberry. (in case I forget). Tricky part was that TAB cannot be used, you have to press ENTER on that login manager. That is probably a bit too NOOBS, I admit.

Also, a good idea, what I think is a Pi5 is indeed a Pi5, let’s check it on a terminal:

cat /proc/device-tree/model
Raspberry Pi 5 Model B Rev 1.0

Solve root login

After login in, I could sudo, but I could not use su - to get root access. I went to this thread on the forum, that had great insight on where to look, but actually it was just that the password is not know, so it was time to reset it.

sudo -s 
password

Check the kernel

This may be a problem later, the kernel is not an official one:

uname -a 
# Linux rasparch 6.6.66-exton-v8-16k+ #1 SMP PREEMPT Mon Dec 16 14:17:27 EST 2024 aarch64 GNU/Linux

It is not stopping anything from working so far, we will see in the long run.

Extend the root partition

I used directly gparted online, and could extend the root partition from the original 8G to the full size of the sd card , 64G.

sudo pacman -S gparted
sudo gparted

Check Wifi setup

You may have an internet LAN cable connected directly, or you may use the integrated Wifi chip.

The following command display the available Wifi on the command line:

nmcli dev wifi

../wifi-01.png

And the you can connect to any of these via:

nmcli dev wifi connect "NSD3K-C130-g_EXT" password "..."

Start/Enable SSH

sudo pacman -S openssh
sudo systemctl enable sshd
sudo systemctl start sshd

Then can connect remotely

ssh archpi@192.168.1.40
The authenticity of host '192.168.1.40 (192.168.1.40)' can't be established.
ED25519 key fingerprint is SHA256:jKaH50S+B3754oh/Q4jStiwdEbVye2klfdUNXtQRB8I.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added '192.168.1.40' (ED25519) to the list of known hosts.
archpi@192.168.1.40's password: 

Extra: sdkman install

A lot of open source tooling is nicely managed using sdkman. Even though we are on a arm-based CPU, install runs smoothly with the usual steps.

curl -s "https://get.sdkman.io" | bash
sdk version

Which will output at time of this writing:

SDKMAN!
script: 5.19.0
native: 0.5.0

Install yay

Yay is the almight package manager for AUR. It is not available from pacman by default, so we have to build it, but the steps to get the binary are pretty straight forward.

../installing_yay.png

sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

../yay1.png

../yay2.png

Install Remote Access RDP/VNC

Just realizing that X server was not running on the Arch Pi, so just installing XRDP:

yay -S xrdp
sudo systemctl enable --now xrdp

Was not enough, as it was trying to start a Xorg session when doing remote login. So went to install raspi-config:

yay -S raspi-config

Configure the VNC server (probably did not need raspi-config for that but it install the required packages to make VNC working)

../raspi-config-01.png ../raspi-config-02.png ../raspi-config-03.png

That installed the necessary VNC packages to be able to choose a VNC session when using XRDP.

Also, to avoid xrdp to try Xorg session by default, comment out the Xorg configuration lines in /etc/xrdp/xrdp.ini:

;[Xorg]
;name=Xorg
;lib=libxup.so
;username=ask
;password=ask
;port=-1
;code=20
; Frame capture interval (milliseconds)
;h264_frame_interval=16
;rfx_frame_interval=32
;normal_frame_interval=40

Then you can directly start a graphical session via your usual XRDP client.

../xrdp-01.png

And here is the final remote desktop screen showing.

../xrdp-02.png

Thoughts

I have used the official raspberry OS, the debian-based install in the past, and now this Arch-based ISO to run the Raspberry Pi.

I have/had mostly two little annoyances:

  • timedatectl is not syncing for me. May be able to find out why soon. [Fixed]
  • The network was a bit slow on the integrated Broadcom wifi card, but switched to using a USB dongle solved it.

The rest is quite smooth, and could be used as a small NUC station without problems.