I’ve been messing around with PXE booting for a little bit now so thought I’d throw up a guide on how to set a PXE server up from scratch, since the guides that I’ve found online seem dated.
For quick guide on how PXE works, have a look here :Wikipediaan Image of how it works

This guide will be split into 3 parts,
The first part – Which is this post, will detail how to setup / install Debian.
Anyone vaguely familiar with Linux should be able to skip straight to Part 2.
Part 2 will be the setup of the server, and in Part 3, I will detail how to add extra boot options.

Now onto the Part 1.
In this part, I will install Debian Squeeze onto a Virtual Machine.
It’s up to you whether you use Debian or another distribution, I’ve used it as it’s the one I’m most familiar with. It’s also one that I happen to be able to install right now.
The choice of distribution isn’t really important though, as long as you can install the software needed, any distribution is as good as another for this purpose.

This is the software I will be using in this guide :
dnsmasq 2.55 – A DHCP / TFTP Server that we will be using the assign IP addresses and host the netboot files.
Syslinux 4.02 – The netboot software that is used so that computers can boot off the pxe server.
Memtest86+ 4.10 – This will be what your PXE server will be remotely booting at the end of it all.
The software isn’t the newest, but it is what comes on the Debian Squeeze (6.0.1a) CDs and is sufficient for today.

With this guide, you won’t need to know too much about Linux as I’ll be providing (hopefully) easy to follow screenshots, but if you’ve found this guide then you are probably pretty comfortable with Linux already, if not, let’s continue !

Also I have not installed a graphical interface as I have assumed that after it is setup, you won’t be needing to use this computer / server as a workstation, however you are free to install a graphical environment during the setup.

So, onto what you will need :
A computer with at least 1 network card.
A Storage device that you can install Debian on and boot from, at least 4 Gigabytes in size preferably, although you can make do with less.
An internet connection is optional.
Debian Squeeze CD
You will need the 1st CD to install the base system, then you can download the rest of the packages that you need..
For an offline install without any internet access – you will need these 5 CDs – 1, 5, 6, 7 and 8.

Step 1

Ok, so starting off, the boot screen you see when you pop in the Debian install cd :

This is where you can select what you want to do with the CD. In our case, we’ll select Install and hit enter.
Which will bring us to a screen similar to this :

This screen lets us select the language we want to use.
I’m assuming you’ll be using english so we’ll select that and hit enter to progress.
The install process is pretty simple for Debian, just a matter of following the prompts.
I had a DHCP server setup for my example server to get an IP address so I got to this screen :

Otherwise you will get this :

You can setup your own networking this way instead of setting it up later on as I do in this guide.
Setting it up earlier would be recommended for computers with only a single NIC which you are using to network boot other computers. Otherwise if you have a computer with Dual NICs and one of them is already connected to the network and can successfully get an IP address, the setup should continue without a hitch. Otherwise if both NICs are not connected then a situation similar to the single NIC situation above will apply.

The next important step is to select a network mirror or software source.

This will only work if you are actually connected to the internet. If you’re not then it will ask for CDs to be put in as software sources.
After that, you will be asked for root password and also a username and password for yourself.
Following this will be the hard drive setup, where you will choose how to partition the drive, which will then let you install the system and the components you select, as well as the GRUB bootloader.

After the install and a reboot, you should be greeted with this screen :

Congratulations, you now have a working install of a base Debian install.
And now for Part 2.