Commit Graph

11 Commits

Author SHA1 Message Date
josh b1eab33b78 Switch from sanboot to kernel/initrd boot with PXE overlay for ISO download
build-and-push / test (push) Successful in 36s
build-and-push / build-and-push (push) Successful in 1m8s
sanboot makes the ISO visible to UEFI but invisible to the Linux kernel
after ExitBootServices(). Switch to direct kernel/initrd boot with a small
CPIO overlay containing /pxe-init — a shell script that loads NIC drivers,
configures DHCP, downloads the ISO via wget, and creates a loop device
before handing off to the Proxmox installer init.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 18:57:43 -04:00
josh 1bb6a44fc6 Activate Proxmox auto-installer by bypassing file-existence gate in GRUB config
build-and-push / test (push) Successful in 35s
build-and-push / build-and-push (push) Successful in 1m9s
The auto-installer menuentry was wrapped in 'if [ -f auto-installer-mode.toml ]'
which never evaluated true. Replace the condition with 'if true' to activate the
built-in auto-installer entry, and only add the answer-url to kernel lines that
already have proxmox-start-auto-installer (rather than modifying the graphical
install entry).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 18:27:59 -04:00
josh 8b3b2e874a Use chunked ISO search instead of reading entire 1.2GB file into memory
build-and-push / test (push) Successful in 39s
build-and-push / build-and-push (push) Successful in 1m15s
os.ReadFile on the ISO was OOM-killing the container. Switch to 8MB
chunked reads with overlap to handle matches spanning chunk boundaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 17:16:53 -04:00
josh fa570b1571 Strip comments and trailing whitespace from grub.cfg to fit modifications
build-and-push / test (push) Successful in 36s
build-and-push / build-and-push (push) Successful in 1m7s
The modified config was 75 bytes larger than the original (5798 vs 5723),
causing the in-place write to be rejected. Strip comment lines and trailing
whitespace to reclaim space for the added auto-installer kernel parameters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 17:05:26 -04:00
josh 82c637ccbb Fix ISO GRUB modification to search entire ISO and use robust kernel matching
build-and-push / test (push) Successful in 36s
build-and-push / build-and-push (push) Successful in 1m18s
Two fixes: (1) Search entire ISO for grub.cfg content instead of only at
2048-byte sector boundaries — catches the copy inside the EFI boot
partition image that UEFI firmware actually reads. (2) Match kernel lines
by GRUB 'linux' command prefix instead of requiring '/boot/linux' path.
Added detailed logging of original and modified grub.cfg content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 16:39:00 -04:00
josh f58ab9fab3 Add automated PXE installation via ISO GRUB modification and auto-answer endpoint
build-and-push / test (push) Successful in 35s
build-and-push / build-and-push (push) Successful in 1m20s
Modifies uploaded ISO's GRUB config in-place to set timeout=0 and inject
proxmox-start-auto-installer + answer-url kernel params, enabling fully
hands-off installation. Adds /api/boot/auto-answer endpoint that identifies
hosts by ARP-resolving the requester's IP to MAC address.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 14:28:10 -04:00
josh 994152bedf Use sanhook to expose ISO as block device during kernel/initrd boot
build-and-push / test (push) Successful in 35s
build-and-push / build-and-push (push) Successful in 1m12s
The CPIO-embedded initrd approach failed (too large for iPXE memory).
Instead, use iPXE's sanhook to connect the ISO as a SAN block device
before booting with kernel/initrd. The installer finds the ISO on the
SAN device while we retain control over kernel parameters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 14:09:12 -04:00
josh e2dd78d8f9 Embed ISO in initrd for PXE boot with loop-mount wrapper
build-and-push / test (push) Successful in 35s
build-and-push / build-and-push (push) Successful in 1m8s
Instead of sanboot (which can't pass kernel params for automation),
switch back to kernel/initrd boot. The ISO is embedded in the initrd
as a CPIO append. A pxe-init wrapper script loop-mounts the ISO
before handing off to the original init, so the installer finds it
as a block device. Uses rdinit=/pxe-init kernel parameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 12:11:18 -04:00
josh 81abb94806 Serve full ISO for PXE boot via proxmox-iso-url kernel param
build-and-push / test (push) Successful in 34s
build-and-push / build-and-push (push) Successful in 1m11s
The Proxmox installer needs the full ISO to access packages and
installer data. Previously the ISO was deleted after extracting
kernel+initrd. Now we keep it as original.iso and serve it via HTTP.
The iPXE script passes proxmox-iso-url=<url> so the installer
fetches the ISO over the network instead of scanning block devices.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-14 11:11:45 -04:00
josh 443a3db9e1 Add upload progress bar with SSE extraction status
build-and-push / test (push) Successful in 40s
build-and-push / build-and-push (push) Successful in 1m8s
ISO uploads now show a progress bar during file transfer (via XHR
upload.onprogress) and real-time extraction status (via SSE events
through the existing Hub). Falls back to plain form POST if JS is
disabled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-10 19:16:19 -04:00
josh 4774600040 Add boot image management with ISO extraction and serving
build-and-push / test (push) Successful in 34s
build-and-push / build-and-push (push) Successful in 1m7s
Upload Proxmox ISOs via API or dashboard UI, extract kernel+initrd
using pure-Go iso9660 library, store on disk, and serve over HTTP
for PXE booting. Dynamic kernel/initrd filenames per image replace
the previous hardcoded paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-09 21:26:31 -04:00