Using Windows Deployment Services (WDS) to install Linux over Network (PXE)

Developing software is hard work – especially when you target several operating systems. One task that you have to perform quite often would be to deploy a new installation of an operating system as fast as possible on a test machine.

Doing this with Windows is easy – you can use the Windows Deployment Services to bootstrap Windows onto almost every machine which can boot over ethernet using PXE. Everything needed to make WDS work on a Windows Boot-Image is located on that image. Since it’s that easy I won’t dive into more detail here.

What I want to show in greater detail is how you can use WDS to deploy even Linux over your network.

Step 1: Get PXELINUX

What’s needed to boot Linux over a network is a dedicated PXE Boot Loader. This one is called PXELINUX and can be downloaded here.

“PXELINUX is a SYSLINUX derivative, for booting Linux off a network server, using a network ROM conforming to the Intel PXE (Pre-Execution Environment) specification.”

On the homepage of PXELINUX is also a short tutorial which files you need and where to copy them.

Step 2: Setup WDS with PXELINUX

I suppose you got your WDS Installation up and running and you are able to deploy Windows. If that’s the case you can go to your WDS Server Management Tool and right-click on the server name – in my case “fileserver.sones”. If you select “Properties” in the context menu you would see the properties windows like in the screenshot below:

wds_pxelinux

You have to change the Boot-Loader from the standard Windows BootMgr to the newly downloaded PXELINUX bootloader. Since this bootloader comes with it’s own set of config files you can edit this config file to allow booting into Windows.

Step 3: Edit PXELINUX configuration filewds-pxelinux-2 

The first entry I made into the boot menu of the PXELINUX boot loader is the “Install Windows…” entry. Since the first thing the users will see after booting is the PXELINUX loader menu they need to be able to continue to their Windows Installation. Since this Windows Installation cannot be handled by the PXELINUX loader you have to define a boot menu entry which looks a lot like this:

LABEL wds
MENU LABEL Install Windows…
KERNEL pxeboot.0

To add OpenSuSE to the menu you would add an entry looking like this:

LABEL opensuse
MENU LABEL Install OpenSuSE 11.x
kernel /Linux/opensuse/linux
append initrd=/Linux/opensuse/initrd splash=silent showopts

The paths given in the above entry should be altered according to the paths you’re using in your installation. I took the /Linux/opensuse/ files from the network install dvd images of OpenSuSE.

wds-pxelinux-3

That’s basically everything there is about the installation of Linux (Debian works accordingly) over PXE and WDS.

And finally this is what it should look like if everything worked great:

 

Source 1: http://en.wikipedia.org/wiki/Preboot_Execution_Environment
Source 2: http://syslinux.zytor.com/wiki/index.php/PXELINUX

9 thoughts on “Using Windows Deployment Services (WDS) to install Linux over Network (PXE)

  1. In the WDS included in Windows Server 2008 R2 the UI has changed and you have to use the command line to set the the default boot program.
    # Thus to change the boot program to pxelinux.com, the wdsutil command line tool has to be used: (do this also for x64 if you have x64 clients also)

    * wdsutil /set-server /bootprogram:boot\x86\pxelinux.com /architecture:x86
    * wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.com /architecture:x86

  2. Hi, Thank you for the great post. I am testing this configuration with WDS on Windows 2008 R2 to deploy Fedora 14. Everthing goes fine till the Disk Setup and when it tries to install Fedora I get this error – ” Unable to Read Package Metadata. This may be due to a missing repo data directory. Please ensue that your install tree has been correctly generated “. I have an ISO of Fedora 14 from the Fedora Project Site and It works fine and installation completes successfully when I try to use the ISO in Virtualbox and also when I install from DVD burnt from the same ISO.

    Do I have to modify repomd.xml file or create and add someother .xml file in repodata folder ?

    One more thing I am not using kickstart file. Is it mandatory to use ks.cfg

  3. i go same problem with krishna…can u give me solution…i was build it for my last final project…sorry if my english so bad..

  4. Can I use windows deployment services to install RedHat Linux. I also need to run pre- and post-install scripts on the linux box. Is this doable

  5. I installed the ubuntu in my computer but I cant install the network connection on it
    so what should i do to connect to the internet.
    thanks full in advance.

  6. I used this for RHEL menu entry, in case it helps

    LABEL rhel-6.1
    menu label Redhat EL 6.1
    kernel rhel-6.1/amd64/vmlinuz
    append vga-normal initrd=rhel-6.1/amd64/initrd.img ramdisk_size=16417 root=/dev/ram rw —

    I think it was specifying the ramdisk size that was the magic requried.

  7. Pingback: Install Linux over Network « AhmadTux

Comments are closed.