Created
December 2, 2016 16:47
-
-
Save AJNOURI/f678917b53e556380c6981bfeb22f997 to your computer and use it in GitHub Desktop.
ipxe script to request dhcp otherwise static config (https://www.youtube.com/watch?v=RYbv8ZYAIl4)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!ipxe | |
prompt --key 0x02 --timeout 10000 Press Ctrl-8 for iPXE command line... && shell || dhcp && goto netboot || | |
ifclose | |
echo -n Choose net0 or net1 or ...: ${} && read nic | |
set ${nic}/dns 8.8.8.8 | |
set ${nic}/netmask 255.255.255.0 | |
config ${nic} | |
ifopen ${nic} | |
goto netboot | |
:netboot | |
chain http://my.com/boot/main.ipxe || echo Error in iPXE chaining, try again 1 | |
chain http://my.com/boot/main.ipxe || echo Error in iPXE chaining, giving up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment