sector-f-linux

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

commit e2047954abbb81b53950795f27156d8f5b22aaf8
parent 90829d47ce88d503e960a8ca0b9c7b51919ab885
Author: Divan Visagie <me@divanv.com>
Date:   Sat, 21 Nov 2026 01:33:24 +0100

ADR-0014 (proposed): the live disc boots straight into the installer

No try mode and no desktop: greetd, cage and a Patina installer app (choose a whole drive, then the flask animation and a progress bar while it installs), an unprivileged app calling one root command behind a polkit rule, a live image built from the base and not the full system. Amends ADR-0010 and ADR-0011.

Diffstat:
Mdocs/adr/0010-a-live-installer-built-from-the-image.md | 3++-
Mdocs/adr/0011-the-first-boot-is-the-installer.md | 2+-
Adocs/adr/0014-the-live-disc-boots-straight-into-the-installer.md | 90+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 93 insertions(+), 2 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 @@ -4,7 +4,8 @@ Date: 2026-11-20 ## Status -Proposed, and amended by [ADR-0011](0011-the-first-boot-is-the-installer.md): the live installer only +Proposed, amended by [ADR-0011](0011-the-first-boot-is-the-installer.md) and again by +[ADR-0014](0014-the-live-disc-boots-straight-into-the-installer.md) (no desktop and no try mode: the disc boots straight into the installer), and amended by ADR-0011: the live installer only picks a target drive and puts the whole system on it, and the account is made by a setup assistant on the first boot, not by the installer. 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 diff --git a/docs/adr/0011-the-first-boot-is-the-installer.md b/docs/adr/0011-the-first-boot-is-the-installer.md @@ -4,7 +4,7 @@ Date: 2026-11-20 ## Status -Proposed, and its no-user-session question is answered in +Proposed, and [ADR-0014](0014-the-live-disc-boots-straight-into-the-installer.md) makes the live disc boot straight into the installer, with no desktop. Its no-user-session question is answered in [ADR-0012](0012-a-login-manager-of-our-own-greetd-and-a-patina-greeter.md): the setup runs in the login screen itself, a Patina greeter on greetd. The user's direction: a machine should be set up the way a Mac is. The system is put on a drive and expanded, and the first boot, when no user exists, runs a setup built into Patina. Amends diff --git a/docs/adr/0014-the-live-disc-boots-straight-into-the-installer.md b/docs/adr/0014-the-live-disc-boots-straight-into-the-installer.md @@ -0,0 +1,90 @@ +# 0014. The live disc boots straight into the installer + +Date: 2026-11-21 + +## Status + +Proposed (the direction is the user's; the details are mine). Amends +[ADR-0010](0010-a-live-installer-built-from-the-image.md) and +[ADR-0011](0011-the-first-boot-is-the-installer.md): the live disc has no "try" mode and no desktop, +and boots into the installer and nothing else. Nothing here is built; "to verify" marks what has +not been looked at. + +## Context + +ADR-0010 planned a live disc that boots the Patina desktop with an Install app on it, and ADR-0011 +cut the installer down to choosing a whole drive, leaving the account to the first boot. The next +idea was a welcome screen with two choices, Try and Install. The user cut that too: the disc boots +into the installer. That removes most of what the live system would have to carry, and makes the +live disc one job. + +The pieces already exist from [ADR-0012](0012-a-login-manager-of-our-own-greetd-and-a-patina-greeter.md) +and [ADR-0013](0013-the-greeter-is-a-patina-app-of-our-own.md): greetd runs a Patina egui app inside +`cage`, a kiosk compositor, with no window frame. The boot and shutdown splash is an animated +flask (ADR-0012, "The boot and shutdown splash"). + +## Decision (proposed) + +- **The live system boots straight into a Patina installer app**, `patina-installer`: greetd, `cage` + and the app, with no desktop session and no `liveuser`. It looks as the greeter does (Everforest, no + frame, pills) so the path from USB stick to first account is one visual language: splash, installer, + splash, first-run setup. +- **Its screens:** + 1. **Choose the drive**, as ADR-0011 has it: the whole drive only; each drive's model, size, serial and + what is on it (partition names, filesystem labels, a Windows or Linux install); never the drive + the live system booted from or one with something mounted; a confirmation that names the drive. + 2. **Installing:** the Sector F flask animation from the splash, in the middle, animating itself, and + under it a progress bar and a line saying what is happening, if the install reports progress it + can be followed (to verify: whether `bootc install` can, e.g. through a progress file + descriptor, or whether the bar has to count steps of our own: partition, copy, bootloader). If + it cannot be followed, the flask alone, with no bar that lies. + 3. **Done / failed:** a restart button, or what went wrong and how to try again. +- **The installer is unprivileged; one small root command does the install.** The app runs as an + ordinary user and calls `patina-install <drive>`, a script that runs `bootc install to-disk --wipe + --filesystem btrfs` from the payload on the ISO (offline, ADR-0010) with `--target-imgref` set to + the published image. A polkit rule allows that action to the live user only, and only on the live + disc. This is the route ADR-0012 chose for the first account (polkit, not a root helper service of + our own, which SELinux made expensive). +- **The live image is built from the base, not from the full system image:** it needs greetd, `cage`, + the installer, `bootc`, podman and what they link, not the Patina desktop, so the part that boots + is small. The ISO still carries the system image as the payload, so it is still several GB. +- **A text console stays on another VT** (Ctrl+Alt+F2) for when the installer cannot start. +- **After the install the machine restarts into the first boot** of ADR-0011: the greeter's first-run + setup makes the account. + +## What this gives up + +- **Trying it first.** Nobody can check that Wi-Fi, the display or the touchpad work before wiping a + drive. Accepted for now; a Try option can come back once the installer is solid. +- **A rescue desktop.** The disc is no longer a way to get a desktop and repair a machine. The + text console is what is left. + +## Open questions + +- **Progress.** Whether `bootc install` can report it (above). +- **The ISO tooling** of ADR-0010: `image-builder`'s `bootc-generic-iso` or titanoboa, and the gaps in + our base for it (`dracut-live`, `xorriso`, `isomd5sum`, GRUB's EFI binary, `iso.yaml`). +- **Installing from a payload in the ISO** needs podman storage in the live system with the image in + it (`--bootc-installer-payload-ref`); how `bootc install` takes `--source-imgref` from there is to verify. +- **Secure Boot,** and cage on odd GPUs (the installed greeter has the same question). +- **Several drives, and removable ones:** a USB stick or an SD card is a target the picker must not + offer by accident beyond the drive the live system booted from. +- **A partly done install** (power lost): the drive is wiped and has no system; the next boot of the + live disc must be able to start again. + +## Order of work + +1. **A live ISO that boots in QEMU to a placeholder** kiosk screen (greetd, cage, a stand-in app), + with two blank virtual disks attached. This proves the ISO pipeline and the tool. +2. **`patina-install` and its polkit rule,** run by hand on the two disks: the chosen one gets the + system and boots, the other is untouched. +3. **The installer app,** first with a mock like the greeter's, then on the real command; the flask + and progress screen; the drive picker and its safety rules. +4. The gaps above as they matter, and real hardware. + +## Consequences + +- The live disc is one job, and the installer is the only new app. The greeter does not get a live mode. +- The live system is small, so building and booting the ISO is quick to try, apart from the payload. +- The installer's look and the first-run setup's are the same, by reuse of the greeter's widgets + (move them into a shared module or crate when the installer needs them, as Patina does for components).