Add all-in-one Ubuntu Server 26.04 + kiosk install ISO builder

iso/build-iso.sh remasters the official 26.04.x live-server ISO (downloaded
and checksum-verified, or --iso PATH) with xorriso, replaying its BIOS/UEFI
boot records unchanged. It adds:

- /autoinstall.yaml: Subiquity autoinstall that answers locale/keyboard/SSH
  and by default leaves only network, storage and identity interactive
  (--username/--auto-storage/--auto-network/--no-confirm/--fully-automatic
  make those automatic too). late-commands copy the repo (a clone of the
  current HEAD) to /opt/ubuntu-based-kiosk and enable a first-boot service.
- iso/firstboot/kiosk-firstboot(.service): on first boot, takes tty1, waits
  for cloud-init and internet, copies the repo to the admin user's home and
  runs ./install.sh as that user with temporary passwordless sudo (removed
  on every exit path). Failed/interrupted installs re-run next boot.

install.sh hooks for this:
- KIOSK_UNATTENDED=1 makes ask_yes_no take each prompt's default and skips
  the Core Settings menu (--unattended).
- KIOSK_PROVISION_DONE_MARKER is touched by provision_finish before the
  reboot prompt, so the caller can tell a finished install from an
  interrupted one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cjz8a58eB5P9sUweqd3NHm
This commit is contained in:
Claude
2026-10-03 01:18:54 +00:00
parent 08b33ef823
commit aee6b779eb
7 changed files with 648 additions and 1 deletions
+12 -1
View File
@@ -268,7 +268,11 @@ provision_configure_kiosk_settings() {
echo "password protection, WiFi, and schedules. Skip and configure"
echo "later via ./install.sh if you'd rather do this after reboot."
echo
if ask_yes_no "Configure Core Settings now?" "y"; then
if [[ "${KIOSK_UNATTENDED:-0}" == "1" ]]; then
# The menu itself is interactive - no default to take. Sites etc
# are set afterwards via the Web UI or ./install.sh instead.
log_info "Unattended install - skipping Core Settings (configure later via the Web UI or ./install.sh)"
elif ask_yes_no "Configure Core Settings now?" "y"; then
core_settings_menu
fi
@@ -297,6 +301,13 @@ provision_finish() {
echo "(CUPS, LMS/Squeezelite, Remote Access, Authelia, Asterisk Intercom),"
echo "or Advanced options."
echo
# Lets a caller (iso/firstboot/kiosk-firstboot) tell a finished
# install apart from an interrupted one - is_kiosk_installed is
# already true from step 4 on, and the reboot below can kill the
# caller before it sees this function return.
if [[ -n "${KIOSK_PROVISION_DONE_MARKER:-}" ]]; then
sudo install -D -m 644 /dev/null "$KIOSK_PROVISION_DONE_MARKER"
fi
if ask_yes_no "Reboot now to start the kiosk?" "y"; then
echo "Rebooting in 3 seconds..."
sleep 3