In Part 1, you should have learned how to set up a TFTP server and configure your router for network booting.

So let’s add some useful stuff to boot from network.

Here’s the list so far. This list will grow with time, so it’s probably easier just to search for when it does get huge. If anyone has any requests, please post in the comments. If anyone has their own instructions, I’ll amend my list (with credit)

-Generic ISO
-Debian Squeeze amd64
-Parted Magic

-Generic ISO
A few notes of caution here, whatever ISO you load needs to be smaller in size than the amount of RAM you have in the system since it loads the entire ISO into memory. This means that it’s probably a BAD idea to load a DVD sized ISO. This is more suited to tools like Memtest (which is listed below). You can load things like UBCD and Hiren’s, but it takes a significantly long time to boot. It’s better to extract the particular tool you need and load that instead of trying to load an entire ISO.

Despite the warnings above, someone out there I know is gonna try loading a Windows ISO. Let me just tell you now that it won’t work. It’s a long story as to why. I’ll cover loading Windows OSes in Part 3.

Here’s a generic template to stick in /srv/tftp/pxelinux.cfg/default:

        MENU LABEL [Name of ISO]
        LINUX memdisk
        append iso initrd=dir/to/iso.iso

Just make the necessary changes to reflect your particular ISO.

If you have a file server to have a central place to store all your ISOs, you may want to use that directory to serve up said ISOs. It would easily beat out copying ISOs to and from your TFTP directory. You may try to symlink your way in, but you’ll quickly find out that you’re chrooted. There is a way to do it: unionfs-fuse.

Before doing anything, you’ll have to mount your file server, which is outside the scope of this post.
Consult the manufacturer of your file server to see what it serves up in terms of protocol and then consult Google.
You’ll need at least read permissions.

First, you’ll have to amend your sources list at /etc/apt/sources.list to include this line:

deb squeeze-backports main

Now let’s do some installing

apt-get update
apt-get -t squeeze-backports install unionfs-fuse

Now set up your directory and overlay your file server’s directory to the iso directory:

mkdir /srv/tftp/iso
unionfs-fuse -o allow_other /directory/to/your/ISOs/on/your/fileserver=RO /srv/tftp/iso

This won’t survive a reboot. If you want it to, you’ll have to amend your /etc/fstab and add this line:

unionfs-fuse#/directory/to/your/ISOs/on/your/fileserver=ro /srv/tftp/iso fuse default_permissions,allow_other 0 0

-Debian Squeeze amd64-
First off, let’s make some directories to make organization easier:

mkdir -p /srv/tftp/debian/squeeze/amd64
cd /srv/tftp/debian/squeeze/amd64

And let’s download the necessary files:


Now let’s populate the default file. Add this to /srv/tftp/pxelinux.cfg/default

LABEL DebianSqueezeamd64
        MENU LABEL Debian Squeeze amd64
        kernel debian/squeeze/amd64/linux
        append initrd=debian/squeeze/amd64/initrd.gz

NOTE: Unless you have a local repo, each time you install you’re gonna be downloading the entire OS from the internet.
I’ll cover how to setup a local repo one of these days. Keeping 100GB on a file server somewhere (to me at least) is worth it if you deploy any sort of VMs at all.

Let’s do the setup:

mkdir /srv/tftp/iso
cd /srv/tftp/iso

And the additions to /srv/tftp/pxelinux.cfg/default

LABEL Memtest
        MENU LABEL Memtest86+
        LINUX memdisk
        append iso initrd=iso/mt420.iso

-Parted Magic-
First, let’s setup the directories:

cd /srv/tftp
mv pmagic-pxe-6.6/pmagic /srv/tftp/
rm -rf pmagic-pxe-6.6

And the additions to /srv/tftp/pxelinux.cfg/default

LABEL pmagic
        MENU LABEL Parted Magic
        LINUX pmagic/bzImage
        INITRD pmagic/initramfs
        APPEND edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256

  3 Responses to “PXE – Part 2: Useful stuff to boot from network”

  1. Top notch article.
    PXE was completely new to me and the other run throughs I had tried didn’t work out at all. Going with your step through I had my PXE setup running in no time.

  2. any reason why acronis true image 2011 would freeze, and why western digital data lifeguard would restart my computer??

  3. nvm just threw in the raw at the end of append iso thanks anyway.

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

© 2012 The Mind of DH Suffusion theme by Sayontan Sinha