drshapeless


Install Artix Linux (Armtix) on Raspberry Pi

Tags: linux | raspberrypi

Create: 2022-06-29, Update: 2024-01-04

This guide is very similar to my last post. But with a few very annoying parts to deal with.

Background

Armtix is the ARM version of Artix Linux, the sole reason of the existence of such distros is the hatre of systemd. If you don't know what systemd is, you probably have no reason to install a systemd-less distro.

Long story short, people hate systemd because it is bloated, very bloated. And it violates the unix philosophy, (which I don't really care). I want to stay away from systemd because I have been burnt by it. Systemd is the default init system for most of the Linux distros, with a few exceptions like Gentoo, Void, and Alpine.

The creation of Artix Linux is by stripping systemd from Arch Linux, and replacing it with a sane init system. That works great, if you know what you are doing.

As the popularity of ARM machines grows, thanks for Raspberry Pi, people starts porting distros to ARM. Luckily, Artix Linux has been ported to ARM already, and the name is Armtix, (a good name).

Init system

Since we are getting rid of systemd, we now have to choose which alternative init system we want to use. There are a few choices, like OpenRC, runit, s6init. I personally prefer OpenRC.

OpenRC is the default init system for Gentoo. Gentoo has been a meme distro for a while. Mainly because it compiles everything from source. If you don't have a beefy computer, you are going to wait until eternity every update. Gentoo users are very technical. Using their init system make me feel good, because there would be a lot of working tutorials.

Prepare an SD card and partition

This part is identical to what we do in Arch Linux, please refer to my previous post.

Please follow the parts of "Prepare an SD card", "Partition", "Format" and "Mount".

Download and extract the Armtix Linux image

You can download the image from here. I use OpenRC. The download is quite slow, give it some time.

Here is a sample shell command. But do NOT use this command to download, since the image has an explicit date in its file name, the command would be outdated as long as a new image is released. Go to the link and download.

wget https://armtixlinux.org/images/armtix-openrc-20220601.tar.xz

You may soon realize the extension of the image is different from the one of Arch.

I faced some weird issues when extracting with tar at one go. But that should just be my problem.

tar -xJvf armtix-openrc-20220601.tar.xz -C root

And alternative way to extract it is by layer.

# The -k flag preserve the original file, can be omitted.
xz -dvk armtix-openrc-20220601.tar.xz
tar -xvf armtix-openrc-20220601.tar -C root

Dump all the cache into disk.

sync

Populate the boot folder

Normally, you just have to copy the files in the boot directory to the boot partition and call it a day. But the armtix image does not contain the raspberry pi bootloader.

The armtix info page for raspberry pi 4 says.

RPi4 also needs extra firmware provided by raspberrypi-bootloader and
raspberrypi-bootloader-x packages from ALARM. If are not running
aarch64 linux, just download these packages and unpack their /boot
folders to your /boot partition.

If you have never dealt with the bootloader stuff, even an experienced Linux user would not understand what to do.

Here is what I have tried. Since I am not running aarch64 linux, I am using a x86 machine, I went to the ALARM repo, which stands for ArchLinuxARM, download the raspberrypi-bootloader. (If you don't know where to download, there is a download button on the right column.)Extract everything from it. There is a boot directory inside.

wget http://mirror.archlinuxarm.org/armv7h/alarm/raspberrypi-bootloader-20220620-1-any.pkg.tar.xz
tar -xJf raspberrypi-bootloader-20220620-1-any.pkg.tar.xz -C bootloader

I happily put all the stuffs into the mounted boot location.

cp -r ./bootloader/* ./boot/

Disaster

I put in the sd card and turn on the pi. Boom, a beautiful rainbow screen. Why?

The first answer from stackexchange said it was an out of date firmware. How could it be out of date when the package is just the same day as I download?

So I install Arch Linux ARM for comparison. The archlinuxarm was easily installed. Let's look at the boot directory. There is a lot more things in the boot other than what I have extracted from the bootloader.

Solution

I thought the bootloader is just for bootloading, it does not matter whether I am using systemd or openrc. I would just replace the mounted root to the things in armtix image. But remember to empty the boot directory. Also, I have populate the fstab. The fstab from the armtix image is empty.

In /etc/fstab, just put this line at the bottom.

/dev/mmcblk1p1  /boot   vfat    defaults        0       0

Keyboard not working

Great, I successfully booted into armtix linux. But why my keyboard stop working? Not only does my keyboard stop working, all the usb ports stop working. I guess there is something wrong with the archlinuxarm bootloader.

I carefully compare the files between archlinuxarm/boot and armtix/boot by eyeballs. Find out which part is the bootloader and which part is archlinuxarm specific by comparing it to the raspberrypi-bootloader I downloaded before. Put together a custom boot directory.

Well, does not work. I put my pair of eyeballs closer to the screen and seriously investigate every pixel. I discovered that, why the fuck armtix linux does not have a kernel. I re-read the info page.

At the top of the page it says:

linux-raspberrypi4 is built to be compatible with other kernels and u-boot package: kernel is moved to rpi4Image, dtbs are located in /boot/broadcom, cmdline.txt and config.txt are renamed to *.rpi4

Oh god, missing kernel is a feature here. But where do I get a kernel?

Getting a kernel

I pissed off and just copy the kernel from archlinuxarm.

It works, everything just work now.

Login

The default root password is "armtix", the default password for armtix is "armtix".

Of course I am not logging in as root.

Broken sudo

The first thing I notice is that, sudo is broken. Please refer to the last part of my previous post for a solution.

Connect to network

Also, this part is the same as installing Arch Linux ARM.

The only different thing is that, the daemon for the init system needs to be installed manually.

pacman -S wpa_supplicant-openrc
# Activate the service to connect wifi at boot
# This will not automatically enable the service
rc-update add wpa_supplicant-openrc default
# Enable the service for now
rc-service wpa_supplicant start

Update pacman

Double y is needed to update the database.

pacman -Syyu

At this step, you are likely to encounter some SSL certificates error. This is because the pi does not have hwclock. Use ntpd to fix the time. Every time you restart the computer, you need to fix the time manually.

ntpd -qg

Since all the packages in the armtix repo are not signed, we don't have to worry about gpg keys.