Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
Created April 9, 2012 14:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save robinsmidsrod/2343741 to your computer and use it in GitHub Desktop.
Save robinsmidsrod/2343741 to your computer and use it in GitHub Desktop.
iPXE installer script for Ubuntu Server x64
#!ipxe
echo
echo Starting Ubuntu 10.04.4 x64 installer for ${hostname}
# Hook SAN disk
set root-path iscsi:nas.smidsrod.lan::::iqn.2011-02.lan.smidsrod:${hostname}.boot.ubuntu
sanhook ${root-path} ||
# Start debian-installer
set base-url http://boot.smidsrod.lan/ubuntu-10.04.4-amd64-server
kernel ${base-url}/install/netboot/ubuntu-installer/amd64/linux
initrd ${base-url}/install/netboot/ubuntu-installer/amd64/initrd.gz
imgargs linux auto=true fb=false url=${base-url}/./preseed.cfg DEBCONF_DEBUG=5
boot ||
# If everything failed, give the user some options
echo Boot from ${base-url} failed
prompt --key 0x197e --timeout 2000 Press F12 to investigate || exit
shell
#!ipxe
#dhcp
echo Starting Ubuntu x64 installer for ${hostname}
#set base-url http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
set base-url http://ftp.uninett.no/linux/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
#imgargs linux auto=true url=http://yourserver/some/path/preseed.cfg
boot ||
# If everything failed, give the user some options
echo Boot from ${base-url} 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