This is an old revision of the document!

PXE chainloading

PXE chainloading in VMware

If you have a large number of machines which already have a legacy PXE implementation (e.g. network cards containing an Intel PXE ROM), then you may want to avoid having to reflash each machine's network card. You can achieve this by placing gPXE on your TFTP server. The PXE-capable machines will download gPXE via TFTP, and instantly become gPXE-capable machines.

Setting up PXE chainloading

Start by downloading the source tree, then build the PXE-chainloadable gPXE image using

  cd src
  make bin/undionly.kpxe

Copy bin/undionly.kpxe to your TFTP server, and configure your DHCP server to hand out undionly.kpxe; if you are using ISC dhcpd then you need to edit /etc/dhcpd.conf to contain

  next-server X.X.X.X;
  filename "undionly.kpxe";

where X.X.X.X is the IP address of your TFTP server. At this point, you should be able to boot one of your PXE-capable machines, and see it download gPXE from the TFTP server. If everything has worked, then you should see the gPXE startup banner appear:

  gPXE 0.9.7 -- Open Source Boot Firmware --

Breaking the infinite loop

When the chainloaded gPXE starts up, it will issue a fresh DHCP request and boot whatever the DHCP server hands out. The DHCP server is currently set up to hand out the gPXE image, which means that you will be stuck in an infinite loop: PXE will load gPXE which will load gPXE which will load gPXE which will load gPXE…

Using ISC dhcpd

If you are running ISC dhcpd as your DHCP server, then you can break the infinite loop by configuring the DHCP server to hand out gPXE only for the first DHCP request. Edit /etc/dhcpd.conf to contain

  if not ( option user-class = "gPXE" ) {
      filename "undionly.kpxe";

This will ensure that the gPXE image (undionly.kpxe) is handed out only when the DHCP request comes from a PXE client other than gPXE.

QR Code
QR Code pxechaining (generated for current page)