PXE Boot: Windows vs Linux

At work, we’re currently stuck with an old version of SCCM (2007) and it just doesn’t cut the mustard any more for OS deployments. I’ve set up an interim MDT server because it’s easy and required no specific budget, but the hard part is getting it able to PXE boot without squashing the SCCM stuff already in place.

There’s a few guides out there like this one that are excellent, but a little out of date. They reference Syslinux 3, and we’re up to 6.x now. Below is all my notes that you need to get SCCM, MDT, and Linux all working with PXE boot options and all the latest version tools. No VLAN switching magic or DHCP option trickery required. You can mix and match components all you want. No MDT, no problem. No Linux deployment needs, no worries.

First let’s start with the assumptions: You have a working SCCM server already set up to PXE boot on whatever networks you deploy on. You have either MDT boot media or some linux deployment environment, or both.

Part 1: Add a Linux boot menu to your SCCM PXE server:

  1. Make yourself a temporary folder on the desktop called RemoteInstall. Make some more folders under that like so: (and yes, there are folders with a .cfg extension. These aren’t files.)
    RemoteInstall\Boot\x64\pxelinux.cfg
    RemoteInstall\Boot\x86\pxelinux.cfg
  2. Download the latest Syslinux version (6.03 right now – Hopefully 6.anything will continue to work just as well for this article)
  3. Find the following files from the Syslinux compressed file and place them in RemoteInstall\Boot\x64:
    bios\com32\chain\chain.c32
    bios\com32\elflink\ldlinux\ldlinux.c32
    bios\com32\lib\libcom32.c32
    bios\com32\libutil\libutil.c32
    bios\com32\modules\pxechn.c32
    bios\com32\menu\vesamenu.c32
  4. Copy bios\core\pxelinux.0 and put it in the same place, but also rename it to pxelinux.com
  5. If you want a background image, grab one like this clever image from DeployVista and put that in the same x64 folder as above
  6. Copy everything you just added to x64 into RemoteInstall\Boot\x86
  7. In Notepad, make a file called default (with no extension) and add it to both of the pxelinux.cfg folders created from step 1
  8. Add content to your “default” files. The syntax and whatnot is beyond the scope of this post but here’s a sample: default
  9. On your SCCM PXE server, grab the following files to add to your folder from step 1. You also need to rename them
    SCCMServer\RemoteInstall\Boot\x64\abortpxe.com > RemoteInstall\Boot\x64\abortpxe.0
    SCCMServer\RemoteInstall\Boot\x64\pxeboot.com > RemoteInstall\Boot\x64\pxeboot.0
    SCCMServer\RemoteInstall\Boot\x86\abortpxe.com > RemoteInstall\Boot\x86\abortpxe.0
    SCCMServer\RemoteInstall\Boot\x86\pxeboot.com > RemoteInstall\Boot\x86\pxeboot.0
  10. Take the RemoteInstall folder you’ve been building up since step 1, and copy it straight over the top of RemoteInstall directory on your PXE server. Nothing is being overwritten, you’re just merging the folders together

Part 2: Add your other Windows boot media and configure WDS on your SCCM PXE server

  1. Open WDS on your SCCM server console. If it says it isn’t configured go ahead and do that. Just make sure to point to the RemoteInstall folder that’s probably already at the root of C: or D:
  2. Under boot media, add boot.wim from the Sources folder of your MDT boot media, or other WIM files as needed
  3. Use the following commands to tell WDS to load your Linux environment when PXE booting:
    wdsutil /set-server /BootProgram:boot\x64\pxelinux.com /Architecture:x64
    wdsutil /set-server /N12BootProgram:boot\x64\pxelinux.com /Architecture:x64
    wdsutil /set-server /BootProgram:boot\x86\pxelinux.com /Architecture:x86
    wdsutil /set-server /N12BootProgram:boot\x86\pxelinux.com /Architecture:x86

Part 3: Enable an SCCM PXE server to also use other WDS boot options

Everything we’ve done up until now gets ignored because SCCM has a whole separate PXE boot setup. But with one registry tweak you’ll get the following behavior:

  • If a computer is known to SCCM at all (as in it’s in any collection at all), when that computer PXE boots it will be processed by SCCM. As in, if it’s flagged to get a new OS it will launch that deployment process and if not it will cancel the PXE boot and move to the next local boot device
  • If a computer is not known to SCCM (was deleted or was never there in the first place), SCCM will fall back and use WDS settings instead. For us, that means booting to our Linux PXE menu

To make the tweak, open the regsitry editor on your SCCM PXE server and go to HKLM\SYSTEM\CurrentControlSet\services\WDSServer\Providers\WDSPXE. Find ProvidersOrder and add a second line with “BINLSVC” to the data.

You’re all set! Here’s some final notes:

  • In my environment, it takes about 30 minutes on average between when I delete a computer from SCCM and when it will boot to my alternate PXE menu. So be patient when you’re testing this out!
  • Even if you don’t currently need to do Linux deployments, I recommend adding the linux menu anyway. It’s easy and will make it easy for infrastructure upgrades in the future. You can also use pxechn.c32 to forward on to other PXE servers if there’s already a Linux PXE environment.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>