From Sidvind
Jump to: navigation, search
using pxelinux and tftp.

This shows how to setup serving of multiple ubuntu images over pxelinux netboot.


  • 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

  1. Grab DVD image from [1]
  2. Grab netboot files. Ensure you get the same version as the DVD image.
  3. wget -nc -R "index.*" -R '*.gif' -r
  4. Merge files into a single directory (in TFTP root).
  5. cp -R*/main/installer-*/current/images/netboot/ubuntu-installer ubuntu-11.10-i386
    cp*/main/installer-*/current/images/netboot/*.tar.gz ubuntu-11.10-i386
  6. Fix include paths.
  7. find ubuntu-11.10-i386/boot-screens -name '*.cfg' -exec sed -i 's^ubuntu-installer/i386^ubuntu-11.10-i386^g' {} \;
  8. Mount DVD iso and copy content to NFS share (Don't forget the .disk directory)
  9. 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/
  10. Export nfs share
  11. emacs /etc/exports
    /etc/init.d/nfs reload
  12. Copy casper to netboot dir
  13. cp -R /export/ubuntu-11.10-i386/casper ubuntu-11.10-i386

Configure pxelinux[edit]

  1. Install syslinux
  2. Copy pxelinux.0, pxelinux.cfg and vesamenu.c32 to TFTP root
  3. Edit pxelinux.cfg/default
DEFAULT vesamenu.c32
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= 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.


Simply set:

filename "pxelinux.0";

If you run the TFTP server on another host use "next-server".