Networking, Windows 10, Windows PE

Simplify PXE Booting: No WDS Required on UniFi Setups



🚀 PXE Boot Without WDS (Legacy BIOS Only)

Network booting with PXE can be configured without using WDS by leveraging DHCP custom options 66 and 67. However, this approach is not considered best practice—it comes with various limitations, potential issues, and can be frustrating to manage. Despite that, I successfully got it working, and this guide outlines the process I followed.

This write-up is primarily for my own reference, to avoid forgetting what I learned. Note that this method applies only to legacy BIOS booting and is not compatible with UEFI booting.

🛠️ What You’ll Need Before Getting Started

For this guide, you’ll need the following:

  • 🌐 DHCP server capable of setting Options 66 and 67.
    Example: I’m using a UniFi Dream Machine Pro.
  • 📁 TFTP server software.
    I recommend SolarWinds TFTP Server, which is free to download. Simply fill out the form with dummy info, and you’ll get the download link.
  • 💻 Hyper-V Generation 1 VM or a physical machine that supports legacy BIOS network booting.
    • ⚠️ Note: For PXE booting to work in a VM, you must add a Legacy Network Adapter in the VM’s settings. The default Network Adapter won’t work.
  • 📂 Appropriate boot files.
    These can be obtained by installing an evaluation copy of Windows Server and enabling the WDS role.

I’ll cover each of these in more detail later in the guide.

🚀 Getting Started

Make sure your Windows client has SolarWinds TFTP Server installed and configured with either a static IP or a DHCP reservation. Here are a few important points to keep in mind:

  • 🌐 Network Profile:
    Ensure your network connection profile is NOT set to Public. Windows often defaults to a Public profile for connected network adapters, which can block communication. To change it to Private, run this PowerShell command (replace "Ethernet" with your actual network adapter name if different):
  • 📂 Default TFTP Directory:
    The default folder is C:\TFTP-Root, where we’ll host our boot files. This folder does not need to be shared over the network or have special NTFS permissions.
  • 🛡️ Windows Firewall Settings:
    Keep the firewall enabled, but configure it to allow all inbound and outbound traffic on the Domain and Private profiles.
  • 🔒 Restrict TFTP Access:
    Within the SolarWinds TFTP Server software, limit connections to your local LAN subnet to improve security.
PowerShell
Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private

📁 Boot Files

This is the most complex part. We need to gather a variety of files to make PXE booting work. The easiest way to get these files is by installing Windows Deployment Services (WDS) on an evaluation copy of Windows Server.

Once WDS is configured, the necessary boot files will be generated and saved to the folder:
C:\RemoteInstall

The directory C:\RemoteInstall will include the following we will need:

  • boot.sdi

The directory C:\RemoteInstall\x64 will include the following we will need:

  • abortpxe.com
  • bootmgfw.efi
  • bootmgr.exe
  • default.bcd
  • hdlscom1.com
  • hdlscom1.n12
  • hdlscom2.com
  • hdlscom2.n12
  • pxeboot.com
  • pxeboot.n12
  • wdsnbp.com

Copy all of these files into the directory:
C:\TFTP-Root\Boot on your TFTP server.

If you want to learn more about what each file does, there’s a helpful table available at this link (I’ve also included an image of it below).

Take your time to review the table and understand the purpose of each file — this knowledge can be invaluable when troubleshooting.

⚠️ While this guide focuses on legacy BIOS booting, if you’re here trying to fix UEFI boot issues, this table might still be useful.


🎛️ UniFi DHCP Server Options

Since we’re not using WDS for our PXE server, it’s important to understand the specific files required to complete the boot process.

In the UniFi console, you configure Network Boot by setting DHCP Options 66 and 67 under the DHCP Server settings.

In my example:

Option 67 is set to the boot file name: \boot\wdsnbp.com

Option 66 is set to the IP address of my TFTP server — 192.168.1.100

For reference, Option 67 is mapped to C:\TFTP-Root\Boot\wdsnbp.com on my TFTP server. When wdsnbp.com is pulled down to the client the next following files are pulled.

  • pxeboot.com
  • bootmgr.exe
  • BCD
    • The Boot Configuration Data (BCD) file needs to be configured for a RAMDisk configuration and contains the path to boot.sdi and boot.wim files, more on this below.
  • boot.sdi
  • boot.wim
  • Fonts and secure boot and boot policy files.
    • We don’t really need these from my experience.

🛠️ Visual BCD Editor

To create your own Boot Configuration Data (BCD) you can edit the default.bcd file and rename it to BCD once finished. You can also read documentation here but the way I edit the file is to download and use Visual BCD, here.

BCD Store | {bootmgr} | Values


BCD Store | Loaders | Values

  • As you can see I am using a LiteTouchPE image from MDT which will be renamed to boot.wim and located at the path below. For your reference, it will be located in C:\TFTP-Root\Boot on my TFTP server.

BCD Store | {ramdiskoptions} | Values

  • Location of boot.sdi. For your reference, it will be located in C:\TFTP-Root\Boot on my TFTP server.

So as you can see, not very simple.

💻 Create BCD Store Using CMD

