PXE Boot fun with Ubuntu

So I have this one single pc right now floating around here that doesn't have a cdrom drive. Hooking up a cdrom drive is an extreme hassle as the case only has room for a slim drive and I haven't gotten one for it. To make it more fun and exciting the machine won't boot off a usb flash drive or usb hard drive go figure. Either way that leaves me with a couple of choices on being able to perform an operating system installation. The first is to go out and purchase an external cdrom drive and just do it which is kind of lame and not very interesting. The other way is to setup a PXE boot server and go that whole route. Lest to say I went with the PXE option, as well I don't have an external cdrom or am able to get one at the moment. Not really creating a tutorial per say here as there are a lot of fantastic ones already out there.

Now to setup a PXE boot environment a few things are needed. Since I like to have a dedicated machine for this I ended up using a virtual machine in vmware on my mac to satisfy this. It was setup with ubuntu server 9.04, and was relatively easy getting the first parts sorted out. Which included dhcp3, tftpd, and inet utils. The big requirement here is to make sure that the dhcp3 config file has this entry: filename "pxelinux.0" in the address assignment. There is also a bug with the inet utils and tftpd where the udp setting has to be udp3 (the bug is already filed and really isn't that big of a deal just a little hard to find). Also ubuntu doesn't like nfs installations so they recommend having apache up and running and all the files available on there. Which ironically is also where I ended up running into trouble with what I was trying and opted for speed instead of figuring out the issue at hand. By doing that it caused other issues, but I am getting ahead of myself now.

PXE booting is really quite awesome when it is running correctly. it basically allows one server to house a large variety of images from installation images to fully operational boot images. A computer will while it is booting will get the information for the PXE server and the boot loader and start to boot. Now an interesting fact is that LAN booting via this method has been around a lot longer than booting off of flash drives or even usb cdroms. This means you can find really old computers and they are more likely to have the option to boot off of LAN than any of the usb boot options.

The whole process went extremely well except I ran into a few minor/major issues. The first was for some odd reason the ubuntu minimal installation was not reading the installation files off the apache server. Which ended up turning into a big todo and was very odd cause it would detect that there were files there but it would error on downloading them. Not really that big of a deal in the end. The other issue was that the Airport Extreme base station I have doesn't have an option to turn off the DHCP without turning off NAT. I did eventually get the installation to go through all the way, it involved setting the PXE server to have similar but not overlapping settings as my main network, and to move the computers over to the main network after the client successfully booted up the PXE files. Either way it does leave a few things that I will have to go back and revisit a little later to figure out what was really going on.