Files
os-build/installer/README.md
Blake Ridgway 7a3a245d36 fix: give the live session user access to the console VT
Xorg failed to start with:

    (EE) xf86OpenConsole: Cannot open virtual console 1 (Permission denied)

udev leaves console VTs as 620 root:tty — group tty has write-only, so
even a tty-group member can't open /dev/tty1 read+write (display managers
normally get this via logind seat ACLs, which a manually-started X
doesn't have). The session script now chowns the dedicated VT to
liveuser before starting X; the unit already Conflicts with getty@tty1 so
nothing else needs it.
2026-08-21 20:38:25 -05:00

79 lines
2.8 KiB
Markdown

# Arcline graphical installer
`installer/arcline-installer` is the GTK3 frontend that the live ISO boots
into. It is a thin wrapper around `scripts/deploy-disk.sh` — the same,
auditable deploy core the scripted installer and disk-image builder use.
## How it works
```
boot ISO → live session (Xorg on vt1) → installer window
pick target disk → confirm device path → deploy-disk.sh → reboot
```
The installer extracts `install/arcline-<edition>.tar.xz` (the *clean* rootfs
archive staged on the ISO by `build-iso.sh`) to a temp dir and runs:
```
/usr/lib/arcline/scripts/deploy-disk.sh <device> <rootfs> <edition> --boot <bios|efi>
```
streaming the deploy log into the window. Everything destructive lives in
`deploy-disk.sh`, which the live image ships (with its dependencies) at
`/usr/lib/arcline`:
```
/usr/lib/arcline/scripts/{common,deploy-disk,apply-fstab}.sh
/usr/lib/arcline/btrfs/init.sh
/usr/lib/arcline/editions/{server,workstation,cloud}/fstab
```
The layout mirrors the repo so the scripts' own path resolution works
unchanged.
## Building the ISO
```bash
make iso-server # or iso-workstation / iso-cloud
```
`build-iso.sh` builds the clean rootfs, then `build-live.sh` clones it into
`build/rootfs/<edition>-live` and layers on live-boot, a minimal X session
(openbox), the installer, and the deploy tooling. The live session rootfs is
**never** what gets installed — the installer always deploys the clean
archive, so what you end up with on disk is exactly the hardened system, not
the live session with the installer in it.
## Autostart
`overlays/live/etc/systemd/system/arcline-installer.service` starts
`arcline-installer-session` on boot. Modern Xorg (trixie 21.1.x) refuses to
run as root, so the session script:
1. hands the dedicated console VT to `liveuser` (`chown`, since udev leaves
VTs 620 root:tty which isn't readable by the tty group),
2. starts Xorg as the unprivileged `liveuser` on vt1,
3. grants root display access (`xhost +SI:localuser:root`),
4. runs the installer as root (it needs root for `deploy-disk.sh`).
When the installer exits, X and the session end.
## Manual run (for development / on a box without the ISO)
```bash
# on any Arcline system with the deploy tooling:
sudo /usr/local/bin/arcline-installer
```
The app refuses to run as a non-root user and errors if the deploy tooling is
missing.
## Notes
- Disk discovery uses `lsblk` (util-linux); read-only devices are hidden.
- Confirmation mirrors `scripts/install.sh`: you must type the exact device
path before the install button will proceed.
- Root is hidden by design; the installer runs before any user session.
- For UEFI machines, pick "UEFI" boot mode (or use `BOOT=efi` when building);
see `docs/secureboot.md` for signing the boot chain for Secure Boot.