drshapeless


First impression on raspberry pi

Tags: linux | raspberrypi

Create: 2022-06-22, Update: 2022-06-24

I recently got a Raspberry Pi. I don't need it. I bought it because it was at a good price. It would be fun, I thought.

First look

Raspberry pi is a single board computer. It is compact and small. That's what I expected. But I was surprised that despite its small form factor, it was tough. It did not bend when I apply forces.

Choosing a distro

I am not a hardware person. I am more interested in the software aspect.

With a such minimalistic machine, I would like to have a minimal distro.

Since I already have a powerful desktop running Artix Linux, I would like to run the pi as a headless machine for private services. I don't need a graphical environment at all.

The raspberry pi manufacturer provides an official distro, Raspberry Pi OS, aka Raspbian, a debian based distro. There are a lot of options from the official download page. The main difference is 32-bit and 64-bit. I have a Raspberry Pi 4B model, which is capable of running 64-bit os. The primary reason to run 32-bit on newer model is for backward compatibility. I am fresh to the scene. I find no reason to handicap myself with 32-bit variation.

Ignoring the legacy options, I only have to choose between "Raspberry Pi OS with desktop" and "Raspberry Pi OS Lite". As I do not need a graphical interface as I mentioned before. The "Raspberry Pi OS Lite" seems to be the obvious choice.

Installing it was simple, dd the image into a USB or an SD card, the pi would boot right away.

A different route

I don't like debian, primarily because of its stable release model. I would always prefer a rolling release distro. If things are going to break, let it breaks and I will fix it. Dancing on the knife edge is a lot of fun.

Also, I don't like systemd. Just like most of the haters, I think systemd is bloated by doing too many stuffs that it is not supposed to do. I have been burnt by systemd several times before.

But what else do I have left to choose from?

Arch Linux ARM

Switching to a rolling release distro is simple. The most popular rolling release distro is definitely Arch Linux. Althought Arch Linux only officially supports x86, the community has ported it into ARM for sometime. The distro is Arch Linux ARM, or in short ALARM (what a bad name for search engine).

Installing Arch Linux ARM is a bit more complicated, because it involves partitioning and formatting the hard drive, in order to create a boot partition. I have installed Linux on several different machines before, this was not a big deal to me. But by searching in the Internet, I was overwhelmed by the amount of useless information for countless content farms and meaningless YouTube video. Amateur Linux users may easily be misleaded by those "spam". Don't worry. The Arch Linux ARM official site has the most reliable guide. Stop watching those step by step videos, they are just copying this guide.

But the guide was not perfect. It requires you to understand the difference between armv7 and AArch64. If you blindly copy and paste from top to bottom to your terminal, you would end up in a 32-bit os, which is less ideal.

See my slightly modified installation guide to avoid this kind of tiny issues.

Armtix

Nevertheless, Arch Linux ARM was not my ideal distro. It uses systemd just like the normal Arch does. For non-systemd alternative, we have Artix for Arch. For Arch Linux ARM, we have Armtix.

Artix Linux already has a much smaller user base than Arch Linux. But thanks for the two famous YouTuber, Mental Outlaw and Luke Smith. There is a slightly rise in popularity of Artix Linux.

As I expect, Armtix (the ARM port of Artix Linux) has an extremely tiny user base. You can kind of see it from the lack of design in the Armtix site. The instructions on Armtix is also quite unclear comparing to the one on Arch Linux ARM. Because of the lack of users, you cannot easily find an alternative guide written by the community.

It was not fun when I encountered a tons of unfamiliar error messages. It is depressing when the Internet could not help.

There are too many weird things in the Armtix image making it not able to run out-of-the-box. I am working on an in-depth guide on installing Armtix on Raspberry Pi.

Usage

The machine is not meant for performance, and I knew that. But I was still kind of curious what its limit can be.

My purchase of pi is bundled with a metal cooler (should be made of aluminium) for USD$65, I believe it to be an argon-one case. It comes with a shell script to control the fan speed. But the script only works for Raspberry Pi OS and ubuntu, also, only for systemd. I have not ported the script to my distro yet. But by slightly eye-balling the script, I think it should be fairly simple. As a result, the case only acts as a passive cooler now.

The first compilation task for the pi is to compile paru, which is an AUR helper written in Rust. Compiling a Rust program from source already feels very demanding for such a tiny single board machine.

It compiled, but it took time, a lot of time. I don't know how long it took exactly, because I went out for lunch while compiling. I was worried that the pi would have caught fire when I got home. It did not catch fire, but the case was really hot.

I would rather cross compile an ARM binary on my main machine next time.

Currently, most of my personal side projects which require a web server rely on a VPS instance. With the pi at home, I am going to install nginx and make it act as my main server. Apart from the different in architecture, the pi is an amazing alternative to renting a VPS. It provides a lot more controls and power. And the storage can easily be expanded. My poor 10GB VPS keeps kicking my ass.

Hopefully I would discover some interesting usage of the pi.