Skip to content

v0.1.0 — Initial Proof-of-Concept Release

Choose a tag to compare

@LinTrau LinTrau released this 16 Oct 17:59
· 17 commits to main since this release

A bootable QEMU machine that fuses Asterinas 0.19.0 (Safe-Rust framekernel,
Linux-ABI compatible) with sixos + infuse.nix (s6 / s6-rc instead of systemd
and instead of the NixOS module system) and Lix 2.94.2 as the
system-default nix. None of the three upstream trees is forked or patched.

Inside the guest /nix/store is writable: it is an overlayfs whose lower layer
is the read-only system image and whose upper layer lives on a persistent state
disk
, so store paths built or added in the guest are still there after a
reboot. Dropbear listens on port 22, forwarded to 127.0.0.1:2222 on the
host.

This is a proof of concept, not a distribution: there is no installer, no
upgrade path and no security response process.

AUTO=1 boots the machine twice against the same state disk and prints
==> acceptance passed:

claim evidence
Linux ABI on a framekernel uname -a -> Linux dictyonos 5.13.0 #1 SMP Thu Jan 1 00:00:00 UTC 1970 x86_64 GNU/Linux
build metadata is redacted /proc/version -> #1 SMP ... (dictyonos@builder)
no systemd readlink /proc/1/exe -> s6-svscan -- /run/service
Lix is the package manager nix --version -> nix (Lix, like Nix) 2.94.2, and nix eval --expr '1 + 1' prints 2
the store is writable nix store add-file and a real nix build, both on a read-only /dev/vda
state and builds survive a reboot boot 2 finds both store paths and the same dropbear host key
ssh works a live client handshake plus a command run through it

The full transcript of that run, including the host-side e2fsck -fn and
debugfs evidence, is in ACCEPTANCE.md. The same
acceptance runs in CI on every push.

Requires Nix with flakes enabled. Everything else, including QEMU, comes out of
the flake.

git clone https://github.com/LinTrau/dictyonos
cd dictyonos
nix run

The first build compiles the Asterinas kernel, builds Lix from source (its
seccomp sandbox is switched off, because Asterinas does not implement
seccomp yet), and packs a 596 MiB ext2 image: give it a few minutes. Then:

ssh -p 2222 root@127.0.0.1    # the launcher generates a throwaway key and injects it

Download dictyonos-v0.1.0-x86_64-qemu.tar.zst, verify it against
SHA256SUMS, then:

tar -I zstd -xf dictyonos-v0.1.0-x86_64-qemu.tar.zst
cd dictyonos-v0.1.0-x86_64
./start.sh                    # interactive serial console
AUTO=1 ./start.sh             # the two-boot acceptance above

The bundle carries the kernel ELF, the stage-1 initramfs, the ext2 root
filesystem and its kernel command line, so nothing is built or downloaded at
boot. It was tested with nix replaced by a stub that fails the run if it is
called at all: the full two-boot acceptance still passes, which is what makes
"No Nix" more than a claim. It needs a host with qemu-system-x86_64, e2fsprogs
(mkfs.ext2, e2fsck, debugfs) and openssh (ssh, ssh-keygen)
on PATH; /dev/kvm is used when present and emulation is used when it is
not. The writable state disk is created in ./.dictyonos-vm/state.ext2 on the
first run (EPHEMERAL=1 starts from a blank one, DICTYONOS_WORKDIR moves
it elsewhere). The archive is about 87 MiB and unpacks to about 410 MiB on disk.

The glue in this repository (the Nix expressions, stage1-init.sh and
scripts/) is MPL-2.0, matching Asterinas. The prebuilt rootfs.ext2
here is a compiled artifact, not source: it contains binaries built from
sixos and infuse.nix (GPL-3.0) and Lix (LGPL-2.1), together with s6
/ s6-rc / s6-linux-init (ISC), dropbear (MIT), busybox (GPL-2.0) and parts of
nixpkgs (MIT). Anyone redistributing this image or a derivative of it is
redistributing GPL-3.0 binaries and must honour those terms.

The exact upstream revisions are pinned in the flake.lock included both here
and in the source repository, so the corresponding source for every binary in
the image is obtainable from those revisions. The kernel ELF is likewise built
from the pinned Asterinas revision by nix build .#kernel.