21.07.2015 Views

Linux Journal | January 2013 | Issue 225 - ACM Digital Library

Linux Journal | January 2013 | Issue 225 - ACM Digital Library

Linux Journal | January 2013 | Issue 225 - ACM Digital Library

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

COLUMNSHACK AND /Web site if you don’t have yourcopy of the magazine handy athttp://www.linuxjournal.com/article/9963). Otherwise, if youhave existing servers in place, justmake sure that DHCP is configuredto point to your TFTP server (if it’son the same machine, that’s fine).And, if you already have any sort ofpxelinux configuration in your tftpbootdirectory, I recommend that you backit up and move it out of the way—I’mgoing to assume that your entire/var/lib/tftpboot (or /tftpboot on somesystems) directory is empty to start with.For the rest of this article, I reference/var/lib/tftpboot as the location tostore your PXE configuration files,so if you use /tftpboot, adjust thecommands accordingly.Both Debian and Ubuntu provide anice all-in-one netboot configurationfor each of their releases that makes itsimple to PXE boot a particular releaseyourself. The file is called netboot.tar.gzand is located in a netboot directoryalong with the rest of the differentinstall images. For instance, thenetboot.tar.gz for the i386 Ubuntu12.04 release (named Precise) can befound at http://us.archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/netboot.tar.gz.To get started, cd to your tftpbootdirectory, and then use wget to pulldown the netboot.tar.gz file (I’massuming you’ll need root permissionsfor all of these steps, so I’m puttingsudo in front of all of my commands),and then extract the tarball:$ cd /var/lib/tftpboot$ sudo wget http://us.archive.ubuntu.com/ubuntu/dists/precise/➥main/installer-i386/current/images/netboot/netboot.tar.gz$ sudo tar xzf netboot.tar.gz$ lsnetboot.tar.gz pxelinux.0 pxelinux.cfg➥ubuntu-installer version.infoAs the ls command shows, anubuntu-installer directory wascreated along with pxelinux.0 andpxelinux.cfg symlinks that pointinside that ubuntu-installer directoryto the real files. Without performingany additional configuration,provided your DHCP and TFTP serverswere functioning, you could PXEboot a server with this configurationand get a boot menu like the oneshown in Figure 1.Ubuntu has taken the extra stepsof theming its PXE menu with itscolor scheme and even provided alogo. Unlike the PXE menu I demoedin my previous “PXE Magic” article,this menu functions more like a GUIprogram. You can use the arrow keysto navigate it, the Enter key to selectWWW.LINUXJOURNAL.COM / JANUARY <strong>2013</strong> / 49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!