PXE Boot TBWinPE/RE using Tiny PXE
Introduction
This tutorial provides instructions on how to PXE boot TBWinPE/RE using Tiny PXE and iPXE. This allows booting either the TBWinRE WIM or ISO file or even selecting between different build versions. Both x64 Legacy and x64 UEFI PXE booting is supported using IPv4.
A basic understanding of networking, PXE booting, and creating TBWinPE/RE builds is assumed.
The following program paths are used in this tutorial (if using different paths, adjust the instructions accordingly):
- C:\TBWinRE -- Contains the TBWinRE files for the PXE build that will be booted. The TBWinRE files can be copied from the installed IFW tbwinre folder location or downloaded from the TeraByte website (tbwinre.zip) and extracted to the folder. Note: While a TBWinRE build is created in this tutorial, a TBWinPE build could also be used.
- C:\TinyPXE -- Contains the Tiny PXE program and associated files.
In this tutorial, Tiny PXE is configured for the following. Depending on your network and systems, it may be necessary to use alternate settings.
- ProxyDHCP is enabled: There is already an existing DHCP server on the LAN (e.g. a router is assigning IP addresses). The existing DHCP server isn't modified.
- HTTPd is enabled: This runs a web server that allows downloading large files using HTTP, which is many times faster than using the TFTP default.
- Tiny PXE can be run and set online as needed for PXE booting.
Note: Secure Boot may need to be disabled when booting UEFI systems.
1. Download Required Files
Download and extract the Tiny PXE Server pxesrv.zip file:
Tiny PXE Server (on GitHub): https://github.com/erwan2212/tinypxeserver
Direct download link for pxesrv.zip:
https://github.com/erwan2212/tinypxeserver/raw/refs/heads/main/pxesrv.zip
- Extract pxesrv.zip to the C:\TinyPXE folder. If you use an alternate location, make sure to update the path where it's used in this tutorial.
2. Create TBWinRE PXE Build
In this step, TBWinPE/RE Builder will be run and configured. The Tiny PXE Server plugin will be downloaded, installed, and enabled for the build. Then a TBWinRE build will be created using the currently configured settings.
Note: The Tiny PXE Server plugin is intended to initially configure Tiny PXE. Generally, it's not necessary or intended to be run each time a TBWinPE/RE build is created. Additionally, if you plan to PXE boot multiple Windows WIM versions (e.g. Windows 10 and Windows 11), configuring on the later Windows version is recommended so the current booting files are used.
- Run TBWinPE/RE Builder and go into Settings and select the Plugins tab.
- Click the Download Plugins button. Select (check) the Tiny PXE Server plugin and click the Install selected plugins button.
- Once back on the Plugins tab, enable (check) the Tiny PXE Server plugin. If you used an alternate folder location for the files, select (highlight) the Tiny PXE Server plugin in the list, click the Configure button, and update the folder as needed.
- In the General Options section, enable the Include plugins in build option.
- If needed, configure any other build options as desired.
- Click OK to save the changes.
- Create the TBWinRE build normally.
- If you will be using the TBWinRE ISO file, run MakeDisk and create it. Using a short filename with no spaces is recommended (e.g. tbwinre.iso).
3. Copy Build WIM and/or ISO file to Tiny PXE Folders
After the build has successfully finished, copy the following files to the Tiny PXE location as indicated below.
From the C:\TBWinRE\ISO\sources folder:
- Copy boot.wim to the C:\TinyPXE\files\boot folder. Note: The boot.wim file is copied by the plugin if using v1.1 or later.
If you will be booting the TBWinRE ISO file:
- Copy the ISO file to the C:\TinyPXE\files\iso folder (create the iso folder, if necessary).
4. The iPXE Script File (tbwinpe.txt)
The iPXE script file (C:\TinyPXE\files\tbwinpe.txt, in this example) is created automatically by the plugin and is configured to boot a WIM file. If you will be booting an ISO file instead, edit the file and replace the code as shown in the example below for booting a single ISO file.
5. Run Tiny PXE
Run Tiny PXE Server (pxesrv.exe). The program does not require administrator privileges. Confirm the settings are correct (adjust if necessary).
- The ProxyDhcp option is enabled.
- The HTTPd option is enabled.
- Option 54 (DHCP Server) is the IP address for the system running Tiny PXE. If the system has multiple network adaptors, make sure the correct network is selected.
- Next-Server is the IP address for the system running Tiny PXE.
- In the Boot File section, Filename is set to ipxe.pxe.
- In the Boot File section, the Filename if user-class=gPXE or iPXE option is enabled and the selected file is tbwinpe.txt. This is the iPXE script to run.
Right-clicking in the log output area at the top of the window will open a context menu with several options, such as saving settings or opening the config file.
When ready, click the Online button to start the server. If prompted, allow the program through the firewall. If necessary, make sure the following ports are allowed for incoming connections, as needed:
| Service/Protocol | Port | TCP/UDP |
| DHCP | 67 | UDP |
| DNS | 53 | UDP |
| HTTP | 80 | TCP |
| Proxy DHCP | 4011 | UDP |
| TFTP | 69 | UDP |
The window will display log output as systems connect and files are requested. This information can be helpful for troubleshooting purposes.
Once the basic booting setup is working, if desired, you can change or expand what boots by adding a menu to select other WIM or ISO files using the example below. If needed, the C:\TinyPXE folder (in its entirety) can be moved to another system. For example, the TBWinRE build was created on a Windows 11 system, but a Windows 10 system is being used to run the PXE server -- just don't run it simultaneously on multiple systems on the same LAN.
Example iPXE Scripts
Note: Long lines in the example code may wrap depending on the width of the browser window.
Note: The wimboot "pause" parameter is being used to pause booting once the files are loaded (pressing a key will continue booting). This can be helpful while configuring the setup and while testing. Remove the "pause" parameter to boot directly. For example, the 'wimboot' line would be changed to:
kernel ${boot-url}/wimboot
Booting a Single WIM File
This script boots a single WIM file (boot.wim) located in the C:\TinyPXE\files\boot folder. This is the script code used by the plugin.
#!ipxe
set boot-url http://${dhcp-server}
kernel ${boot-url}/wimboot pause
iseq ${platform} pcbios && initrd -n bootmgr.exe ${boot-url}/BOOTMGR.EXE bootmgr.exe ||
iseq ${platform} efi && initrd -n bootx64.efi ${boot-url}/BOOTX64.EFI bootx64.efi ||
initrd -n bcd ${boot-url}/BOOT/BCD bcd
initrd -n boot.sdi ${boot-url}/BOOT/BOOT.SDI boot.sdi
initrd -n boot.wim ${boot-url}/BOOT/BOOT.WIM boot.wim
boot
Booting a Single ISO File
This script boots a single ISO file (tbwinre.iso) located in the C:\TinyPXE\files\iso folder.
#!ipxe
set boot-url http://${dhcp-server}
sanboot --no-describe ${boot-url}/iso/tbwinre.iso
boot
Menu Booting Multiple WIM & ISO Files
This script boots two WIM files (boot10.wim, boot11.wim) located in the C:\TinyPXE\files\boot folder. The script also boots four ISO files (tbwinre10.iso, tbwinre11.iso, ifugui4.iso, iflgui4.iso) located in the C:\TinyPXE\files\iso folder.
#!ipxe
set boot-url http://${dhcp-server}
menu iPXE Boot Menu
item --gap WIM Files
item winpe10 Windows 10 TBWinRE WIM (wimboot)
item winpe11 Windows 11 TBWinRE WIM (wimboot)
item --gap
item --gap ISO Files
item iso10 Windows 10 TBWinRE ISO (sanboot)
item iso11 Windows 11 TBWinRE ISO (sanboot)
item isoifu IFU GUI ISO (sanboot)
item isoifl IFL GUI ISO (sanboot)
choose target && goto ${target}
:winpe10
kernel ${boot-url}/wimboot pause
iseq ${platform} pcbios && initrd -n bootmgr.exe ${boot-url}/BOOTMGR.EXE bootmgr.exe ||
iseq ${platform} efi && initrd -n bootx64.efi ${boot-url}/BOOTX64.EFI bootx64.efi ||
initrd -n bcd ${boot-url}/BOOT/BCD bcd
initrd -n boot.sdi ${boot-url}/BOOT/BOOT.SDI boot.sdi
initrd -n boot.wim ${boot-url}/BOOT/BOOT10.WIM boot.wim
boot
:winpe11
kernel ${boot-url}/wimboot pause
iseq ${platform} pcbios && initrd -n bootmgr.exe ${boot-url}/BOOTMGR.EXE bootmgr.exe ||
iseq ${platform} efi && initrd -n bootx64.efi ${boot-url}/BOOTX64.EFI bootx64.efi ||
initrd -n bcd ${boot-url}/BOOT/BCD bcd
initrd -n boot.sdi ${boot-url}/BOOT/BOOT.SDI boot.sdi
initrd -n boot.wim ${boot-url}/BOOT/BOOT11.WIM boot.wim
boot
:iso10
sanboot --no-describe ${boot-url}/iso/tbwinre10.iso
boot
:iso11
sanboot --no-describe ${boot-url}/iso/tbwinre11.iso
boot
:isoifu
sanboot --no-describe ${boot-url}/iso/ifugui4.iso
boot
:isoifl
sanboot --no-describe ${boot-url}/iso/iflgui4.iso
boot
Links for More Information
Tiny PXE Tutorial: http://mistyprojects.co.uk/documents/TinyPXEServer/index.html
iPXE: https://ipxe.org/start
wimboot:
https://ipxe.org/wimboot