A server I got my hands on had an OS (and possibly hard drive) breakdown, so I needed to install some operating system on it. I am familiar with Ubuntu, so that is what I decided on. However, the server was too old to boot from a USB stick and had no optical drive.
Netboot to the rescue! (The server BIOS supported PXE.) Getting this to work was not altogether straightforward though, as most online guides assume you can just install and use a DHCP server. I can’t. Or at least that appeared a bit too cumbersome, as my Time Capsule does the DHCP stuff and without it, there would be no network access, or at least that would have broken the Apple TV session my wife was having at the same time.
Fortunately, one CAN get this working with just TFTPd and bootpd. So I installed those two on another Ubuntu machine:
1 | sudo apt-get install bootpd tftpd |
Then you have to configure xinetd to accept requests to the two services. The following two files need to be placed in /etc/xinetd.d
tftp:
1 2 3 4 5 6 7 8 9 10 11 12 13 | sudo cat > /etc/xinetd.d/tftp service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no } ^d |
bootp:
1 2 3 4 5 6 7 8 9 10 11 12 | sudo cat > /etc/xinetd.d/bootp service bootps { disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/bootpd server_args = -i /etc/bootptab } ^d |
Then you need a file named /etc/bootptab that specifies which boot file to offer netbooting clients:
1 2 3 4 5 6 7 8 9 | sudo cat > /etc/bootptab client:\ hd=/tftpboot:\ bf=pxelinux.0:\ ip=192.168.0.11:\ sa=192.168.0.113:\ sm=255.255.255.0:\ ha=00E0812D11BB: ^d |
ip is the IP address you want to give a the netbooting client. sa is the IP address of the netboot server (the one that the file bootptab resides on). sm is the network mask of the network both these machines are on.
ha is important: it is the MAC (hardware) address of the network interface used by the netbooting computer to reach the nentboot server. Fortunately for me, my server displayed this when trying to netboot, even when it failed to do so.
hd is the directory that tftpd will serve files from (created in the next step) and bf is the file netbooting clients will boot from (which is fetched shortly).
So now create the tftpd content directory and populate it. The Ubuntu wiki says that all that is needed is in a file named netboot.tar.gx. Get that file. (You may need to browse the Ubuntu website to find the one that is right for your architecture — my server is AMD64 based.)
1 2 3 4 | sudo mkdir /tftpboot cd /tftpboot sudo wget http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/netboot.tar.gz tar -zxf netboot.tar.gz |
According to the Ubuntu Wiki, one would pretty much be done at this point, but I found that to be untrue as the tftp daemon does not follow symlinks when a client tries to download them. And the two most relevant files in the netboot archive unpack as symlinks into the tftpboot directory. Therefore:
1 2 3 | sudo rm pxelinux* sduo mv ubuntu-installer/amd64/* . sudo rm -r ubuntu-installer |
Now we just need to fix permissions and reload xinetd:
1 2 3 | sudo chown -R nobody * sudo chmod -R 777 * sudo reload xinetd |
After this, at least I could boot my server into the Ubuntu installer over the network.






