Alpine Linux on a Raspberry Pi

I'm pretty new to Alpine Linux. All I knew about it was, that it's widely used for Docker containers because of it's size. I just wanted to test it as I found out there is a version for the Raspberry Pi. And I was immediatly convinced by it's simplicity and it's small size.

Alpine Linux Homepage

Refreshingly small

Here are some command outputs:

As you can see it takes only 41MB of RAM. I was reminded of the early days of Linux by this, when machines had much less memory. It seems to have a very economic way to deal with it. Without all the bloated systemd crap.

It only takes 225MB of space on my SSD. And there are already some additional packages installed. A fresh install shouldn't take more than 160-170MB. On a docker image based on Alpine Linux you can get as low as 8MB for the OS as stated on the homepage.

The running processes are quite manageable and uncluttered. It could be even stripped down a little more by removing all that unnecessary getty processes on a headless system.

Building blocks

Alpine Linux is built around the musl libc, which is a lightweight and simple implementation of the Linux Standard library libc. It's much leaner than the standard glibc used by most distros.

It uses busybox, which is a replacement of a lot of common UNIX utilities with one simple executable. Busybox was designed to be used in embedded systems where disk space is precious. It provides a fairly complete Linux environment.

Instead of using the bloated systemd init system, it utilizes OpenRC. I've never made any experiences with OpenRC or any other alternative init system besides systemd. In fact, I'm not a systemd hater, and I think that it's doing a good job. I use systemd on my desktop and laptop as well as on my cloud servers. Nevertheless is OpenRC and it's simplicity a positive experience to me. After diving in a little I like it a lot.

My use case

I've converted all my Raspberry Pis into Alpine Linux machines except my Pihole, which still uses a standard installation of Raspberry Pi OS (rasbian).

For my NAS, Alpine Linux was essential. My NAS is a RPi4 (8GB) connected to a 4-Bay USB3 HDD case. It's running a ZFS raidz1. Raspberry Pi OS did always panic after a while when I started a zpool scrub. After switching to Alpine Linux this behaviour was gone and a scrub runs until it finishes.

Another RPi4 (4GB RAM) uses Alpine as Docker host. It boots from a SSD and runs several docker images for Home Automation and a Wireguard Server as a VPN for my smartphone.

The third RPi4 (8GB) has another USB3 harddrive attached to it as an additional backup for my NAS. I send the whole zpool (incremental) from the NAS to it every sunday. It also functions as a SyncThing server using a fast SSD.

Conclusion

I can wholeheartedly recommend Alpine Linux on the Raspberry Pi for a headless installation. It's small and simple and still has all the features you need. The utilization of OpenRC is refreshing and a good choice for the Pi. It's completley unbloated from the beginning and you can even run the whole OS from RAM and only store your data on a SSD and keep the OS itself immutable (you can still explicitly update it).

I can't say anything about Alpine Linux on the desktop/Laptop with Xorg/Wayland, but for a server it's a good operating system.

All that said I have to say again, that I'm not a professional. There may be solutions better suited to your use case. But I can say that I'm completely satisfied with Alpine Linux.

--

Back to index

Homepage

Proxied content from gemini://redterminal.org/gemlog/2021-09-18-Alpine_Linux_on_a_Raspberry_Pi.gmi

Gemini request details:

Original URL
gemini://redterminal.org/gemlog/2021-09-18-Alpine_Linux_on_a_Raspberry_Pi.gmi
Status code
Success
Meta
text/gemini;lang=en
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.