#!ipxe
dhcp
echo == ManagedWay provisioning :: mac=${mac} ip=${ip} ==
iseq ${mac} a0:42:3f:4f:51:c8 && goto install ||
goto rescue
:install
echo == PVE 8.4 auto-install (c1u3s1) ==
set pbase http://${next-server}/pve/pxe-c1u3s1
kernel ${pbase}/vmlinuz ramdisk_size=16777216 rw quiet initrd=initrd.img splash=silent proxmox-start-auto-installer
initrd ${pbase}/initrd.img
initrd ${pbase}/proxmox-ve_8.4-1-auto-from-iso.iso proxmox.iso
boot
:rescue
set base http://${next-server}/sysrescue
kernel ${base}/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archiso_http_srv=${base}/ checksum=y copytoram=y sysrescuecfg=http://${next-server}/sysrescue.yaml ar_nowait ip=dhcp nofirewall rootpass=93a1f690815c
initrd ${base}/sysresccd/boot/x86_64/sysresccd.img
boot
