Economy Size Geek - Installation Toolkit

Having the right tools for the job.
Configuring co2

The DHCP server needs to offer up a PXE boot image for this to work. In my case, that meant I needed to update my DD-WRT configuration. I decided to change it first. I went to the Services tab on my router and added dhcp-boot=pxelinux.0,keg, to the box for Additional DNSMasq options. That is the PXE image, the name of my file server and my file server's IP. If you are running a DHCP server as well, you need to add something similar, depending on what DHCP software you are running.

Configuring Keg

Now the rest of the configuration happens on my file server. I installed a tftp server to serve up the PXE boot image:

sudo apt-get install tftpd-hpa

This creates a directory (/var/lib/tftpboot) and a config file (/etc/default/tftpd-hpa). Edit the config file by changing RUN_DAEMON="no" to RUN_DAEMON="yes". Then:

sudo /etc/init.d/tftpd-hpa restart

The next step is to get an installer:

sudo cd /var/lib/tftpboot
sudo wget -r -nH --cut-dirs=8 -np

Now you can boot up your machine and have it load the standard Karmic installer. Part of the fun and flexibility of having a PXE server is that you can choose what to install on the fly. I'm going to start with adding on the x64 installer for Karmic. First, I needed to clean up the directory structure a bit. I removed everything (except the pxelinux.0 and pxelinux.cfg, which both turned out to be symlinks to files I deleted):

sudo mkdir -p ubuntu/karmic/i386
sudo mkdir ubuntu/karmic/amd64
sudo wget -r -nH --cut-dirs=8 -np
 ↪-P /var/lib/tftpboot/ubuntu/karmic/i386
sudo wget -r -nH --cut-dirs=8 -np
 ↪-P /var/lib/tftpboot/ubuntu/karmic/amd64
sudo cp ubuntu/karmic/i386/ubuntu-installer/i386/pxelinux.0 
sudo mkdir /var/lib/tftpboot/pxelinux.cfg

Now, set up a menu to choose between the two installers. Create a /var/lib/tftpboot/boot.txt file with:

- Install Options -


Create a /var/lib/tftpboot/pxelinux.cfg/default file with:

DISPLAY boot.txt

LABEL karmic_i386_install
        kernel ubuntu/karmic/i386/ubuntu-installer/i386/linux
        append vga=normal initrd=ubuntu/karmic/i386/
        ↪ubuntu-installer/i386/initrd.gz --
LABEL karmic_i386_expert
        kernel ubuntu/karmic/i386/ubuntu-installer/i386/linux
        append priority=low vga=normal initrd=ubuntu/karmic/
        ↪i386/ubuntu-installer/i386/initrd.gz --
LABEL karmic_amd64_install
        kernel ubuntu/karmic/amd64/ubuntu-installer/amd64/linux
        append vga=normal initrd=ubuntu/karmic/amd64/
        ↪ubuntu-installer/amd64/initrd.gz --
LABEL karmic_amd64_expert
        kernel ubuntu/karmic/amd64/ubuntu-installer/amd64/linux
        append priority=low vga=normal initrd=ubuntu/karmic/
        ↪amd64/ubuntu-installer/amd64/initrd.gz --

From here on, you just need to download a distribution you want to support and add it to the menu. If you are the graphical type, you even can modify the system to allow menus and pretty icons.

Wireless PXE?

PXE is great, because it allows you to boot up and choose the installer you need. The problem is that it assumes you are on the physical network. In the case of my wireless computers (Netbooks, laptops and that one computer that sits out in my brew house), I couldn't use PXE. The main workaround is to get a wireless bridge so the device can boot over a physical port on the bridge, and let the bridge worry about the Wi-Fi. The question of how to do that has floated around so long, I am not holding out hope a solution will show up any time soon.

Alternative for the Lazy

Let's say you want some of the features of PXE, but you don't want to bother installing a server. It turns out you have two different options for doing pretty much the same thing over the Internet. You can use or Both are using gPXE, which allows you to do the same things I did, but you don't need to have any infrastructure (although you may want to have a lot of bandwidth, depending on how much installing you do).



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Uh... Koala???

Dr1fter's picture

How about Lucid Lynx? When was this written again?