#!ipxe isset ${net0/mac} && ifopen net0 && dhcp net0 || goto dhcpall echo Received DHCP answer on interface net0 && goto nextservercheck :dhcpall dhcp && goto nextservercheck || goto dhcperror :dhcperror prompt --key s --timeout 10000 DHCP failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot :nextservercheck isset ${next-server} && goto netboot || goto setserv :setserv echo -n Please enter tftp server: && read next-server || goto error :setfilename isset ${filename} || echo -n Please enter filename: && read filename || goto error :netboot chain ${filename} || chain tftp://${next-server}/bootx64.efi || goto error :error prompt --key s --timeout 10000 Chainloading failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot