Economy Size Geek - Installation Toolkit

 in
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,192.168.210.254 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 ftp://archive.ubuntu.com/
↪ubuntu/dists/karmic/main/installer-i386/current/images/netboot/

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 ftp://archive.ubuntu.com/
↪ubuntu/dists/karmic/main/installer-i386/current/images/netboot
 ↪-P /var/lib/tftpboot/ubuntu/karmic/i386
sudo wget -r -nH --cut-dirs=8 -np ftp://archive.ubuntu.com/
↪ubuntu/dists/karmic/main/installer-amd64/current/images/netboot
 ↪-P /var/lib/tftpboot/ubuntu/karmic/amd64
sudo cp ubuntu/karmic/i386/ubuntu-installer/i386/pxelinux.0 
 ↪/var/lib/tftpboot/
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 -

karmic_i386_install
karmic_i386_expert
karmic_amd64_install
karmic_amd64_expert

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 boot.kernel.org or www.netboot.me. 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).

______________________

Comments

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?

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState