Alpine: Moving In
Intro
Recently i switched to Alpine Linux a Linux distro based on musl libc and busybox with focus on security and being lightweight.
This article will document the process of moving in from Void Linux to Alpine, how the uniqueness of using busybox for userland tooling was dealt with and how i got into contributing for it.
Coming from
My previous distro was Void Linux, which i used for as long as i contributed to it.
It is a very solid distro, updates are frequent, Repology counts between 86% to 89% of packages are updated.
The worst part of moving is that there wasn't anything technically wrong with the distro itself. If i had to pick a distro i knew would work just fine i would pick Void Linux.
But alas, other factors related to development and contribution sapped my fun out of contributing and i want to contribute to every distro i use in one way or another.
I picked Void because i wanted to contribute over it, initially over Alpine Linux, and went to Exherbo for a time and contributed to it. Now i pick Alpine.
Going to
First thing i did was to load up SysrescueCD on my DriveDroid and plug into my notebook.
I have been using SysrescueCD to install OSes from it with chroot with no problems for a long time, much before my long stay in Void, i remember installing Gentoo and Exherbo with it and i was super comfortable.
So i just picked up the Alpine chroot install guide from here. Pretty simple and straightforward. I did hit a hitch where it failed to load modules when i first generated the initramfs with mknitfs but i just did the following in the initramfs rescue environment
modprobe ext4 mount /dev/sda2 /sysroot exit
And it continued as usual. I first installed whatever i could that i used from Void Linux
into Alpine, turns out a few packages were missing like zola
, wmutils
, xidle
,
fd
, fcount
, sx
and qimgv
among others.
After installing everything i tried setting up my dotfiles only to hit a problem. Busybox's
ln doesn't support the -r
flag which sets up a relative symlink. Easy enough i just made
it hardcoded, it is not like this decision will come back to bite me later.
I decided to drop hsetroot
entirely and just use bgs
for setting my wallpaper, but overall
my scripts had no problem, at least visible, in getting to work with busybox.
One problem was gotop
which wasn't available and didn't work with ps from busybox, it was
worked around by installing the procps
package.
Another was the lack of the shellcheck
package which is behind the clusterfuck
that is Haskell packaging.
Alpine seems very phobic to adding dependencies, so most stuff is compiled without pulseaudio
support, thankfully i don't need much advanced features from pulseaudio for stuff like mpd
so i just installed pulseaudio-alsa
and alsa-plugins-pulse
to get to work.
Also the fish
package was outdated and without maintainer, so i adopted it and updated it.
On the bright side the /bin/sh
of Alpine Linux is very similar to the one from Void Linux,
which is dash
, while Alpine's is the ash
shell from busybox. Which means that all my
scripts that relied purely on POSIX shell features + local worked just fine.