Introducing Dinosaur OS

By Christopher Burg

Along with my new laptop, I decided to try a new operating system. I've been running Fedora Workstation since I bought my ThinkPad P52s in 2018. It's a great distribution. However, I've been interested in immutable Linux distributions for a long time. Unfortunately, getting the proprietary Nvidia driver (the P52s has an Nvida GPU) working on Fedora Silverblue without having to disable SecureBoot was a hurdle I didn't want to jump over. Fortunately, my new laptop has an AMD processor and integrated GPU so I don't have to deal with Nvidia's shenanigans anymore. I originally intended to run Fedora Silverblue, but then I came across Bluefin, which is a Universal Blue image, which is a Silverblue based image meant to be a foundation for building images.

Immutable Linux distributions differ from typical distributions in a number of ways. The biggest difference, which is in the name, is that the base system is immutable. This means you can't install packages in the normal manner. Silverblue has support for overlay packages, but installing overlay packages on an immutable distribution can cause headaches down the road (especially when performing major version upgrades). The advantage is that upgrades are simple and rolling back to a previous version is as simple as rebooting. Rebasing to other immutable images is also simple (as is rolling back if you decide you don't like the new image).

I chose Bluefin over Silverblue for a few reasons. First, Silverblue uses the Fedora flatpak repository by default and all of the included flatpaks are sourced from that repository. I prefer to use Flathub because the packages are up-to-date. Bluefin uses Flathub. Second, Bluefin includes Distrobox. Silverblue includes Toolbox, which I find inferior to Distrobox. Third, Bluefin includes Bazaar as its graphical Flatpak manager. Silverblue, like Fedora Workstation, still uses GNOME Software, which is so buggy that I end up managing flatpaks via the command line when I use Workstation. Fourth, dinosaurs. Bluefin's theme involves dinosaurs and dinosaurs are cool (hence the name of my modification of Bluefin).

There's just one problem with Bluefin (Silverblue has this problem too). It doesn't include libvirt. I rely heavily on libvirt. It's my virtual machine manager of choice. Installing libvirt on Fedora Workstation was a simple dnf command away. But Bluefin is immutable so dnf isn't a lot of help. Bluefin does offer a solution out of the box in the form of the Bluefin Developer Experience (DX). Bluefin includes an easy way to rebase to Bluefin DX. The problem with Bluefin DX is that it includes a lot of tools I don't want to use such as Docker, Visual Studio Code, and Incus. This lead me down a rabbit hole of learning how to make my own modified version of Bluefin.

Modifying Bluefin or any other Universal Blue image is dead simple. There's a handy template that you can fork to get started. From there you can modify the Bluefin build process to add, remove, or modify whatever you want. The result of my efforts is Dinosaur OS. Dinosaur OS is basically Bluefin with libvirt added. There are a few other minor modification too, but the inclusion of libvirt is the main difference. Switching from Bluefin to Dinosaur OS is as simple as issuing the sudo bootc switch ghcr.io/christopherburg/dinosaur-os command. Once it completes downloading and staging the image, reboot your computer and you'll be in my modified version of Bluefin.

The instructions to get started are all in the template's README.md file. But there are two files that will contain a lion's share of your changes. The first is Containerfile. The second is /build_files/build.sh. I've organized my repository since my initial release, but most of the changes are made by the shell scripts in /build_files/. For example, /build_files/base/00-install-libvirt.sh executes dnf to install the libvirt packages. It also adds the libvirt group to the image so you can add user accounts to the group. It also enables a systemd service that fixes some SELinux permission issues. None of this was my original idea. I pieces together how Bluefin DX installs libvirt and made those modification in my image.

Now that it's configured, my GitHub repository rebuilds the image once a day. This pulls in the updates from Bluefin, which in turn pulls in the updates from its base Universal Blue image. Dinosaur OS downloads new images automatically so when I reboot my computer, I boot into the latest image.

I don't expect anybody to run Dinosaur OS themselves. It's custom tailored to my use case. My hope is that it can work as a template or example for anybody who wants to make their own image. The coolest thing about image based distributions is that it's trivial to make a bespoke image that fits your use cases. The coolest thing about using Universal Blue as the foundation is that it automates most of the work.