The Ultimate Guide to Creating Your Own PXE Server with iPXE for Windows 10 Installation

0 0
Read Time:6 Minute, 35 Second

If you want to install Windows 10 on multiple computers without having to manually install it on each one, then a PXE server with iPXE is your solution. A PXE (Preboot eXecution Environment) server allows you to boot multiple computers from the network and install the operating system remotely, without the need for physical media like a DVD or USB drive. iPXE is a free and open-source PXE implementation that provides advanced features and flexibility for network booting. In this tutorial, we’ll show you how to create your own PXE server with iPXE and use it to install Windows 10 over the network.

Chapter 1: Introduction

Before we dive into the technical details of creating a PXE server with iPXE, let’s take a brief look at what a PXE server is and why you would want to create one.

A PXE server is a server that provides boot files and installation files to client computers on the network. PXE booting allows a computer to boot up from the network instead of its local hard drive. PXE booting is useful in situations where a computer’s local storage is damaged or inoperable, or when you need to install an operating system on multiple computers at once.

iPXE is a powerful and flexible open-source implementation of the Preboot Execution Environment (PXE) protocol. iPXE extends the capabilities of the traditional PXE protocol and can be used to boot and install an operating system over a network.

Chapter 2: Setting Up the PXE Server

To create a PXE server with iPXE, you need the following hardware and software:

  • A computer or server to act as the PXE server
  • A DHCP (Dynamic Host Configuration Protocol) server to assign IP addresses to client computers
  • A TFTP (Trivial File Transfer Protocol) server to serve boot files and installation files to client computers
  • An HTTP (Hypertext Transfer Protocol) server to serve installation files to client computers

Here’s a step-by-step guide to setting up the PXE server:

  1. Install a DHCP server on the PXE server: DHCP is used to assign IP addresses to client computers. You can use a free DHCP server like dnsmasq, which is available for Linux and Windows. Follow the instructions for your chosen DHCP server to install and configure it on the PXE server.
  2. Install a TFTP server on the PXE server: TFTP is used to serve boot files and installation files to client computers. You can use a free TFTP server like tftpd-hpa, which is available for Linux and Windows. Follow the instructions for your chosen TFTP server to install and configure it on the PXE server.
  3. Install an HTTP server on the PXE server: HTTP is used to serve installation files to client computers. You can use a free HTTP server like Apache, which is available for Linux and Windows. Follow the instructions for your chosen HTTP server to install and configure it on the PXE server.
  4. Download the iPXE binary: You can download the latest iPXE binary from the official website (https://ipxe.org/download). Extract the binary and copy it to the TFTP server’s root directory.
  5. Configure the DHCP server to serve the iPXE binary: Edit the DHCP server’s configuration file to add the following lines:
option space ipxe;
option ipxe-encap-opts code 175 = encapsulate ipxe;
option ipxe.priority code 1 = signed integer 8;
option ipxe.keep-alive code 8 = unsigned integer 8;
option ipxe.no-pxedhcp code 176 = unsigned integer 8;
option ipxe.pxeext code 16 = unsigned integer 8;
option ipxe.version code 32 = string;
option ipxe.arch code 93 = unsigned integer 16;
option ipxe.bus-id code 177 = string;
option ipxe.username code 178 = string;
option ipxe.password code 179 = string;
option ipxe.reverse-username code 180 = string;
option ipxe.reverse-password code 181 = string;
option ipxe.msi code 189 = unsigned integer 8;
option ipxe.efi code 190 = unsigned integer 8;
option ipxe.ilo4-efi code 191 = unsigned integer 8;

# iPXE binary filename
option ipxe.efi32.filename code 210 = string;
option ipxe.efi64.filename code 211 = string;
option ipxe.efi64-32.filename code 212 = string;

# iPXE binary location
option ipxe.efi32.url code 220 = string;
option ipxe.efi64.url code 221 = string;
option ipxe.efi64-32.url code 222 = string;

# iPXE binary type
option ipxe.arch code 93 = unsigned integer 16;

Then add the following to your DHCP server’s subnet configuration:

filename "undionly.kpxe";
  1. Create the iPXE script: An iPXE script is a text file that tells iPXE what to do when it boots up. Here’s an example iPXE script that will boot a Windows 10 installation over the network:
#!ipxe

set boot-url http://${next-server}

set win10-amd64-url ${boot-url}/win10-amd64
set win10-amd64-installer ${win10-amd64-url}/setup.exe

kernel ${boot-url}/wimboot
initrd ${boot-url}/bootmgr.exe bootmgr.exe
initrd ${boot-url}/boot/bcd BCD
initrd ${boot-url}/boot/boot.sdi boot.sdi
initrd ${win10-amd64-url}/boot.wim boot.wim
boot

In this script, we’re setting a variable for the Windows 10 installation files, pointing iPXE to the WIMBoot kernel, and specifying the boot files and installation files to load.

  1. Test the PXE server: To test the PXE server, boot up a client computer that is connected to the same network as the PXE server and configure its BIOS to boot from the network. The client computer should boot into iPXE and load the Windows 10 installation files over the network.

That’s it for setting up the PXE server with iPXE. In the next chapter, we’ll show you how to deploy Windows 10 over the network using the PXE server and iPXE script.

Chapter 3: Deploying Windows 10

Now that you’ve set up the PXE server and created the iPXE script, it’s time to deploy Windows 10 over the network.

  1. Download the Windows 10 installation files: You can download the Windows 10 ISO file from the official website (https://www.microsoft.com/en-us/software-download/windows10ISO). Extract the files to your HTTP server’s root directory.
  2. Create a folder for the Windows 10 installation files: Create a folder on your HTTP server for the Windows 10 installation files. For example, you can create a folder named “win10-amd64” and copy the contents of the “sources” folder from the Windows 10 ISO into it.
  3. Modify the iPXE script to point to the Windows 10 installation files: Edit the iPXE script and modify the “win10-amd64-url” variable to point to the folder you created in step 2. For example:
set win10-amd64-url ${boot-url}/win10-amd64

4. Test the deployment: To test the deployment, boot up a client computer that is connected to the same network as the PXE server and configure its BIOS to boot from the network. The client computer should boot into iPXE and load the Windows 10 installation files over the network. Follow the on-screen prompts to complete the Windows 10 installation.

Congratulations, you have successfully created a PXE server with iPXE and used it to install Windows 10 over the network!

Chapter 4: Advanced Configurations

There are many advanced configurations that you can implement with iPXE and your PXE server, such as:

  • Using SSL/TLS for secure booting
  • Automating the installation process with unattended installation files
  • Setting up a boot menu for multiple operating systems and configurations

To learn more about these advanced configurations and how to implement them, check out the iPXE documentation and our next article where we create a Custom Boot Menu.

Chapter 5: Conclusion

In this tutorial, we’ve shown you how to create your own PXE server with iPXE and use it to install Windows 10 over the network. With a little bit of setup and configuration, you can save time and effort by deploying Windows 10 to multiple computers at once. We hope this tutorial has been helpful and informative, and that you have fun exploring the possibilities of iPXE and PXE booting!

Happy
Happy
100 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a comment