Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
Created October 4, 2011 15:33
Show Gist options
  • Select an option

  • Save robinsmidsrod/1261950 to your computer and use it in GitHub Desktop.

Select an option

Save robinsmidsrod/1261950 to your computer and use it in GitHub Desktop.
ubuntu.ipxe
#!ipxe
echo
echo Booting Ubuntu from SAN for ${hostname}
set root-path iscsi:nas.smidsrod.lan::::iqn.2011-02.lan.smidsrod:${hostname}.boot.ubuntu
set keep-san 1
# Wait for 2 sec for user to press F12
prompt --key 0x197e --timeout 2000 Press F12 to run installer && set skip-san-boot 1 ||
# Hook (and possibly boot) SAN disk
sanboot ${root-path} ||
# Boot installer if sanboot actually returned
set base-url http://boot.smidsrod.lan/ubuntu-10.10-amd64-server
kernel ${base-url}/boot/linux
initrd ${base-url}/boot/initrd.gz
imgargs linux ks=${base-url}/boot/ks.cfg
boot ||
# If everything failed, give the user some options
echo Boot from ${root-path} and booting installer failed
prompt --key 0x197e --timeout 2000 Press F12 to investigate || exit
shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment