Skip to content

Instantly share code, notes, and snippets.

@EntropyWorks
Last active June 20, 2016 20:27
Show Gist options
  • Save EntropyWorks/6fb85561b12d007fa97ff02f99991975 to your computer and use it in GitHub Desktop.
Save EntropyWorks/6fb85561b12d007fa97ff02f99991975 to your computer and use it in GitHub Desktop.
#!ipxe
set redacted-version 2016-04-20.v01
set domain-name host.example.net
set base-url http://x.x.x.x
prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE command line... && shell ||
:retry
ifconf -c dhcp || goto retry
:MENU
menu
item --gap -- --------------- iPXE ${picasso-version} -------------
item --gap -- ${serial} ${product}
item --gap -- ${ip} ${netmask}
item
item coreos iPXE Boot CoreOS
item
item advanced Advanced Menu
choose --default coreos --timeout 30000 target && goto ${target}
:advanced
menu
item --gap -- --------------- iPXE Advanced -------------
item
item hostinfo Host Info
item
item coreos-chain Chain boot CoreOS
item coreos-ram Boot CoreOS ISO ram disk
item
item dban Wipe ALL data with DBAN
item
item shell Enter iPXE shell
item exit Exit to BIOS
item
item MENU Main Menu
choose target && goto ${target}
:coreos
kernel ${base-url}/coreos/coreos_production_pxe.vmlinuz hostname=${serial} domain=${domain-name} cloud-config-url=${base-url}/coreos/node/${serial} console=tty0 console=ttyS0 coreos.autologin=tty1 coreos.autologin=ttyS0 vga=790
initrd ${base-url}/coreos/coreos_production_pxe_image.cpio.gz
boot ||
goto MENU
:coreos-chain
chain ${base-url}/coreos/core.ipxe ||
prompt
goto MENU
:coreos-raw
initrd ${base-url}/coreos/coreos_production_iso_image.iso
chain memdisk iso raw ||
goto MENU
:dban
kernel ${base-url}/iso/dban.bzi nuke="dwipe --method quick"
boot ||
goto MENU
:shell
shell ||
goto MENU
:hostinfo
echo This computer : ||
echo MAC address....${net0/mac} ||
echo MAC address....${net1/mac} ||
echo MAC address....${net2/mac} ||
echo MAC address....${net3/mac} ||
echo IP address.....${ip} ||
echo Netmask........${netmask} ||
echo Serial.........${serial} ||
echo Asset number...${asset} ||
echo Manufacturer...${manufacturer} ||
echo Product........${product} ||
echo BIOS platform..${platform} ||
echo ||
echo press any key to return to Menu ||
prompt
goto MENU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment