Monday, September 14, 2009

Creating a PXE boot for Jaunty Live

PXE usually involves booting a computer from firmware -- data contained on a read-only-memory (ROM) or programmable read-only-memory (PROM) chip -- rather than from data contained on magnetic media. This gives rise to the terms 'PXE boot ROM' or 'PXE boot PROM' (sometimes written 'PXE bootprom'). Booting from ROM or PROM eliminates the reliance on an electromechanical device (the physical drive). This enhances reliability and eliminates drive read errors. With today's memory technology, booting from ROM or PROM is fast. PXE can be also used to boot a computer from a network.

To create PXE boot for Jaunty Live you need the following:

  • Ubuntu server for PXE environment (tested on Jaunty 9.04 server)
  • Wired network
  • PXE boot capable network card on target machine
  • Download syslinux-xxx.zip
Do on Ubuntu Server:


  • First of all you need to login as Root    (sudo su-)
  • Create the directory structure as following:

    /pxe
    /pxe/images
    /pxe/images/ubuntu
    /pxe/pxelinux.cfg
  • Extract the files from syslinux-xxx.zip
  • Find menu.c32 & pxelinux.0 & copy them to the /pxe directory (other files on the Zip is no longer nedded can be delete)
  • create a file /pxe/pxelinux.cfg/default & paste in the following:

    DEFAULT menu.c32
    PROMPT 0
    NOESCAPE 0
    ALLOWOPTIONS 0
    TIMEOUT 600

    MENU TITLE PXE Boot Menu

    LABEL Ubuntu Jaunty Live Desktop
    kernel images/ubuntu/casper/vmlinuz
    append boot=casper netboot=nfs nfsroot=192.168.1.101:/pxe/images/ubuntu initrd=images/ubuntu/casper/initrd.gz -- splash

    LABEL Ubuntu Jaunty Live Install
    kernel images/ubuntu/casper/vmlinuz
    append boot=casper netboot=nfs nfsroot=192.168.1.101:/pxe/images/ubuntu initrd=images/ubuntu/casper/initrd.gz -- splash only-ubiquity
  • Now copy the contents of the Ubuntu live CD into /pxe/images/ubuntu
  • And then install dnsmasq & nfs-kernel-server by run the code on terminal  apt-get install dnsmasq nfs-kernel-server
  • edit /etc/dnsmasq.conf & replace all text with:

    no-hosts
    server=/localnet/192.168.52.1
    dhcp-range=192.168.52.40,192.168.52.50,2h
    dhcp-boot=pxelinux.0
    enable-tftp
    tftp-root=/pxe
    resolv-file=/etc/nameservers
    dhcp-option=3,192.168.52.1
  • Make sure you replace the IP with addresses, netmasks etc with ones suitable for your network.
  • edit /etc/exports & replace all text with:/pxe/images *(ro,sync,subtree_check)
  • Add your DNS nameservers by creating the new file (this is for opendns):
    gedit /etc/nameservers
    nameserver 208.67.222.222
    nameserver 208.67.220.220
  • Reboot your server
Now you can able to boot your target client machine to Ubuntu if it has a pxeboot enabled network card (usually accessed by pressing F12 at boot).

Do you have any suggestions write as comment   :)

No comments:

Post a Comment