roadmap PARTIAL

515. The installer: a stick that puts itself on the machine's disk and is then not needed

(Number provisional until the merge queue lands it.) Promoted from the proposal the-installer-a-stick-runs-to-put-itself-on-the-disk, filed 2026-09-19, on calef's instruction of 2026-09-20 to give every proposal on main a number. The text below is the proposal's own, unedited, by the promotion rule. Written by milestone 198 (a package manager, and the trivial install)'s rungs lane (milestone/198-rungs-to-a- trivial-install) for rung 2 of the trivial install DECISIONS §157 (a trivial install is a web page,) defines. §157's table names the installer as owned by no milestone; this is the proposal for it.

The on-disk layout of an installed system is read by every later nife that boots from that disk, so once a stranger has installed it is a format (the layout fork below, options only). The mechanism is reversible and is recommended. The bench half also needs milestone 261's disk wipe, which is calef's act.

Status, 2026-10-03: the QEMU half is built, and this block said NOT-STARTED for twelve days

Exit criterion 1 was built on 2026-09-21 in #1056 (cargo xtask install-boot, account in notes/installing.md). The slots followed in milestone 525 (a bad upgrade cannot brick the machine: two boot slots, tries and priority) and milestone 554 (a good upgrade sticks: what marks a trial boot successful). This block was never moved, so it read NOT-STARTED while its own text below said "Rung 2a was built". Re-run on main at e613c520 on 2026-10-03:

gate result wall time, warm, on patagonia
cargo xtask install-boot PASS: offer, INSTALL, partition, mkfs, then the stick-less boot reads made-on-target (1 10 57) 42.5 s
cargo xtask rollback-boot PASS: a doomed slot 1 is abandoned, slot 0 boots by itself not timed
cargo xtask confirm-boot PASS: a good trial boot marks itself successful not timed

All three are x86_64 under OVMF. aarch64 and riscv64 have no installer. The gap is milestone 568 (the boot file has nowhere to go on a device-tree machine); the riscv64 file name it also needed is milestone 560 (a long file name, or riscv64 cannot be installed), built. Criteria 2 and 3 are hardware; criterion 2 was met on 2026-10-04 (see Follow-on), and criterion 3 is what keeps this PARTIAL.

The layout ruling

Milestone 198's rulings table lists install layout as open, and milestone 525's BUGS calls the on-disk format provisional. One layout is now built (data first, two 64 MiB raw boot slots, a 512 MiB FAT32 ESP holding the chooser), so the ruling is "ratify this, and pick a slot size". The seven questions are answered in the layout ruling. The slot size has the least room: the boot file grew from about 10 MiB to 15.6 MB in twelve days, and an installed disk cannot grow its slots.

What an install has to do, and how little of it is new

The finding that sizes this proposal: an installed system can boot the same single file the stick boots. uefi_loader carries the kernel and the userspace archive inside BOOTX64.EFI (uefi_loader/src/main.rs, "The kernel is embedded rather than loaded from the filesystem"), and a boot with no filesystem still reaches the prompt (crates/system_initializer, the "4 without a disk, 5 with one" slot comments). So an install is four steps, and the tree already has two of them:

