sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

commit 31fb79adb32dbc5770ff1553d6573af358022239
parent 8af704b5839c72333f5b7a9a207b81cb4ad5f11a
Author: Divan Visagie <me@divanv.com>
Date:   Fri, 20 Nov 2026 22:33:13 +0100

Docs: ADR-0010 (proposed), a live installer built from the image

What a live-CD installer takes, from the container-native ISO contract and titanoboa, how far fedora-bootc:45 is from the contract (checked: dracut-live, xorriso, isomd5sum and GRUB's EFI binary are missing), the open questions (the user account, the published image, Secure Boot, the disk layout) and the order of work.

Diffstat:
Adocs/adr/0010-a-live-installer-built-from-the-image.md | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 109 insertions(+), 0 deletions(-)

diff --git a/docs/adr/0010-a-live-installer-built-from-the-image.md b/docs/adr/0010-a-live-installer-built-from-the-image.md @@ -0,0 +1,109 @@ +# 0010. A live installer, built from the image + +Date: 2026-11-20 + +## Status + +Proposed. The user wants a live-CD installer: boot a stick, see the Patina desktop, install from +it. This records what was found about building one and what is still unknown. Nothing here has +been built; "checked" means looked at on 2026-11-20, "unchecked" means taken from a README. + +## Context + +Everything so far installs the image with `linux/vm/disk.sh`, which loop-mounts a disk file and runs +`bootc install to-disk` in it. That is a test rig: it needs Docker, a registry on the host and a +`dev` image with a login. A user needs a stick that boots, offers to install, and leaves a machine +that follows our published image ([ADR-0009](0009-seflos-a-fedora-bootc-image-on-btrfs.md)). + +ADR-0008 (superseded) had the same idea for a ZFS stream: a stick that boots the OS itself. What is +new is that a way to build one from a bootc image exists. + +### What exists + +- **A container-native ISO contract** ([ondrejbudai/bootc-isos](https://github.com/ondrejbudai/bootc-isos), + v0.1.0, an experiment by an osbuild maintainer). The image provides its own kernel, initramfs, shim + and GRUB; `image-builder` (osbuild's `image-builder-cli`) turns it into an ISO with the `bootc-generic-iso` + type, embedding the image as `/LiveOS/squashfs.img`. The image configures GRUB and the initramfs to + load that squashfs (`root=live:CDLABEL=...`, `rd.live.image`) through `/usr/lib/bootc-image-builder/iso.yaml`. + `--bootc-installer-payload-ref` copies a second image into the live system's container storage: an + offline installer. Its examples include Bazzite's live ISO with an offline installer, Kinoite, + Bluefin LTS, a tiny Debian and Ubuntu, and `fedora-payload`, "a minimal text-based Fedora bootc + online installer" (unchecked). +- **titanoboa** ([ublue-os/titanoboa](https://github.com/ublue-os/titanoboa)), which Universal Blue + uses for Bluefin: a GitHub Action and a `podman run` that build a live ISO from a bootc image that + follows the same contract. Its stated aims are a live CD to try the image, and installing it to a + chosen disk with little input (unchecked). +- `image-builder-cli`'s latest release was v69 (2026-06-17). I could not confirm from its repository + that `bootc-generic-iso` is in a release, nor the exact option names (the code search returned + nothing): the contract's README says a fairly new `image-builder` is needed and suggests building + its container. + +### How far our image is from the contract (checked, in `fedora-bootc:45`) + +| The contract wants | Our base | +|---|---| +| kernel and `initramfs.img` together in `/usr/lib/modules/*/` | there | +| shim and GRUB under `/usr/lib/efi/shim/*/EFI/fedora` | `shimx64.efi`, `mmx64.efi` there; **`gcdx64.efi` (GRUB) is not** | +| GRUB modules in `/usr/lib/grub/i386-pc` | there | +| `podman`, `mksquashfs`, `grub2-mkimage`, `python` in the image | there | +| `xorriso` and `implantisomd5` in the image | **missing** | +| `VERSION_ID` in `os-release` | `45`, there | +| an initramfs that can boot a live squashfs | **missing**: `dracut-live` is not installed | +| `/usr/lib/bootc-image-builder/iso.yaml` | **to write** | + +So the gaps are packages (`dracut-live`, `xorriso`, `isomd5sum`, probably `grub2-efi-x64`), a +regenerated initramfs, and `iso.yaml`. + +## Decision (proposed) + +- **A `live` target in the Containerfile**, built from `system`, so the installed image stays clean. + It adds `dracut-live` and regenerates the initramfs with it, the ISO tools, GRUB's EFI binary, + `iso.yaml`, a `liveuser` that logs into the Patina session by itself, and the installer. +- **The ISO is built with `image-builder`'s `bootc-generic-iso`**, or with titanoboa if that is not + yet usable, from the `live` image, with the `system` image as the payload, so installing needs + no network. The result is a squashfs of the live system plus the payload: the size is unknown, and + a guess is several GB. +- **The installer starts as a script**, run from a terminal or a desktop launcher, that lists disks, + asks to wipe one and runs `bootc install to-disk --filesystem btrfs` from the payload, with + `--target-imgref` set to the published image so the machine updates from there. A Patina app + (egui, in the family of Files and Settings) replaces it once the pipeline works. +- **The first test loop is QEMU**: boot the ISO with OVMF, install onto a blank virtual disk, shut + down, boot the disk, log in. + +## Open questions + +- **The user account.** The image has no user. `bootc install` has no option to make one, as far as + I know. The choices are a first-boot setup app that makes it (a Patina "welcome" screen), or the + installer writing the account into the installed system's `/etc` and `/var/home` after the + install. Needs a look at what `bootc install` offers (kickstart-like config, `to-filesystem`). +- **Where the published image lives**, and who builds it: `ghcr.io/Sector-F-Labs/...` from CI, + with signatures. The installer's `--target-imgref`, the update policy and the registry's trust + all hang on this. +- **Secure Boot.** The ISO would boot through Fedora's signed shim and GRUB (unchecked); whether a + rewritten initramfs and our own kernel arguments pass depends on how the shim is set up. +- **The disk layout:** Btrfs subvolumes and compression, optionally LUKS. `bootc install` options for + these are unchecked; a layout of our own may need `to-filesystem`. +- **Branding:** the early boot messages still say "Fedora Linux" until the initramfs is rebuilt, and + a live ISO rebuilds it anyway, so this may come free. +- **Does the live session fit in the squashfs and RAM:** the desktop was only ever tried in the VM + with software rendering. + +## Order of work + +1. **A live ISO that boots to a login in QEMU**, from the contract's `fedora-payload` example or a + copy of our image with the missing packages. This proves the pipeline and the tool. +2. **Our own image as the live system**, with the Patina session and `liveuser`. +3. **The installer script**, installing the payload onto a virtual disk that then boots. +4. **The user account**, by whichever way the open question settles. +5. **Publishing and CI**: the image on a registry, the ISO as a CI artifact, the installer pointing + at the published image. +6. **The Patina installer app**, and the branding. + +## Consequences + +- The test rig stays for development; the installer is a separate path that shares the Containerfile. +- The ISO carries the whole system image, so it is big and rebuilt with every release. +- It depends on `image-builder`'s ISO support being usable, which is young and described as an + experiment; titanoboa is the fallback. +- Building ISOs needs rootful podman (the contract's tools run in a container), so the host needs + podman, which this machine does not have.