Skip to content

Releases

v0.2.0 — The bundle checks itself

Choose a tag to compare

@github-actions github-actions released this 26 Oct 16:46

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.

v0.1.0 proved the pieces run together. This release is about the layers around
that proof: the machine now shuts itself down, the state disk decides what the
next boot starts, there is documentation for installing, upgrading and rolling
back, and a release can no longer attach an archive nobody has booted.

  • The release archive is booted before it is published. scripts/smoke-bundle.sh
    unpacks the bundle a release attaches, starts that, waits for ssh, runs a
    command in the guest, and requires the machine to power itself off. The
    release workflow runs it before gh release create, so a bundle that cannot
    come up, or cannot shut down, fails the tag instead of becoming a download.
    Reproduce it on any machine with qemu, e2fsprogs and openssh:

    ./scripts/smoke-bundle.sh dist/dictyonos-v0.2.0-x86_64-qemu.tar.zst
  • poweroff -f ends the machine. The kernel writes to isa-debug-exit,
    QEMU exits with status 33, and the launcher reports that as a poweroff
    instead of sitting until TIMEOUT. QEMU failures it cannot translate are
    now passed through as failures rather than mistaken for a clean shutdown.

  • The state disk decides which configuration boots. scripts/dictyonos-switch
    records generations on the state disk (nextboot, and the prevboot it
    replaced), and stage 1 starts the recorded one; dictyonos.rollback=1 puts
    prevboot back in front for one boot. The second boot of the acceptance is
    the proof: its kernel command line still names the image's configuration, and
    the recorded generation wins.

  • docs/INSTALL.md. Installing, upgrading, rolling back, recovering, and
    the disk-space and durability limits, written against what stage1-init.sh
    actually does.

  • Asterinas moved from pin 26cb04660e to 3ed4fc4374 (the commit after
    v0.19.0-13, now v0.19.0-35-g3ed4fc437; 22 commits, 33 files, +630/-174),
    unmodified, with the whole acceptance re-run on it. Of those commits the ones
    this machine can see: supplementary groups in DAC checks, fallocate on
    O_DIRECT files, a lock fix in UNIX datagram bind, set_tid_address, and
    PVH boot parsing VMM records without assuming alignment. The kernel's
    Cargo.lock, the toolchain and the vendor hash did not change, so the
    kernel is a source swap and nothing else.

  • QEMU CPU model follows the accelerator: host under KVM,
    Icelake-Server,+x2apic,+vmx under TCG. CPU= still overrides both.
    Previously the TCG default was set before the branch, so KVM never got
    host.

  • The bundle also carries ACCEPTANCE.md and flake.lock, and CI caches its
    build, so a release is assembled from a cache instead of from nothing.

This is a proof of concept, not a distribution: there is no installer, no
security response process, no INET wildcard bind, no background writeback (the
state disk is committed by a 30-second sync -f /var), and a repairing
e2fsck would damage the state disk. /dev/ptmx is still a symlink this
image has to create, because Asterinas' devpts only publishes the master at
/dev/pts/ptmx. The full list is in README.md and docs/INSTALL.md.

The transcripts in ACCEPTANCE.md were captured on the bundle's own pin: two
boots against one state disk, the host-side e2fsck -fn and debugfs reads,
and the rollback boot in CI. AUTO=1 nix run reproduces them from source.

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

Requires Nix with flakes enabled; QEMU and everything else comes out of the
flake. The prebuilt archive on this release needs only qemu, e2fsprogs and
openssh.

v0.1.0 — Initial Proof-of-Concept Release

Choose a tag to compare

@LinTrau LinTrau released this 16 Oct 17:59

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.