Step What exists What is missing
1. Write a partition table components/src/disk_partitioner.rs (milestone 57 (partitioning and formatting a real drive, and extended attributes)): writes a GPT with both copies, draws GUIDs from an entropy endpoint, holds one disk and nothing else It writes one hard-coded layout for a 64 MiB disk (file_system_contract::fixture::blank: ESP, a Linux partition, nife data). A layout computed from the disk's size
2. Make the data filesystem redoxfs_server/src/bin/mkfs.rs (milestone 57): finds the nife data partition by §45's type GUID and creates RedoxFS inside it, bounded by a PartitionDisk Nothing for step 2 itself
3. Put BOOTX64.EFI on the EFI system partition Nothing: there is no FAT writer (milestone 140's FAT32 stratum is NOT-STARTED and read-first) Both the bytes of the file and a way to write FAT
4. Make the firmware boot the disk Nothing A boot entry, or reliance on the firmware's fallback path

And two pieces the installed system needs on its next boot, found by reading the boot path rather than assumed:

The problem nobody had written down: the running system does not have its own file

Step 3 needs the bytes of BOOTX64.EFI, and the running system does not hold them. The loader places the kernel's segments and hands over the archive as a module, then exits boot services; the PE file that contained both is gone. And the file cannot be put inside the archive, because the file contains the archive. So the installer needs a way to read the stick, and the options are:

Shape Cost Kept or lost
R1. The loader hands its own file over Before ExitBootServices, uefi_loader opens its own file through the firmware (the loaded-image protocol names the device it came from, and the simple file system protocol reads it; both UEFI-standard, from the specification as recalled, not re-read) and passes the ~10 MB of bytes as a second module beside the archive Two protocols added to a loader that uses seven function pointers today (uefi_loader/src/efi.rs); one more handoff field (machine_discovery, rule 7); the kernel hands the bytes to the installer as a read-only blob, which is milestone 233's precedent for login Recommended. Smallest, and nife still does the install
R2. nife reads the stick itself USB mass storage over milestone 242's host controller, then milestone 140's FAT32 reader 242 is "months" by its own account and declines USB storage explicitly; 140's FAT32 is unbuilt Lost for this rung: it makes rung 2 wait on the largest driver in the project for a file the firmware can read in one call
R3. The installer is a UEFI application Runs before nife, writing the disk through the firmware's block I/O Every step above rewritten against firmware protocols; nothing of milestone 57's confined partitioner and mkfs is used Lost: it discards the one part of this that demonstrates anything (a partitioner holding one disk and no path to type), and §157 says the minimal system installs itself

The equal-cost test, from §92 (a caretaker is supervised by the client it serves). R1 would still be chosen at equal cost: it keeps the authority story (the installer holds one disk, one entropy endpoint and one read-only blob) and adds no driver whose only job is to re-read what the firmware already read.

The layout, which is the irreversible half (options, no winner)

Layout What it buys What it costs
L1. ESP plus data GPT: an EFI system partition holding BOOTX64.EFI, and one nife data partition (§45) for everything else The fewest moving parts. The same shape as milestone 57's fixture less its Linux partition An upgrade rewrites the one file in place, so a bad upgrade has no previous file to fall back to
L2. ESP with two slots plus data As L1, but the ESP holds the current and the previous BOOTX64.EFI (two names, and a boot entry or a small chooser for each) A bad upgrade can be undone by booting the other file, which is what the activation fork's A2 wants at package level, one level down (Fuchsia's A/B slots and OSTree's previous deployment are the prior art the activation proposal already read) Twice the ESP space, and a rule for which slot is current, which is itself a format
L3. ESP with a small loader, system on a raw partition The ESP carries a loader that reads the kernel and archive from a raw nife boot partition The ESP stops changing on upgrade; slots move into a partition nife owns A second loader, and a raw-partition reader in it; the most new code of the three

Two constraints hold for all three and are recorded rather than decided:

The ESP's contents, and the boot entry (reversible, recommended)

Writing FAT without a FAT writer. A host tool builds an ESP image with the file's clusters preallocated and contiguous and its bytes left zero. The archive carries that image (it contains no copy of the file, so it does not contain itself). The installer writes the image into the ESP, then writes R1's bytes at the one offset the host tool recorded. That is a layout two programs agree on, both in this tree, so it is reversible. And it is fragile in the way it looks: it is a stand-in for milestone 140's FAT32 write half and should say so at the call site.

The boot entry. Two ways, and the cheap one is unmeasured:

Recommendation: B1 first and measure it, on xenon and on one machine from milestone 243's fleet; B2 only if a firmware refuses. Would B1 still be chosen at equal cost? Yes: a system that needs no firmware variable survives a firmware reset and a disk moved to another machine.

What a stranger's machine most plausibly has

A judgment, not a measurement. An NVMe disk, on anything sold in the last several years; xenon's is a Micron 2450 NVMe 256GB on M.2 with SATA in AHCI rather than RAID (notes/xenon-firmware.md). Two cases this proposal does not cover, recorded in BUGS below: SATA disks, which need an AHCI driver nothing owns. And NVMe hidden behind Intel RST or VMD ("RAID On" in many laptops' firmware), which milestone 261 already names as the reason xenon's AHCI setting mattered.

Exit criteria a stranger could check

  1. Under QEMU: OVMF boots the stick image with an empty NVMe disk attached. The installer runs, asks for confirmation naming the disk, partitions, formats and copies. The machine reboots with the stick detached and reaches the prompt. A file written before the reboot reads back after it. One cargo xtask gate, in the shape of uefi-boot.
  2. On xenon, the same with a photograph, after milestone 261's wipe and bench boot.
  3. On one machine that is not xenon, from milestone 243's fleet, which is what makes it a claim about PCs rather than about one Dell.

Size, honestly

One milestone for the QEMU half: a computed layout in place of the fixture, R1's handoff and blob grant, the ESP template tool, the installer program, the boot mount of a partition off NVMe, and the gate. The bench half is milestone 261's remaining step plus one boot. It depends on milestone 261 (the NVMe driver leaves the kernel)'s bench step, and no longer on a-block-roster-that-can-name-an-nvme-disk.md, which rung 2a proved unnecessary by handing the endpoint over directly. It does not depend on the network, on packages, or on milestone 242. An installer that asks for confirmation over the serial console is rung 2 on xenon, and the same installer at a USB keyboard is rung 2 on a stranger's PC once rung 1 has one.

BUGS

Follow-on

Index row

The finding that sizes this proposal: an installed system can boot the same single file the stick boots.