There are oodles of guides to netbooting the ubuntu install. This is the story of what worked for me. You could start with any of the nearly-identical guides – I began with FRIS's "Install Ubuntu Gutsy over network or from a hard-disk" on Linux Mini. Now that we've gotten credit out of the way, here are the basic steps in broad strokes:
- Install required software
- Configure required software
- Make Ubuntu install files accessible in all the right places
- Do the install
1. Install required software
You will need the components of a pxe server. This means a DHCP/BOOTP server (it really does need to do both) and a TFTP server. I elected for dhcp3-server, and tftpd-hpa. The choice is up to you, but if you want the maximum chance of this guide working without adjustment you will make the same choice. You will also need a http server. apache2-mpm-worker is your friend here. But you could use bozohttpd if you want to keep the overhead minimal.
2. Configure required software
Apache's config is probably fine as-is, so you need do nothing there. On Ubuntu the option "FollowSymlinks" is already set; on other platforms you might check this.
allow booting;
allow bootp;
next-server 192.168.1.42;
filename "ubuntu/install/netboot/pxelinux.0";
next-server is the server's IP. I've got all the servers on one machine because it is easiest. Why that particular filename? See in the next step...
3. Make Ubuntu install files accessible in all the right places
You can use a cdrom or a cdrom image. As others point out, you can just dd the device of the cdrom (say, /dev/hdc or /dev/sr0 or if you're lucky maybe even /dev/cdrom) into a filename and you've got your image. But you can also use the downloaded ISO image and never have to burn a disc.
Create a directory and mount the cdrom or file on /var/lib/tftpboot/ubuntu. This is important! I tried using a symlink and it didn't work for me. Maybe it works for you. Who knows. Here's the command to mount the file:
mount -o ro,loop -t iso9660 /path/to/filename.iso /var/lib/tftpboot/ubuntu
The -t iso9660 should not be necessary but I like to be complete. Also in the interests of being complete, if you have problems with files not found you may need the nojoliet option (add it in with ro,loop using another comma and no space.) Some of the package names on the gutsy installer are egregiously long and cause errors.
Now we need to make the files accessible to the installer once you get it booted. If you want to install directly from a ubuntu mirror, and will use the netboot only to load the installer, then you don't need to do this part:
cd /var/www
ln -s /var/lib/tftpboot/ubuntu
If you want to install any packages locally, however, you will need to do the above.
4. Do the install
When the installer asks for your mirror, you can go to the top of the list and specify your own server. Put its IP (or if you have it in DNS, hostname) into the resulting dialog, then accept the default of /ubuntu/ for the location on the server. The install commences. Once again, you could just install from a Ubuntu mirror. If you're going to do that a lot, you should absolutely install apt-proxy, apt-cacher, or approx first to minimize downloading. Or you could make your own full-fledged cache with apt-ftparchive, apt-mirror, or others.