Switch to sanboot for PXE ISO delivery
Proxmox has no kernel parameter for HTTP ISO fetch. Instead, use iPXE's sanboot command to present the ISO as a virtual CD over HTTP. The installer finds it as a block device and boots normally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,17 +7,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func BuildIPXEScript(publicURL string, img *model.Image, mac string) string {
|
func BuildIPXEScript(publicURL string, img *model.Image, mac string) string {
|
||||||
kernelURL := fmt.Sprintf("%s/images/boot/%s", publicURL, img.KernelPath)
|
|
||||||
initrdURL := fmt.Sprintf("%s/images/boot/%s", publicURL, img.InitrdPath)
|
|
||||||
isoURL := fmt.Sprintf("%s/images/boot/%s", publicURL, img.ISOPath)
|
isoURL := fmt.Sprintf("%s/images/boot/%s", publicURL, img.ISOPath)
|
||||||
|
|
||||||
return fmt.Sprintf(`#!ipxe
|
return fmt.Sprintf(`#!ipxe
|
||||||
echo Provisioning: booting %s on ${mac}
|
echo Provisioning: booting %s on ${mac}
|
||||||
echo Loading kernel...
|
echo Booting ISO via HTTP SAN...
|
||||||
kernel %s ramdisk_size=16777216 vga=791 video=vesafb:lfb:on rw quiet splash=verbose proxmox-iso-url=%s initrd=initrd
|
sanboot %s
|
||||||
echo Loading initrd...
|
`, img.Name, isoURL)
|
||||||
initrd --name initrd %s
|
|
||||||
echo Booting...
|
|
||||||
boot
|
|
||||||
`, img.Name, kernelURL, isoURL, initrdURL)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user