L2 system

[  OK  ] document parsed
[  OK  ] styles applied
[ WAIT ] waiting for assets

Preparing page…

minimal linux

01 Linux distribution · x86_64

A minimal Linux system, built from scratch to boot to a shell in 16 MiB of memory.

QEMU verified · BIOS + UEFI

For x86_64 PCs: boot from USB or optical media, then install to a local disk.

Image
9.12 MB
Idle memory
15.49 MiB
Init
rcl2
Userspace
static musl

02 Overview

Small by construction.

L2 is a compact Linux distribution assembled around a single supervisor and a static userspace. It boots from read-only media, pivots into a 107 KB initramfs, and keeps in memory only what the running system needs.

One supervisor

rcl2 runs as PID 1 and stays resident. There is no service manager layered above it and no second init to replace it.

Static by default

The shell, utilities, package manager and system tooling are static musl binaries. gcompat covers prebuilt glibc programs.

Measured, not assumed

Every figure on this page comes from the project's measured specification, collected on QEMU TCG with standard virtual hardware.

03 Specification

Measured specification

Boot and memory figures were collected under QEMU TCG with E1000 networking, a standard VGA adapter and a static musl userspace.

System
Initrcl2, freestanding PID 1
BootloaderLimine, BIOS and UEFI
Shell and utilitiesdash, minibox
C librarymusl; gcompat 1.1.0
Package managerl2pm (.l2pm, .l2p)
Live rootread-only, 107 KB pivot initramfs
Images and memory
ISO image9,123,840 B (9.12 MB)
Installed payload7,082,129 B (7.08 MB)
Idle memory15.49 MiB installed
15.39 MiB live
Free at idle~520 KiB installed
~620 KiB live
Tested allocation16 MiB
Recommended launcher32 MiB BIOS
128 MiB UEFI

Idle figures include the kernel and reserved memory. The kernel profile uses a single CPU and reduced hardening. The live image boots in BIOS and UEFI modes and includes a disk installer. Real-machine compatibility has not yet been verified; under 1 MiB remains available to applications at idle.

04 Architecture

One binary, two cores.

rcl2 is the init. It starts userspace as PID 1, supervises it, and remains the only resident process of its kind.

C core

Raw syscalls through syscall(2): fork and exec, wait and reap, signals, mounts, console and reboot(2). No libc is linked.

Rust core

A #![no_std] core with no external crates. It parses /etc/rcl2.conf, the kernel command line and /proc/self/statm.

Shared ABI

A pinned #[repr(C)] contract between both cores. Layout assertions are compiled into C and Rust and checked from both sides.

Drop-in init

Replaces the original script/init/init.c with the same mounts, console wording and L2# prompt. l2.rescue=1 opens a rescue shell.

L2 boot flow Limine loads a 107 kilobyte pivot initramfs, which mounts the read-only root and executes rcl2 as PID 1. rcl2 starts the console shell. Limine BIOS · UEFI initramfs 107 KB pivot pivot_root read-only root rcl2 PID 1 shell serial · VT boot sequence

The build path is deliberately non-GNU: clang, rustc, ld.lld and LLVM binutils.

05 Userspace

Everything present is used.

The installed payload is 7.08 MB. This is nearly the complete inventory.

L2# l2fetchExample output · values vary by machine
OS        L2 Linux
Host      l2
Kernel    7.2.11
Init      rcl2 (PID 1)
Session   live media
Uptime    3m
Shell     /bin/dash
Terminal  linux
Memory    15.4 MiB / 16.0 MiB
Disk /    5.2 MB / 64.0 MB
CPU       QEMU Virtual CPU
dash
POSIX shell, statically linked.
minibox
Core utilities in a single musl-static binary.
l2pm
Packages from .l2pm recipes into .l2p archives (newc-cpio + gzip); add, list and remove.
l2fetch
System summary with an ASCII logo.
mdev
Device management in BusyBox daemon mode.
udhcpc
DHCP client, BusyBox applet.
storage tools
cfdisk, mke2fs and mkfs.vfat, statically linked.
gcompat
glibc compatibility with the musl loader for x86_64 binaries.
console shells
One resident shell at boot; a local VT starts on first key press.

06 Getting started

Boot it in a VM.

Run the launcher from the repository root. QEMU is the supported path; the BIOS profile needs 32 MiB and the UEFI profile 128 MiB.

bash script/run.sh bios window
L2#
Resident shell, serial when configured; the local VT starts on first key press.
poweroff
Accepted directly by rcl2.
l2.rescue=1
Kernel flag that opens a rescue shell.
l2pm help
Package manager usage.

07 FAQ

Questions

Does L2 run on real hardware?

L2 is designed for x86_64 PCs. The live image supports BIOS and UEFI boot and includes an installer for local disks. Hardware compatibility has not yet been tested; boot and installation results so far come from QEMU.

Why is there no glibc?

Native tooling is static musl. glibc-linked x86_64 binaries run through gcompat 1.1.0 with the musl loader; pthread, math and getpwuid usage are verified.

How are packages built and installed?

l2pm consumes .l2pm recipes and produces .l2p archives, which are newc-cpio images compressed with gzip. It can pack, add, list and remove packages.

How much memory should I allocate?

16 MiB is enough to boot and leaves under 1 MiB for applications. The recommended launcher allocations are 32 MiB for BIOS and 128 MiB for UEFI.

What happens if the system breaks?

Set l2.rescue=1 for a rescue shell. Offline and recovery boot paths are part of the verified checks.