Debian PXE-Server

In this tutorial I’m going to explain how to prepare Debian 5 to deliver Live Operating Systems (in this case Clonezilla)
via PXE-Boot with the Live OS Images stored on a network share.
This tutorial requires rudimentary Linux knowledge, as it will not cover basics like nano.

The first step requires a default Debian installation. For this installation only Debian 5 CD1 is necessary.
Download it from the official Debian website at
For the installation process, please refer to the software users manual.
Next download Clonezilla Live from or any other Linux based Distribution.
The steps to integrate a Linux based Distribution are mostly the same.
For this tutorial the Clonezilla image file will be stored on a Windows network share (//


Before proceeding with the next step, make sure your network is configured.
In this Tutorial the following settings are used:

# nano /etc/network/interfaces

auto eth0

iface eth0 inet static


And restart your networking service:

# /etc/init.d/networking restart

In addition a properly configured DHCP-Server is required.
If you already have a Linux based DHCP server in your network, you must modify its configuration.
Add the following lines to your configuration:

filename “pxelinux.0”;

Where is the IP Address of our Debian PXE server.
On a Windows based DHCP server add the following entries:

066 Boot Server Host Name and the IP address of my PXEserver as the string
067 Bootfile Name and a String Value of pxelinux.0

If your network privacy is protected by a proxy server please follow these instructions:

# export http_proxy=’’

To make the proxy permanent for all users add the line to your /etc/environment file.

# nano /etc/environment

Now check your installation sources to make sure that you get all packages.

# nano /etc/apt/sources.list

My repository list looks like this:

# deb cdrom:[Debian GNU/Linux 5.0.6 _Lenny_ – Official i386 CD Binary-1 20100904-18:58]/ lenny main
# deb cdrom:[Debian GNU/Linux 5.0.6 _Lenny_ – Official i386 CD Binary-1 20100904-18:58]/ lenny main

deb lenny/updates main contrib
deb-src lenny/updates main contrib

deb lenny/volatile main contrib
deb-src lenny/volatile main contrib

deb lenny main contrib
deb-src lenny main contrib

Then update the package list and install the following packages:

# apt-get update
# apt-get -y install lighttpd syslinux tftp-hpa smbfs


At first you need to configure the TFTPBoot directory and set the folder which tftpd should use as root directory.

# mkdir /tftpboot
# nano /etc/default/tftpd-hpa

OPTIONS=”-l -s /tftpboot -m /etc/tftp_remap.conf”

Create a tftp remap file. This is used to translate back slashes to forward slashes.
It’s useful particulary if you want to boot a Windows PE via network.

# nano /etc/tftp_remap.conf

rg \\ /

# /etc/init.d/tftpd-hpa start

Lighttpd Configuration

We will configure syslinux to deliver our clonezilla files via http.
So we need a proper configured http Server. I decided to use lighttpd because it’s small and has the functionality we need.
There are only a few settings that are going to be configured.

# mkdir /mnt/http
# nano /etc/lighttpd/lighttpd.conf

server.modules = (

server.document-root = “/mnt/http”

# /etc/init.d/lighttpd restart

Getting the Images

Now you will need the Clonezilla image which is stored on a network share:

# mkdir /media/Bootimages
# smbmount // /media/Bootimages -o user=‹USER›,pass=‹PASSWORD›,dom=‹DOMAIN›

If you want to mount the share automatically, type the above line in your fstab file.

# nano /etc/fstab

Now we need to mount the iso image in the http directory.

# mkdir -p /mnt/http/Clonezilla
# mount -o loop /media/Bootimages/clonezilla-live-1.2.6-24-i486.iso /mnt/http/Clonezilla

Also include this mount command in your /etc/fstab file to get the image automatically mounted after you reboot your Server.

Syslinux Configuration

From the mounted Clonezilla CD Transfer initrd1.img, vmlinuz1 and memtest to /tftpboot:

# cp /mnt/http/Clonezilla/live/vmlinuz1 /tftpboot/clonezilla.vmlinuz1
# cp /mnt/http/Clonezilla/live/initrd1.img /tftpboot/clonezilla.initrd1.img
# cp /mnt/http/Clonezilla/live/memtest /tftpboot/memtest86

The following files are necessary to display our PXE-Boot menu:

# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0
# cp /usr/lib/syslinux/menu.c32 /tftpboot/menu.c32

Next you will have to configure the PXE-Boot menu:

# mkdir /tftpboot/pxelinux.cfg
# nano /tftpboot/pxelinux.cfg/default

prompt 1
default menu.c32
prompt 0
noescape 1
allowoptions 0
timeout 120
ontimeout localboot
menu title PXE-Boot Options
menu width 80
menu margin 22
menu passwordmargin 26
menu rows 6
menu tabmsgrow 15
menu cmdlinerow 15
menu endrow 24
menu passwordrow 12
menu timeoutrow 13
menu vshift 6

label localboot
menu label Boot from first local harddrive
localboot 0

label Clonezilla
kernel clonezilla.vmlinuz1
append initrd=clonezilla.initrd1.img boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=”ocs-live-general” ocs_live_batch=”no” vga=788 nosplash fetch=

label memtest
menu label Memtes86+
kernel memtest86

At last you’ll apply a recursively chmod 777 to make all files in /tftpboot usable for everyone.

# chmod -R 777 /tftpboot

Steps to integrate another Linux Distribution

Copy the Image on the network share.

# mkdir -p /mnt/http/‹LINUXDISTRO›
# mount -o loop /media/Bootimages/‹LINUXDISTRO›.iso /mnt/http/‹LINUXDISTRO›

From the mounted Linuxdistro CD Transfer initrd1.img and vmlinuz1 to /tftpboot.
The files can also be called initrd.img or vmlinuz

# cp /mnt/http/‹LINUXDISTRO›/live/vmlinuz1 /tftpboot/‹LINUXDISTRO›.vmlinuz1
# cp /mnt/http/‹LINUXDISTRO›/live/initrd1.img /tftpboot/‹LINUXDISTRO›.initrd1.img

Add the following lines to your PXE-Boot Menu:

# nano /tftpboot/pxelinux.cfg/default

kernel ‹LINUXDISTRO›.initrd1.img
append initrd=‹LINUXDISTRO›.initrd1.img boot=live union=aufs noswap noprompt vga=788 fetch=‹LINUXDISTRO›/live/filesystem.squashfs

Important! These steps may vary from Distribution to Distribution!
Please take a look in the documentation of your Distribution.

Steps to integrate a Windows PE 3.0

In this article is described how to prepare all necessary files for a Windows PE 3.0 PXE-Boot.
And in another articel is covered how to create a more advanced Windows PE 3.0.
To integrate this WinPE, extract the SOURCES\BOOT.WIM file from the WinPE3.0 image and upload it to /tftpboot/Boot/winpex86.wim, or whatever your /Boot/winpex86.wim structure is.
After you uploaded the folder to /tftpboot/execute the following command:

# ln -s /tftpboot/Boot/bootmgr.exe /tftpboot/.


, , , , , , , , , ,

  1. #1 by Kristof on 14. December 2010 - 07:43

    Looks interesting ! I was planning on going to do something like this in my X-mas vacation. Now I can follow your guide. Thanks !

  2. #2 by on 1. April 2013 - 17:37

    It’s really a great and useful piece of information. I’m satisfied that you just shared this useful
    info with us. Please stay us up to date like this. Thanks for

  3. #3 by induction cookware on 3. August 2013 - 19:52

    Hi! I could have sworn I’ve been to this web site before but after browsing through many of the articles I realized it’s new to me.
    Anyways, I’m certainly pleased I found it and I’ll be bookmarking it and checking back often!

  4. #4 by walking for weight loss on 5. August 2013 - 03:42

    I really like your blog.. very nice colors
    & theme. Did you make this website yourself or did you hire someone to
    do it for you? Plz answer back as I’m looking to create my own blog and would like to find out where u got this from. thanks

  5. #5 by on 19. August 2013 - 19:25

    When someone writes an paragraph he/she keeps the thought of a
    user in his/her brain that how a user can understand it.
    So that’s why this paragraph is great. Thanks!

  6. #6 by bob james on 8. April 2014 - 01:30

    I stopped reading at the part where you started talking about Windows.
    Why on earth would you weck something that could be so good with a Windows inclusion?
    bye for good

  7. #7 by virtual private servers uk on 2. May 2014 - 22:00

    Its like you read my thoughts! You appear to understand a lot about this, like you wrote the e-book in it or something. I believe that you simply can do with a few p.c. to power the message house a bit, however other than that, that is magnificent blog. An excellent read. I will certainly be back.

  8. #8 by Intussu75h on 10. February 2017 - 22:06
    Looking for a used or new car can be quite a hard process should you not know what you are carrying out. By educating yourself about vehicle store shopping before you head to the dealership, you possibly can make things less difficult yourself. The following tips can help the next buying trip be satisfying.

    Always deliver a mechanic alongside when looking for a fresh vehicle. Vehicle merchants are popular for marketing lemons and you do not need to be their up coming sufferer. Whenever you can not get yourself a technician to look at autos together with you, a minimum of be sure that you have him take a look at closing option before you buy it.

    Know your boundaries. Before you begin shopping for your automobile or truck, choose what you can afford to spend, and stay with it. Don’t forget to feature curiosity about your computations. You can expect to pay out around twenty percent as a down payment as well, so be well prepared.

    Well before seeing a car dealership, know what kind of motor vehicle you would like. Investigation each one of you choices before shopping so you can decide what works well with your finances and family members needs. Seek information to find out exactly how much you should be paying to get a potential automobile.

    Before signing any contract take time to study each collection, like the small print. When there is anything at all listed that you do not comprehend, usually do not signal up until you purchase an respond to that you just comprehend. Unsavory salesmen can use a legal contract to put in a lot of fees which were not reviewed.

    When you retain the previous guidance at heart the very next time which you go shopping for a auto, you will end up very likely to get a good bargain. Investing in a car does not have to become a headaches. Only use the ideas with this report and you will receive the vehicle you desire at the great value.

  1. Debian PXE-Server | - Your one stop for news about Debian
  2. PXE服务器设置教程 | VPS资讯网

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s