If you don’t want to use Visual BCD editor or other third-party programs you can use the Windows command line using bcdedit.exe. Here is a script below:

BAT (Batchfile)
# Create a BCD store using bcdedit.exe:

bcdedit /createstore C:\TEMP\BCD

# Configure RAMDISK settings:

bcdedit /store C:\TEMP\BCD /create {ramdiskoptions} /d "RAMDisk Options"
bcdedit /store C:\TEMP\BCD /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store C:\TEMP\BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
bcdedit /store C:\TEMP\BCD /create /d "Windows Boot Image" /application osloader

# The last command will return a GUID, for example:

# The entry {cd4acce3-ef87-11e6-ada6-f8b156ae2ab6} was successfully created.

# Copy this GUID for use in the next set of commands. In each command shown, replace "GUID1" with your GUID.

# Create a new boot application entry for the Windows Boot Image:

bcdedit /store C:\TEMP\BCD /set {GUID1} device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
bcdedit /store C:\TEMP\BCD /set {GUID1} path \Windows\system32\winload.exe
bcdedit /store C:\TEMP\BCD /set {GUID1} osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
bcdedit /store C:\TEMP\BCD /set {GUID1} systemroot \Windows
bcdedit /store C:\TEMP\BCD /set {GUID1} detecthal Yes
bcdedit /store C:\TEMP\BCD /set {GUID1} winpe Yes

# Configure BOOTMGR settings (remember to replace GUID1 in the third command with your GUID):

bcdedit /store C:\TEMP\BCD /create {bootmgr} /d "Windows Boot Manager"
bcdedit /store C:\TEMP\BCD /set {bootmgr} timeout 30
bcdedit /store C:\TEMP\BCD -displayorder {GUID1} -addlast

✔️ Verifying Boot Files

Now that you have your BCD file created these are the following files you will want in your C:\TFTP-Root\Boot directory on your TFTP server:

abortpxe.combootmgr.exepxeboot.com
BCDhdlscom1.compxeboot.n12
boot.sdihdlscom1.n12wdsnbp.com
boot.wimhdlscom2.com
bootmgfw.efihdlscom2.n12

🕰️ Legacy BIOS PXE Booting

The TFTP server transfer log will show some errors about not being able to find some fonts or secure boot policy files but I found this did not affect anything. If you want to be a perfectionist you can try and iron those out. Now below, here is the process working and loading. I was able to go through the MDT wizard and install an OS.


💡 UEFI PXE Boot Notes

If you want to try and get UEFI booting to work here are some things I found.

  • DHCP Option 67 would need to be set to:
Plaintext
\boot\wdsmgfw.efi
  • This means you will need the wdsmgfw.efi file. I did not see it in C:\RemoteInstall when WDS is installed on a server. After some research apparently the file gets loaded once you import a boot.wim image into WDS. I went ahead and did that, imported a boot.wim from a Windows 10 22H2 ISO, sources folder, and it did indeed appear in C:\RemoteInstall\x64 after that.

Option 66 holds the TFTP address, while option 67 holds the path and name of a NBP (Network Boot Program) to be retrieved from the TFTP server, loaded in memory and run.

The clients inform its pre-os runtime on their DHCP transaction using DHCP option 93

DHCP Option 93 Client’s pre-OS runtime
0 BIOS
6 EFI32
7 EFI64
9 EFI64

This way the DHCP server can provide specific NBPs depending on the client’s pre-OS runtime.

Once the NBP is running there’s is a sequence of chainloading (retrieving by TFTP and running) of other components like i.e. pxeboot.n12 and then bootmgr.exe (for BIOS clients) or just bootmgfw.efi (for UEFI clients).

The files bootmgr.exe/bootmgfw.efi will retrieve a BCD that contains (among other things) a “Menu” with all the WIM images available for booting, when the user selects an entry the bootmgr.exe/bootmgfw.efi will TFTP transfer, load in memory, and pass control to the corresponding WIM image. This is how PXE (WDS/MDT/SCCM) works on MS platforms.

I made the Option 67 path change and added DHCP option 93 with an integer value of 9 for x64 EFI and on a Hyper-V Generation 2 VM, it did grab wdsmgfw.efi from the TFTP server when network booting it continuously looks for Windows Deployment Services to respond and errors out. So I tried skipping that file and changing DHCP option 67 to:

Plaintext
\boot\bootmgr.efi

I also edited the BCD to point to winload.efi instead of winload.exe. The TFTP server transfer log shows it’s grabbing the BCD and fonts but still fails to load the boot.wim file with error 0xc0000225. So I feel like I am close yet so far away. I tried many different BCD parameters and I get the same result.

Conclusion

Setting up PXE booting without relying on WDS can be challenging, especially when working with legacy BIOS systems. However, with careful configuration of DHCP options, proper boot files, and a solid understanding of the process, it’s definitely achievable.

🌿 Final Thoughts

I hope this guide helps you navigate the complexities and get your UniFi network boot environment up and running smoothly. If you run into issues, take your time verifying each step and the associated files—troubleshooting is often the key to success.

Feel free to revisit this guide anytime or reach out if you need further assistance!

2 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply to Scott D. Cancel reply

Your email address will not be published. Required fields are marked *