Some Bits: Nelson's log

Small Linux distributions

Quick notes for further research on small Linux distributions that are none-the-less useful. See also this list of resources.

Components

MUSL is an alternative to GNU libc that is very small. It is a mature product that is actively maintained and used.

Of historical interest: dietlibc and uClibc. I think both are no longer being developed. See also this comparison of library features.

busybox is a set of userspace command line tools built into a small binary. It’s a mature product, widely used.

toybox is a rewrite of busybox with a non-GPL license. It presents itself as a reinvention / improvement as well and looks usable and under development. It’s about 740kb binary (compare 1110kb busybox) but has less implemented in it.

OpenRC, s6, runit are alternative init systems to replace systemd.

Linux distros

Alpine Linux is a MUSL and Busybox distribution. Very mature product and an enormous package database, it’s quite productive. The VM ISO image is 60MB.

glaucus is MUSL + Toybox. Just had their first ISO release recently, it’s 528MB (or 210MB compressed).

OS/1337 is a new project for a MUSL + Toybox Linux distro witih very ambitious binary size goals. No release, not clear if the developer’s enthusiasm will be matched by working code, but it’s got some well articulated ideas.

See projects using MUSL for a list of other Linux distros based on the small libc.

Wikipedia has a roundup of other small Linux distros. Worth splitting the CLI vs GUI distros, also those targeted at small RAM vs not.

What I haven’t found is a good list of really small glibc based Linux distros. busybox for instance still works with glibc, see these Docker images. When I looked at this in December I noticed that the locales and SSL were two major sources of space usage; those can easily be optimized.

Further afield

Beyond Linux from Scratch is a learning exercise, building a working Linux system from sources. Maybe a bit of overlap with Arch in being interesting for a source for ideas of a highly customizable Linux distribution. A stated goal of toybox is to allow building BLFS.

Unikernels are the idea of replacing a generic Linux operating system with a kernel specialized to run a single service as a single user. There’s a bunch of them, OSv is one I’ve read about a few times. NanoVMs are another cut at them; there’s some Proxmox support.

Distroless is one approach to building containers (for Docker) without shipping a Linux distribution inside the container. Makes particular sense for GoLang / Node / Java systems where you basically never interact with the user space tools.