Files
homelab/scripts
darmanandClaude Opus 4.8 f675c628a8 deploy: pass init= on the EFI-stub cmdline (stage 2 init not found)
findiso now works — the installer loop-mounted the iso, mounted the store
squashfs and the overlay — then died with:

  stage 2 init script (/mnt-root//init) not found

The live ISO's root is a tmpfs; stage 1 locates the real system's init via
init=<toplevel>/init, which the grub/isolinux menu supplies on a normal boot
(iso-image.nix:47,159). EFI-stub-booting our own cmdline off the ESP, we
never passed it, so stage 1 fell back to /mnt-root/init on the empty tmpfs.

Build the installer-iso toplevel and prepend init=$toplevel/init to the
cmdline (both boot modes). That path resolves once the store squashfs mounts,
because the iso carries the full closure of its own toplevel. Also switch
root=fstab -> root=LABEL=<volumeID> to match what the ISO menu passes (findiso
overwrites /dev/root regardless), and add boot.shell_on_fail for a shell
instead of the reboot/ignore prompt if stage 1 ever fails again.

Verified: the generated cmdline carries init=/nix/store/<toplevel>/init and
that store path contains /init.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 11:09:15 +02:00
..