Nov 15

Booting Alternative Images from WDS using PXELinux

Preparation

You will need:

 

Extract these files from syslinux-4.07.zip into a temporary folder

  • /core/pxelinux.0 and rename it to pxelinux.com
  • /com32/menu/vesamenu.c32
  • /com32/chain/chain.c32
  • /memdisk/memdisk (If you want to be able to load raw floppy images and/or ISOs)

File Installation

From here on out, RemoteInstall will refer to the “Remote Installation Folder” you chose during initial setup of WDS

  1. Copy the above files into \RemoteInstall\Boot\x86
  2. In the x86 folder, make a copy of abortpxe.com and name it abortpxe.0
  3. Also make a copy of pxeboot.n12 and rename it to pxeboot.0
    • We make copies of these files because pxelinux is picky about file extensions.
  4. Repeat steps 1-3 in the \RemoteInstall\Boot\x64 directory

The x86 and x64 directories should now have the highlighted files in them.

Screenshot_1

Initial Configuration

We can make configuration files and a folder for images in either architecture directory, but then we’d be using double the space for storing boot images and we’d have to edit our configuration twice. Instead, we’ll use junctions (symlinks.)

  1. Create the folder \RemoteInstall\Boot\pxelinux.cfg
    • Note that it’s a folder named “pxelinux.cfg” and not a file
  2. Now create the junction. For this you’ll need to open a command window in the x86 directory and run
    • mklink /J pxelinux.cfg E:\RemoteInstall\Boot\pxelinux.cfg
      1. To get a command window in the x86 directory you can hold shift and right click in the directory and click “Open command window here…”
  1. Repeat step 2 but in the x64 directory instead
  2. Make a plaintext file called “default” in \RemoteInstall\Boot\pxelinux.cfg\ and place this sample configuration in it. Make sure there is no file extension.

  1. You should be able to see this file when browsing to either \RemoteInstall\Boot\x86\pxelinux.cfg or \RemoteInstall\Boot\x64\pxelinux.cfg
    • If not, check your junctions
  2. Create a folder to store your boot images in
    • I used \RemoteInstall\Images\Linux
  3. Make junctions in each folder like before
    • mklink /J Linux E:\RemoteInstall\Images\Linux
      1. The junctions should appear like this

Screenshot_2

  1. Now that everything is in place we need to change WDS’s default boot images to pxelinux. To do this we’ll run the following commands from an Administrator command prompt

 

At this point you can attempt to boot from the server. You should get the Pxelinux menu; selecting Windows Deployment Services should bring up the WDS menu. If this isn’t the case, go back and make sure all steps have been completed.

 

Samples

We’ll add memtest86+ and an ISO file to the server as an example. The PXELINUX wiki has some more information about other clients here.

Memtest86+

You’ll need to grab the latest pre-compiled bootable binary from memtest.org and extract the bin file from it. Rename it to just “memtest86+” and place it in your Linux directory.

Add this to your pxelinux configuration, “#—“ separates menu items. LABEL must be unique for each item.

Attempt to boot memtest86+ by selecting it from the pxelinux menu.

  • Again, pxelinux can be picky about file extensions

 

ISO/floppy Image

Here I’m using partedmagic, but this should work with just about any ISO. See the memdisk documentation for more details.

Place your ISO or floppy image in the Linux directory. Since we’re using memdisk we don’t have to worry about the file extension. Here I’m using Partedmagic, the configuration will look something like this

If you’re using a floppy image you won’t include “APPEND iso”. Some Windows installation media also requires you add raw to the append line (APPEND iso raw).

Leave a Reply