Notes on Installing Alpine Linux


After using Alpine, I still recommend Arch/Artix for desktop usage. For use on servers, Alpine is worth a try, as it uses less memory and space.

With more effort required to get audio working with PipeWire, partition scheming issues, and at times, unclear documentation, Alpine falls short for desktop usage. Arch has the AUR and extensive documentation.

Partition Scheme

Alpine's wiki says that only a root partition is required. Despite this, all example partition schemes mention a boot partition. I could not get it to start without one.

Even when I was able to boot, that partition never seemed to get mounted, and errors were shown.

Format your drive and reboot before doing the rest of the installation, as the new partitions might not be shown until rebooting.

Using a Window Manager

If your mouse and keyboard do nothing when starting a WM, run the following commands:

adduser $USER input
adduser $USER video

If startx results in an error saying that it is "giving up" and a display server cannot be found, running startx with root permissions might work. A better solution is to delete the .Xauthority and .xinitrc files and recreate them as a non-root user.

Recovering Nuked Partitions

I deleted and recovered my home partition twice while I was trying to get the installation to work. In this case, run apk add testdisk. After starting testdisk, select "Proceed" and "Analyze" on the deleted partition.

Resources

Update: 2025 Jan 4th

I installed Alpine without overwriting my home partition by doing the following instead of following the manual installation guide that is linked above:

fdisk /dev/sda
reboot
apk add e2fsprogs
mkfs.ext4 /dev/sdaX # repeat for new partitions, with X being the number of the partition
setup-alpine # answer "none" when asked where to install
mount -t ext4 /dev/sda3 /mnt # replace 3 with the number of the root partition
mkdir /mnt/boot
mount -t ext4 /dev/sda1 /mnt/boot # replace 1 with the number of the boot partition
mkdir /mnt/home
mount -t ext4 /dev/sda2 /mnt/home # replace 2 with the number of the home partition
setup-disk -m sys /mnt
reboot

When mounting the boot partition, there were no errors. I double-checked by rebooting and, again, found no errors.

However, after compiling dwm and st and rebooting, the files in the /boot folder were removed. I got the same errors with the boot partition as before.

Having more steps to set up PipeWire is not as big of a problem as what I mentioned. Since Alpine is minimal, it is expected that adding programs would require more configuration. Running apk add alsa-utils alsaconf is enough to get working audio with ALSA, assuming that the user is in the audio group.

When I reinstalled Artix, I decided on only using ALSA without PipeWire and using dinit instead of OpenRC. It starts up a lot faster than OpenRC, but there is less documentation for it since it is newer.