Setting Up A PXE Install Server For Multiple Linux Distributions With Ubuntu Edgy Eft

Version 1.0
Author: Falko Timme

This tutorial shows how to set up a PXE (short for preboot execution environment) install server with Ubuntu 6.10 (Edgy Eft). A PXE install server allows your client computers to boot and install a Linux distribution over the network, without the need of burning Linux iso images onto a CD/DVD, boot floppy images, etc. This is handy if your client computers don't have CD or floppy drives, or if you want to set up multiple computers at the same time (e.g. in a large enterprise), or simply because you want to save the money for the CDs/DVDs. In this article I show how to configure a PXE server that allows you to boot multiple distributions: Ubuntu Edgy/Dapper, Debian Etch/Sarge, Fedora Core 6, CentOS 4.4, OpenSuSE 10.2, and Mandriva 2007.

I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!


1 Preliminary Note

It is important that you have a decent internet connection because your client computers will fetch all needed packages from the repositories in the internet (I tested this on a 16MBit ADSL2+ connection which seems to be fast enough. ;-)). It is possible to store all packages on the PXE server as well so that you don't need an internet connection (just the LAN connection to the PXE server), but then you need a lot of storage space on the PXE server (remember, it will serve multiple distributions), so I don't cover this here.

And the most important thing is that your client computers support booting over the network. You should check each computer's BIOS for this option.

On our system that should serve as the PXE server you should have already set up a basic Ubuntu 6.10 server system, for example as shown on pages 1 - 3 of this tutorial:

I prefer to do all the steps here as the root user. So if you haven't already created a root login, you should do so now:

sudo passwd root

Afterwards, log in as root:


If you would like to work as a normal user instead of root, remember to put sudo in front of all the commands shown in this tutorial. So when I run

apt-get update

you should run

sudo apt-get update

instead, etc.


2 Install All Necessary Packages

First we update our packages database by running

apt-get update

We need to install the packages netkit-inetd, tftpd-hpa, dhcp3-server, and lftp, so we run

apt-get install netkit-inetd tftpd-hpa dhcp3-server lftp    

Afterwards run

netstat -uap

and check if you see something like this:

[email protected]:~# netstat -uap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 *:tftp

If you don't see the tftp line, please open /etc/inetd.conf and make sure you find the following in it:

vi /etc/inetd.conf
#:BOOT: Tftp service is provided primarily for booting.  Most sites
# run this only on machines acting as "boot servers."
tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot

Then restart inetd:

/etc/init.d/inetd restart


3 Configure The DHCP Server

We need a DHCP server in our local network. If there's no DHCP server in your local network, just configure and use the one on your future PXE server. Simply edit /etc/dhcp3/dhcpd.conf:

cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_orig
cat /dev/null > /etc/dhcp3/dhcpd.conf

vi /etc/dhcp3/dhcpd.conf
option domain-name-servers,;

default-lease-time 86400;
max-lease-time 604800;


subnet netmask {
        filename "pxelinux.0";
        option subnet-mask;
        option broadcast-address;
        option routers;

This will dynamically assign IP addresses from the range to to your client computers; the gateway is Of course, you must adjust this configuration to your own environment!

It is important that you have the line

filename "pxelinux.0";

in your configuration!

Then restart your DHCP server:

/etc/init.d/dhcp3-server restart 

If you already have a DHCP server in your network, you must modify its configuration. Let's assume you have something like

subnet netmask {
        option subnet-mask;
        option broadcast-address;
        option routers;

in the configuration. You must add

filename "pxelinux.0";

to it (where is the IP address of our Ubuntu PXE server) so that it looks like this:

subnet netmask {
        option subnet-mask;
        option broadcast-address;
        option routers;
        filename "pxelinux.0";

Then restart your DHCP server.

Share this page:

Suggested articles

5 Comment(s)

Add comment


By: Wim

Running "sudo su - " gives you a root prompt, after typing your own password.

By: Michael Boman

sudo -s

does the same thing. On some distributions may you want to do

sudo -i


By: Anonymous

There is no /etc/init.d/inetd in Ubuntu 8.04.2 LTS to fix this do

 /etc/init.d/openbsd-inetd restart


By: mr.jay

It's sad, that this thread doesn't actualized anymore...

Would be interesting to see how it must be properly configured on modern versions of debian.

it is such a good deed - to revive an old laptop... pxe server is the best essential way to do that...

i've stuck on configuring tftpd-hpa service, seems some routing problems (as journalctl tells)

(smb, dnsmasq services & the structure of OS-iso image are ok)

By: Terry

This article is outdated and won't work anymore.