Netboot/Ubuntu
From Sidvind
Netboot |
---|
using pxelinux and tftp. |
|
This shows how to setup serving of multiple ubuntu images over pxelinux netboot.
Prerequisites[edit]
- DHCP server (assuming dhcpd, but steps should be similar for other servers)
- NFS server
- TFTP server
Image creation[edit]
Put the created folder in the TFTP root
- Grab DVD image from [1]
- Grab netboot files. Ensure you get the same version as the DVD image.
- Merge files into a single directory (in TFTP root).
- Fix include paths.
- Mount DVD iso and copy content to NFS share (Don't forget the .disk directory)
- Export nfs share
- Copy casper to netboot dir
wget -nc -R "index.*" -R '*.gif' -r http://archive.ubuntu.com/ubuntu/dists/oneiric/main/installer-i386/current/images/netboot/
cp -R archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/ubuntu-installer ubuntu-11.10-i386 cp archive.ubuntu.com/ubuntu/dists/*/main/installer-*/current/images/netboot/*.tar.gz ubuntu-11.10-i386
find ubuntu-11.10-i386/boot-screens -name '*.cfg' -exec sed -i 's^ubuntu-installer/i386^ubuntu-11.10-i386^g' {} \;
mount -o loop ubuntu-11.10-dvd-i386.iso temp mkdir /export/ubuntu-11.10-i386 cp -r temp/* temp/.disk /export/ubuntu-11.10-i386/
emacs /etc/exports /export/ubuntu-11.10-i386 1.2.3.4/255.255.255.0(async,no_root_squash,no_subtree_check,ro) /etc/init.d/nfs reload
cp -R /export/ubuntu-11.10-i386/casper ubuntu-11.10-i386
Configure pxelinux[edit]
- Install syslinux
- Copy pxelinux.0, pxelinux.cfg and vesamenu.c32 to TFTP root
- Edit pxelinux.cfg/default
DEFAULT vesamenu.c32 PROMPT 0 TIMEOUT 50 MENU TITLE netboot LABEL ubuntu-11.10 i386 live kernel ubuntu-11.10-i386/casper/vmlinuz append root=/dev/nfs boot=casper netboot=nfs nfsroot=1.2.3.4:/export/ubuntu-11.10-i386 initrd=ubuntu-11.10-i386/casper/initrd.lz quiet splash -- LABEL ubuntu-11.10 i386 install kernel ubuntu-11.10-i386/boot-screens/vesamenu.c32 append ubuntu-11.10-i386/boot-screens/menu.cfg
The first entry runs the live DVD of NFS while the second launches a small netinstall.
DHCP[edit]
Simply set:
filename "pxelinux.0";
If you run the TFTP server on another host use "next-server".