Armed with nothing but qemu, I set about rediscovering the joy of mindless tinkering by installing 10 distros in 10 days. This is what I found.
the most boring part is upfront, preparing the host machine. luckily, there is only one thing to install — qemu
brew install qemu
well, that was easy.
if we install an OS in a qemu machine (“VM”) that has the same CPU architecture as our host machine, it’ll run at ~native speed (that how clouds work, theyqemutoo). I also want nice graphics, and sound. After experimenting, I arrive at a qemu invocation that I put in a shell script.
#!/bin/sh d=$(basename `pwd`) set -o errexit set -o xtrace test -f ../edk2-aarch64-code.fd || cp `brew --prefix qemu`/share/qemu/edk2-aarch64-code.fd .. test -f edk2-arm-vars.fd || cp `brew --prefix qemu`/share/qemu/edk2-arm-vars.fd . test -f disk.qcow2 || qemu-img create -f qcow2 disk.qcow2 40G qemu-system-aarch64 \ -machine virt \ -cpu host \ -accel hvf \ -m 2G \ -drive file=../edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \ -drive file=edk2-arm-vars.fd,if=pflash,format=raw \ -drive file=disk.qcow2,if=virtio,format=qcow2 \ -audio coreaudio,model=virtio \ -monitor none -parallel none \ -device virtio-gpu \ -device qemu-xhci \ -device usb-kbd \ -device usb-tablet \ -name "$d" \ $*
I name this shell script qvm and chmod u+x qvm it.
mkdir alpine && cd alpine curl -fLO 'https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-standard-3.21.3-aarch64.iso' ../qvm -cdrom alpine-*.iso
ENTER ENTER, reboot.
looking at the serial console (Ctrl-Alt-2) shows that the OS is still booting, so back to the graphics display (Ctrl-Alt-1) and wait.
login as root again, and install X.
which one? let's try them all!
gnome, ENTER, reboot
looks great. supports color profiles (otherwise the colors look washed out on P3 displays). fonts look crisp.
sluggish (likely because the graphics card I'm using (virtio-gpu)
is emulated; there are patches around for a virtualized
(“native”-ish) card but those are not upstream yet). the display
also hung a few times when my laptop went to sleep (also likely due to broken
emulation)
to try the rest, I rerun setup-desktop again. to do this
conveniently as a regular user
su apk add doas echo 'permit nopass m' > /etc/doas.d/doas.conf ^D
the alpine post-install handbook is a helpful read.
installing plasma this time,
doas setup-desktop reboot
I get something different, but traces of gnome. have I summoned a hybrid? quick, let me recreate the entire machine
rm disk.qcow2 && rm edk2-arm-vars.fd ../qvm -cdrom alpine-*.iso setup-alpine reboot setup-desktop reboot
indeed, now it looks proper. seeing this, my first impression is of a gnome :: macos vs kde :: windows inspiration (not copying; using gnome felt fresh)
similar good and bad points as gnome. I liked gnome's look more.
next up is xfce. I also have a better way using backing images.
rm disk.qcow2 && rm edk2-arm-vars.fd qemu-img create -f qcow2 disk-base.qcow2 40G ln -s disk-base.qcow2 disk.qcow2 ../qvm -cdrom alpine-*.iso setup-alpine poweroff rm disk.qcow2 qemu-img create -f qcow2 -b disk-base.qcow2 -F qcow2 disk.qcow2 40G ../qvm setup-desktop reboot
xfce's snappy!
pretty much the flip of the previous two. plain look, fonts are less crisp, the colors look a bit washed out on my P3 display, there's no way to provide a color profile.
but it is fast, lagless. does not hang on sleep.
next up is mate. setup is faster because I can use the backing image as the mid-way checkpoint.
rm disk.qcow2 && rm edk2-arm-vars.fd qemu-img create -f qcow2 -b disk-base.qcow2 -F qcow2 disk.qcow2 40G ../qvm setup-desktop reboot
same category as xfce. snappy, no lag. fonts seem a bit better than xfce (but I might be imagining it too). visually I like (or am more used to) xfce.
next is sway. same steps as above. reboot, and voila.
voila? well, nothing happens, I get a login prompt on the text console. I login and then manually run
sway
this launches a barebones graphical display. after reading around, I find that pressing mod + ENTER (Cmd + ENTER) launches “foot”, which I assume is the their default terminal emulator. From here I can launch other things too.
so this looks like a tiling, keyboard driven, um, thing (their wiki is curt-to-the-point-of-rudely written, and calls out in bold that sway is not a window manager, and I'm not yet deep enough into wayland to know what it is then).
the last stop in our tour of alpine desktop options is lxqt. the same steps as before, then reboot.
similar to plasma; less polished, but faster.
before moving on to the next distro, I'd like to take this chance to thank Alpine. I've used this great distribution to base production docker images for years, and it is was a similar pleasure to use it in the desktop context too.
I love the Manjaro icon (that's the reason I'm trying it out, I know nothing else about this distro)
unlike alpine, we need to decide beforehand which desktop we want (their download page has good oneline descriptions of all of them btw). I'll try the gnome and xfce flavored ones.
mkdir manjaro && cd manjaro curl -fLO 'https://github.com/manjaro-arm/generic-efi-images/releases/download/23.02/Manjaro-ARM-xfce-generic-efi-23.02.img.xz' gunzip Manjaro-*.xz ../qvm -drive file=Manjaro-ARM-xfce-generic-efi-23.02.img,format=raw,media=cdrom
things are not off to a good start. this is the second error, I'd actually downloaded the gnome flavor first, which bailed out even earlier, before I figured I needed the “generic EFI” variant. to speed things up I got the presumably smaller xfce image the second time. but now this.
eventually I figured that the EFI writable pflash drive that I was mounting as
part of my qvm script — the line -drive
file=edk2-arm-vars.fd,if=pflash,format=raw — was what was making
manjaro unhappy. so I removed it, and instead of the script, ran the following
qemu invocation:
qemu-system-aarch64 \ -machine virt \ -cpu host \ -accel hvf \ -m 2G \ -drive file=../edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on \ -drive file=Manjaro-ARM-xfce-generic-efi-23.02.img,format=raw \ -drive file=disk.qcow2,if=virtio,format=qcow2 \ -monitor none -parallel none \ -device virtio-gpu \ -device qemu-xhci \ -device usb-kbd \ -device usb-tablet
success!
The installer is nice, it detects the time zone automatically, and gives me an option to switch to Dvorak during install itself (neither of which alpine could). But it doesn't seem to install anything? because it never asks for the destination drive.
Indeed, on rebooting, I land here.
I know I'm holding it wrong, but it's time to move on.
RHEL’s new centos, the name’s a hattip. First class support for podman.
mkdir fedora && cd fedora curl -fLO 'https://download.fedoraproject.org/pub/fedora/linux/releases/42/Workstation/aarch64/iso/Fedora-Workstation-Live-42-1.1.aarch64.iso' ../qvm -cdrom Fedora-*.iso
the live CD opens to a beautiful gnome in a moominesque vista, with a partial prime factorization of 42 tatooed on a tree.
however, it is sluggish, as gnome/kde were with alpine (again, no fault of its
own, I'm just running it an underpowered VM with an emulated graphics card on a
laptop without enough RAM to spare). I also try with more RAM, -m
4G, which is the minimum fedora lists, and that does help a lot, but
still not pleasant.
so it's back to xfce.
curl -fLO 'https://download.fedoraproject.org/pub/fedora/linux/releases/42/Spins/aarch64/iso/Fedora-Xfce-Live-42-1.1.aarch64.iso' ../qvm -cdrom Fedora-Xfce-*.iso
much better, but still sluggish — I'm comparing to using xfce on alpine. a
peek at top shows systemd minions running around, and the
system already using swap even though RAM is available (but determining memory
usage is fraught with misconceptions I'm not immune too; I only looked here
since it felt slower).
let me try one of the alternative “spins”, to see if one is lighter. most of them don't seem to offer aarch64 media, aha, the miracle one does.
curl -fLO 'https://download.fedoraproject.org/pub/fedora/linux/releases/42/Spins/aarch64/iso/Fedora-MiracleWM-Live-42-1.1.aarch64.iso' ../qvm -cdrom Fedora-MiracleWM-*.iso
nope, not much faster. I like the look though.
mkdir opensuse && cd opensuse curl -fLO 'https://download.opensuse.org/ports/aarch64/tumbleweed/iso/openSUSE-Tumbleweed-NET-aarch64-Current.iso' ../qvm -cdrom openSUSE-*.iso
the net installer quickly boots to a nice look
I press ENTER, then wait, and wait, but nothing happens. eventually, I give up and switch to qemu serial console to find that zalgo has been unleashed
I find this amusing, but instead of tinkering and fixing this issue, it also makes me realize — I've already found what I was looking for.
alpine and xfce
I'd started with the intent of visting 10 distros across 10 weekend or other days when I had time to fritter
by a coincidence, or a subconsciously informed guess, the first thing I'd tried was alpine with xfce
I continued half-way-ish, trying more distros, more desktop environments etc, and I have educated myself with more information than what I'd started with, but it feels silly to tinker on when I already have a working setup that also aligns with me:
I also found out that despite there being almost endless number of distros, the options for aarch64 are much more limited — the majority of distros are also x86 only (I think this'll change soon!)
now I'm ending this trip, happy for now with the alpine with xfce vm I purchased with my time
there, however, are still two distros that I'd like to play with some day
the first one is sabotage linux. its beautiful website has been planted in my head every since I came across it
the second is the all knowing gentoo
manav rathi