2.3. Booting from PXE

The Preboot eXecution Environment, or PXE, is an environment to boot computers using a Network Interface Card without using hard drive or storage device.

To boot a machine with PXE, you need to:

Booting from PXE will show you exactly the same boot menu as a local boot from cdrom, floppy or USB key.

After the machine has booted, you will need to provide a source (cdrom, USB or ftp/http) as with the other installation methods.

You may be able to use PXE even if there is no 'LAN' option in the BIOS boot order. This is because modern net card boot agent takes charge during the boot process if it is set to do so on the net card PROM.

2.3.1. Update the card boot agent

If your card is old and you don't want to waste time trying to understand why it isn't working, you are strongly encouraged to first update old net card firmware with a recent version (PXE 2.0/boot agent v4 or better).

This operation is low risk, but only works with NICs not integrated onto motherboards. For motherboards with integrated network interfaces, only a BIOS upgrade (if available) might provide a solution.

Instructions for Intel net cards upgrade. 

  • Download boot.exe from the link below, uncompress it.


  • Copy the contents of IntelPRO/Boot agent to a floppy.

  • Boot from a DOS floppy, put in the floppy with Intel software and run:

    A:\>ibautil -upgrade

    To enable an additional configuration boot menu during machine start, allowing you to change the net card options or boot order, use:

    A:\>ibautil -setupenable -messageenable

Instructions for 3Com cards. 

Instructions for Realtek cards. 

2.3.2. Installing a TFTP server

Here is a short description of how to install tftp-hpa (installing another Trivial File Transfer Protocol server is also possible).

  • Build from source with

    configure && make install

    or use your Distro's packaging system.

  • Configure the server to use /var/tftp (or whatever directory you want).

    Gentoo installation:

    • Configuration is in /etc/conf.d/in.tftpd, set INTFTPD_PATH="/var/tftp"

    • Start the server with

      /etc/init.d/in.tftpd start

  • Set the files loaded by PXE

    • Unpack the ipcop-install-pxe package inside /var/tftp with

      tar -C /var/tftp -xvzf ipcop-install-pxe-(version).i386.tgz

    • Link or copy ipcop-pxe.model to a file whose name starts with '01-' and ends with the MAC address of the card in lower case.

      cd /var/tftp/pxelinux.cfg
      ln -sf ipcop-pxe.1.4.11.model 01-00-90-27-92-44-bd

2.3.3. Configure a DHCP server

The DHCP server is required to provide an IP Address and redirect the request to the TFTP server. You could use another IPCop to act as the DHCP server.

For an IPCop DHCP server, on the Services>DHCP Server webpage:

  • Check the 'Allow bootp clients' checkbox.

  • Add a fixed lease with:

    • the MAC address of the card,

    • an IP Address outwith the DHCP Start/End address dynamic range (but in the same network),

    • fill 'next-server' box with the address of the TFTP server,

    • fill 'filename' with pxelinux.0

    • leave 'root-path' empty if the TFTP server is run chrooted.

With the -s option, tftp-hpa server runs chrooted inside a designated directory. It is more secure and in this case, you don't need to include a root-path.

For other machines, refer to http://syslinux.zytor.com/pxe.php#tftp

Once the new IPCop is installed, to return to normal boot, you could:

  • unset the boot agent on the net card.

  • or disable the fixed lease on the DHCP server.

  • or remove the link or the MAC file inside /var/tftp/pxelinux.cfg

The second or third solutions will create a small delay at startup until the pxe boot fails.

2.3.4. Troubleshooting

Verify the tftp server is running with:

ps ax | grep [t]ftp

Use tcpdump somewhere on the same network

  • to write a packets log

    tcpdump -i eth0 -n -w tcpdump.log

    …stop with Ctrl-C

  • to read the log

    tcpdump -r tcpdump.log

    …only traffic headers.

    tcpdump -Ar tcpdump.log

    …traffic with details, a good solution to see error messages.