1 #!ipxe 2 isset ${net0/mac} && ifopen net0 && dhcp net0 || goto dhcpnet1 3 echo Received DHCP answer on interface net0 && goto proxycheck 4 5 :dhcpnet1 6 isset ${net1/mac} && ifopen net1 && dhcp net1 || goto dhcpnet2 7 echo Received DHCP answer on interface net1 && goto proxycheck 8 9 :dhcpnet2 10 isset ${net2/mac} && ifopen net2 && dhcp net2 || goto dhcpall 11 echo Received DHCP answer on interface net2 && goto proxycheck 12 13 :dhcpall 14 dhcp && goto proxycheck || goto dhcperror 15 16 :dhcperror 17 prompt --key s --timeout 10000 DHCP failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot 18 19 :proxycheck 20 isset ${proxydhcp/next-server} && set next-server ${proxydhcp/next-server} || goto nextservercheck 21 22 :nextservercheck 23 isset ${next-server} && goto netboot || goto setserv 24 25 :setserv 26 echo -n Please enter tftp server: && read next-server && goto netboot || goto setserv 27 28 :netboot 29 chain tftp://${next-server}/default.ipxe || 30 prompt --key s --timeout 10000 Chainloading failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot