package pxe import ( "fmt" "provisioning/internal/model" ) 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) return fmt.Sprintf(`#!ipxe echo Provisioning: booting %s on ${mac} echo Loading kernel... kernel %s ramdisk_size=16777216 vga=791 video=vesafb:lfb:on rw quiet splash=verbose rdinit=/pxe-init initrd=initrd echo Loading initrd (this may take a few minutes)... initrd --name initrd %s echo Booting... boot `, img.Name, kernelURL, initrdURL) }