Files
main-desktop/iso/main-desktop-firstboot.service
T
ckochandClaude Opus 5 4739fb5e0d Add an unattended-install ISO builder
Boot the stick, pick one GRUB entry, walk away: it wipes the target disk, installs Ubuntu
26.04.1 with the NVIDIA driver and codecs, and runs setup.sh on first boot to install the
apps. build-iso.sh does the image surgery in a container, so the build machine needs nothing
but podman.

The wipe is pinned to one disk serial (the 990 PRO). The Data drive can't match it, and an
unmatched disk stops the install rather than guessing — so the stick can't eat another
machine either. The autoinstall entry is not the GRUB default, so an accidental boot lands in
the ordinary Ubuntu installer.

Verified by running the install in a VM with two virtual NVMe drives carrying the real
serials: unattended start to finish, target partitioned and installed, Data disk byte-for-byte
identical, and late-commands left /opt/main-desktop plus the enabled first-boot service in
place. Testing caught the autoinstall args landing after '---' (where they reach the installed
system instead of the installer, and do nothing), and the first-boot run adding root rather
than ckoch to the docker group, since runuser leaves $USER alone.

setup.sh gains an unattended mode for that first-boot run, waits out the dpkg lock that
Ubuntu's own boot-time upgrades hold, waits for snapd to finish seeding before removing the
Firefox snap, and skips the driver step on machines with no NVIDIA card.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 10:01:09 -04:00

19 lines
521 B
Desktop File

[Unit]
Description=main-desktop first-boot setup (apps, Flatpaks, mounts)
Documentation=file:/opt/main-desktop/README.md
Wants=network-online.target
After=network-online.target
ConditionPathExists=!/var/lib/main-desktop-firstboot.done
[Service]
Type=oneshot
ExecStart=/opt/main-desktop/scripts/firstboot.sh
# Installing ~12 GB of Flatpaks takes as long as it takes; the default 90s would
# kill it mid-download.
TimeoutStartSec=infinity
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target