March 12th, 2007


Getting Ubuntu "On Tap"

So if you've got a dhcp server running linux that you have control over, it's pretty trivial to get an Ubuntu PXE install server up, too. This makes it really easy to install Ubuntu on new or busted machines by simply plugging them in and turning them on (possibly informing them to use PXE boot rather than CD or hard drive).

The steps are written in a number of places, but it was a bit hard for me to find just the 2-3 steps I needed to get Ubuntu "on tap," so I recount them here (as taken from Halis way):

1) Install tftpd-hpa and enable it by editing /etc/default/tftpd-hpa and switching RUN_DAEMON="no" to RUN_DAEMON="yes" (may not be necessary if you are already using inetd) and restart the service (sudo invokerc.d tftpd-hpa restart)

2) Tweak your dhcp server to spit out filename and next-server options. In the subnet directive for the network that will have the install tap, add these two lines somewhere:

filename "pxelinux.0";

next-server <numeric IP address of TFTP server>;

3) go to /var/lib/tftpboot, download and extract netboot.tar.gz (replace dapper with edgy or feisty in the URL if you like)

That should be it. PXE clients will launch into the text-mode "alternate" installer rather than the full desktop live CD that you would see with standard Desktop installer, but this is customizable and can be tweaked to have entirely automated installations (read up on preseed and/or kickstart for more info on that).

Update: Actually, the next-server probably doesn't need to be a numeric IP, since I think the PXE boot can do DNS lookups, assuming the DNS server address is provided by the DHCP server.
Also, I should have referenced the place where I got the "Ubuntu on tap" phrase.
Update: Updated to 7.10 on Oct 22, 2007 (just grabbed netboot.tar.gz and extracted it with "(cd /var/lib/tftpboot && sudo tar zxvf ~burner/netboot.tar.gz)"