clawdie-iso/firstboot
Sam & Claude 4c60ed81e3 fix(installer): Phase A — stable ZFS, safe upgrades, module matrix
Four critical fixes before v1.0.0 VM test, informed by PC-BSD failure
modes and GhostBSD's improvements:

1. shell-zfs.sh: zpool labelclear on fresh install
   Clear ZFS labels from every device that was in the old pool before
   bsdinstall writes new ones. Prevents the "can't find pool by GUID"
   boot failure that made PC-BSD reinstalls unreliable.

2. shell-zfs.sh: pre-upgrade snapshot
   When operator selects Upgrade, take zfs snapshot -r
   pool@pre-upgrade-{timestamp} before any changes. One reboot to
   roll back if the upgrade goes wrong. UPGRADE_SNAPSHOT exported for
   downstream modules to reference.

3. shell-env.sh: never overwrite secrets on upgrade
   clawdie_shell_env_generate() now checks CLAWDIE_BOOT_MODE. In
   upgrade mode it calls clawdie_shell_env_append_new_keys() instead
   of regenerating — reads existing .env and appends only keys that
   are absent. Existing DB passwords, JWT secrets, API keys are never
   touched. This fixes the root cause of the orphaned-database bug:
   new passwords that don't match the existing pool's data.

4. firstboot.sh: module execution matrix via run_step_if
   New run_step_if "<modes>" wrapper marks steps as done without
   running them when not applicable to the current boot mode.
   Upgrade skips: gpu, nvidia, ssh, system, desktop, pf, tailscale
   Upgrade runs: pkg, env (append-only), npm-globals, deploy
   Prevents SSH key resets, rc.conf overwrites, and firewall rewrites
   during upgrade — all of which undid operator customisations.

Also adds INSTALLER-PLAN.md: full architecture plan for unified
GUI/TUI installer with Fresh / Upgrade / Repair modes, boot
environment support, and a clear phase roadmap to v1.1.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 20:04:22 +02:00
..
gui Set locale/keymap defaults and move npm globals to /opt 2026-06-04 20:04:22 +02:00
rc.d feat: initial clawdie-iso skeleton 2026-06-04 20:04:21 +02:00
firstboot.sh fix(installer): Phase A — stable ZFS, safe upgrades, module matrix 2026-06-04 20:04:22 +02:00
gpu-detect.sh feat: initial clawdie-iso skeleton 2026-06-04 20:04:21 +02:00
integration-test.sh feat(iso): bundle clawdie-ai node_modules for offline install 2026-06-04 20:04:22 +02:00
maintenance-mode.sh Harden firstboot scripts: POSIX fixes, quoting, offline pkg path 2026-06-04 20:04:22 +02:00
MODULE-MANIFEST.md feat(iso): bundle clawdie-ai node_modules for offline install 2026-06-04 20:04:22 +02:00
shell-deploy.sh fix(firstboot): run installer as root so rc.d service is installed 2026-06-04 20:04:22 +02:00
shell-desktop.sh Unify ISO and fix GPU installation gap (Sam & ZAI) 2026-06-04 20:04:22 +02:00
shell-env.sh fix(installer): Phase A — stable ZFS, safe upgrades, module matrix 2026-06-04 20:04:22 +02:00
shell-gpu.sh impl: Complete all 5 shell modules for v0.9.0 installer 2026-06-04 20:04:21 +02:00
shell-npm-globals.sh Set locale/keymap defaults and move npm globals to /opt 2026-06-04 20:04:22 +02:00
shell-nvidia.sh Unify ISO and fix GPU installation gap (Sam & ZAI) 2026-06-04 20:04:22 +02:00
shell-pf.sh Fix PF shell module and VPS test defaults 2026-06-04 20:04:22 +02:00
shell-pkg.sh impl: Complete all 5 shell modules for v0.9.0 installer 2026-06-04 20:04:21 +02:00
shell-ssh.sh firstboot: Add shell-ssh.sh module and restore shell-system.sh 2026-06-04 20:04:21 +02:00
shell-system.sh Set locale/keymap defaults and move npm globals to /opt 2026-06-04 20:04:22 +02:00
shell-tailscale.sh feat: recommend Tailscale with optional opt-out (Sam & Claude) 2026-06-04 20:04:22 +02:00
shell-zfs.sh fix(installer): Phase A — stable ZFS, safe upgrades, module matrix 2026-06-04 20:04:22 +02:00
vps-path-test.sh feat(iso): bundle clawdie-ai node_modules for offline install 2026-06-04 20:04:22 +02:00
zfs-pool-detect.sh Wire ZFS pool detection into firstboot pipeline (Sam & Claude) 2026-06-04 20:04:22 +02:00
zfs-pool-migrate.sh Wire ZFS pool detection into firstboot pipeline (Sam & Claude) 2026-06-04 20:04:22 +02:00