Chimera – a Linux that is not GNU/Linux • The Register

FOSDEM Chimera Linux is a new distribution under construction that is not only systemd-free but also GNU-free. Its creator hopes to reach alpha testing this spring.

Chimera Linux is a new project that started in mid-2021 but has already made significant progress. Its solo developer is Czech programmer Daniel “q66” Kolesa, who gave a talk about his project at FOSDEM last weekend.

His talk was part of FOSDEM’s BSD program stream, which in itself is an indication that this is not a typical Linux distribution. This is already reflected in the name: the original chimera was a mythical creature whose body consisted of parts from different animals. There is a certain breed of Unix freaks who insist that Linux should be properly called GNU/Linux because the kernel is built with the GNU C compiler, everything is linked against the GNU C library, which uses GNU Coreutils and usually several other components of the GNU project.

Chimera Linux is existential proof that this is not a hard requirement: it avoids all of that. Chimera is compiled with LLVM, uses the same Musl-C library and packaging tools as the lightweight Alpine Linux distribution, the new dinit init System, and much of the rest of the userland is from the current version of FreeBSD. If things go according to plan, Kolesa hopes to release the first alpha release around the same time as the planned FreeBSD 13.2 release so that he can fall back on that version of the underlying tools.

Kolesa’s talk is recommended, but be warned it’s very technical. For a quick overview you can read his presentation (PDF).

One of the things that BSD fans tend to praise is the kind of somewhat abstract virtue that appeals to hard-core Unix types: every BSD stores the core operating system’s source code in a single directory tree, making it possible to run the whole thing in one create sole proprietorship. Third-party components are relegated to an external “ports tree”. A Linux distribution, on the other hand, is less “an operating system” than several thousand separately developed operating system components, all of which are flown in extremely close formation.

Chimera is an attempt to bring some of that design clarity to Linux. It’s not all FreeBSD at the bottom: this is still a Linux-based operating system, and it remains binary compatible with Linux. In a way, Chimera is the opposite of the now unmaintained Debian GNU/kFreeBSD. This project put the GNU userland and Debian tools on top of a BSD kernel.

Instead, Chimera puts a ported version of quite a bit of FreeBSD userland on top of the Linux kernel, with a native Linux but non-GNU C library. Another distribution that uses the muscl libc is the minimalist rolling release Void Linux, of which Kolesa is a former developer.

An important part of this is replacing the GNU Coreutils. Before attempting to port the FreeBSD equivalent to himself, he found such a project existing: bsdutils. He uploaded some fixes for it but ended up forking to create his own version: chimerautils.

Aside from these, the C library and the init system, Chimera uses several other non-FreeBSD tools. Although he is re-offering his patches to the FreeBSD code upstream and some are being adopted, he tried and then discarded the FreeBSD pkg tool. (To be fair, that seems reasonable enough to us.)

Instead, it uses apk, which is short for Alpine package manager and which, he says, “turned out to be an excellent fit in the end.” But here, too, he is ahead of his time apk Command based on APK version 3, which is not yet used in Alpine itself. APK 3 moves away from the use of tarballs and “has its own custom structured package format to help avoid package manager vulnerabilities”.

There are many signs of this kind of attention to detail in his presentation: looking for existing work, evaluating alternatives with an open mind, and cherry-picking, and then adjusting the best bits.

Chimera is currently in its early stages, but amazingly, the project already supports four architectures. Kolesa told us:

ppc64le is my workstation, so that’s the primary development goal; x86_64for most computers; aarch64 for my single board systems; and RISC-V_64 because I thought it would be cool to have it early while most distros are still figuring it out. (And also, I own SiFive’s HiFive Unmatched board and thought it would be sad to let it mostly go unused.)

Live media and root file systems are available for download. It’s significant that the only desktop currently offered is GNOME on Wayland (although other desktops will be supported later) – it’s one of the larger and more complex desktops out there, with significant dependencies including parts of systemd, and he comments on the port from GNOME to FreeBSD was difficult and messy. Getting all of this to work on Chimera – and actually building in LLVM – trains the subsystems and helps uncover problems.

Youtube video

The talk contains a lot of discussion about hardening and error checking, as one might expect from someone whose main job is developing mobile web browsers and the like. Here LLVM and Clang allow for many additional error checks and hardenings beyond those of the GNU toolchain.

Examples are the ThinLTO connection time optimization and the integration of the LLVM Scudo Hardened Allocator in Musl.

Another focus is not just ripping out systemd and related tools like elogind, but reproducing their functionality – for example the Turnstile session tracker.

Chimera Linux is a project to watch – not just because it’s incomplete, but because it’s perhaps the most ambitious distro we’ve seen in many years. So far, it doesn’t even have an installer, although the steps to install it are documented.

Chimera has ambitious goals: as Kolesa says at the beginning, projects with a single goal fail because if they achieve it, there is no other way out. Chimera isn’t just a proof of concept, like a GNU-free Linux distribution, or an attempt to replace FreeBSD’s kernel with a different one while preserving everything else. Its goal is to create a viable alternative system that not only rips out some commonly accepted and used sub-components, but replaces their functionality in a cleaner and better way. ®

Leave a Reply

Your email address will not be published. Required fields are marked *