Set up Debian PXE boot server

I have always wanted to set up a Debian PXE (Pre-eXecution Environment) server, so I could have machines boot from the network and select an OS to install. Ultimately I expect to be able to do this with any OS, but at first I will have it boot various versions of Debian, from my local partial Debian mirror (maintained with debmirror).

    Right now I’m downloading the Debian installer images with debmirror. For the PXE boot server, I will be following this Debian Administration guide:

  1. The first thing it has me install is tftpd-hpa, which is easy enough:
    aptitude install tftpd-hpa

    This automatically started the tftpd-hpa daemon. The guide suggested I need to edit /etc/default/tftpd-hpa:

    # /etc/default/tftpd-hpa

    The above are the defaults, and since those looked alright to me, I didn’t modify them. The directory /srv/tftp already existed on my system (probably from an earlier attempt at setting up PXE boot), and was empty.

  2. Next, I needed to set up my DHCP server. This is provided by my custom-built router/firewall, running pfSense. Many home routers don’t allow one to set DHCP options, but pfSense ain’t no ordinairy router. (-; I added my worksation/tftp server’s IP address (hostname did NOT work), put “pxelinux.0” as the filename, and that seemed to be it.
  3. The next step was to configure the PXE boot. I copied the pxelinux files, and debian-installer directory from my local debmirror:
    cp -R /var/spool/mirror/dists/sid/main/installer-amd64/current/images/pxelinux.* /srv/tftp/
    cp -R /var/spool/mirror/dists/sid/main/installer-amd64/current/images/netboot/debian-installer /srv/tftp/
  4. The final step was to test it. Once I configured my VirtualBox test machine, it booted into PXE, saw my server/workstation, and it is now installing Debian Sid!

Where to go from here?

  • Figure out the best way to list multiple Linux distributions
  • Figure out a way to have this boot Windows images

Neither of the above look trivial.