Jump to content

How to: Use (i)PXE to Install Windows from a Network

 What do you mean,"Install from a network."?

Spoiler

Answering this requires a bit of a history lesson. Chronologically since the inception of the Personal Computer OS installation was performed using Floppies (if not cassettes or punch cards), followed by CD's, then USB devices. Meanwhile since the mid 1980's another technology had been in the works and was never given much credibility in the consumer space. This technology would be known as BOOTP. BOOTP in conjunction with TFTP (developed a few years earlier) enabled a computer to discover it's own IP, the IP of the TFTP server, and reach out to it. This technology was then jointed with Network Bootstrap Program or NBP. This was effectively the boot file saved on the TFTP server and the file that BOOTP would download and run instead of using local storage. No Operating System was used during this operation. Fundamentally this was the inception of PXE.

 

Later in the late 1990's Intel released it's own implementation of PXE predominately relying on TFTP and the successor to BOOTP, DHCP. PXE which received many updates and later renamed iPXE Intel continued with supporting this feature and implemented it into the overwhelming majority of their network cards. To this day iPXE is a feature you will find supported on almost every motherboard on the market that has a network adapter. In addition to this there are Open Source Community Based Projects dedicated to continuing the development of iPXE which can be used to bring support to platforms that do not.

 

So how do I use (i)PXE to install an Operating System?

(i)PXE can be implemented into a network through a multitude of ways and today supports a multitude of features not all of which are needed or will be used to install Windows. First and foremost we have to setup a (i)PXE server the easiest of which I will demonstrate using AIO Boot Creator.

 

531454334_Screenshotfrom2022-07-0221-13-54(1).png.824c72440dde48c78615b5f0605135ec.png

 

156345262_Screenshotfrom2022-07-0221-13-54(2).png.ee3030900fe7368802ff13949924c7a3.png

 

Tiny PXE Server (a sub-component of AIO Boot) as it's name implies is a convenient, small, and relatively simplistic Windows based application used for hosting a (i)PXE server. The program includes all of the functionality we will require to install Windows on both Legacy & UEFI systems.

 

NOTE: In order to proceed you are going to need:

  1. Administrative Permissions
  2. A Password Protected Local Account on the Windows computer hosting the server.
  3. A wired Ethernet connection for the server & client(s)

Installing AIO Boot Creator

Spoiler

After downloading the AIO Boot file it comes compressed (.7z). If you don't already have a unzip program installed applications such as 7zip, NanaZip, WinRAR, and WinZIP Universal should all get the job done, all of which are available online or in the Microsoft Store. For the purposes of this tutorial I will demonstrate NanaZip.

 

Start by opening the zipped folder, then click Extract. You'll be asked where to save the files. You can create a folder to drop the files into or select an existing one. Then click OK.

 

1996424747_Screenshotfrom2022-07-0222-03-27.thumb.png.cea53ae376789253ebcbb72b3ae79f47.png

 

 

From here you will find that the zipped folder is password protected.

 

1518476412_Screenshotfrom2022-07-0222-03-55.png.541fb9ddc307bcf6fe66f25ecd71d56f.png

 

 

The password is: aioboot

 

With all the files extracted you should see everything as shown below.

 

616760246_Screenshotfrom2022-07-0222-14-31.thumb.png.ac17380d8abc4a680bd85460fc4c569b.png

 

With AIOCreator extracted it can be installed to any of three locations:

  1. C:\
  2. Another HDD/SSD
  3. A USB stick.

NOTE: It's important that whichever location you pick, all of the files/folders shown above must go in the highest directory. That is you cannot put them inside a folder.

 

For the purposes of this tutorial I have a independent 32GB drive (E:\) to drop the files into but as i stated you can use your C:\ drive if that's all you have at your disposal.

 

1277462253_Screenshotfrom2022-07-0222-32-14.thumb.png.c2e61859ee1c0c469543ef6e619a37ae.png

 

At this stage the program installation is complete.

 

Sharing a Storage Drive on Windows

Spoiler

In order for (i)PXE clients to pull files from the server the drive hosting AIO Creator & Mini iPXE Server must be accessible by network clients on the LAN. Windows makes this possible by "Sharing a Drive".

 

From This PC right-click the drive you installed the files to. From the drop-down menu go to -> Give access to -> Advanced sharing...

 

535045195_Screenshotfrom2022-07-0222-45-43.png.89d2ca33d18f55f1c6272fb57e49439d.png

 

This will bring up the drive sharing configuration menu.

 

295563039_Screenshotfrom2022-07-0222-46-13.png.dbdb4fd8a0c8866e598836818d1c6c96.png

 

From here click Advanced Sharing... then from the following menu:

  1. Tick the box next to Share this folder
  2. Click Apply.

965858886_Screenshotfrom2022-07-0222-57-34.png.c303f6e85800a7e62fa9a1f3843c48c8.png

 

You will be able to tell if you were successful by the tiny icon that appears next to your drive under This PC.

 

886729449_Screenshotfrom2022-07-0223-00-05.png.8fab32f3cff7fafdb445fe8e9f781498.png

 

 

Configuring the Windows Installer

Spoiler

We can now run the AIO Creator application by double-clicking AIOCreator.exe. When AIO Boot Creator runs for the very first time you may find that it's in the wrong language.

 

708670843_Screenshotfrom2022-07-0223-15-19.png.4ac6d6cf586295c3ece8d72cde6980f4.png

 

This can very quickly be fixed by going up to Language and changing it to your preference.

 

From here you are going to need to acquire a Windows.ISO file of whatever version you are looking to install over the network. 

 

What is a Windows.ISO file?

Spoiler

A Windows.ISO file or any file ending with the .ISO extension for that matter is a file that acts as a virtual CD. Back when most Operating Systems were installed via physical CD a method was devised to make those CDs virtual and this offered people a plethora of versatility with how data and Operating Systems could be shared, modified, copied, or installed. Today .ISO files play a crucial role in OS installation and file sharing.

 

So how do I get a Windows.ISO?

Spoiler

Microsoft actually makes the process fairly painless to download the latest version of Windows 10 using the Windows Media Creation Tool. As of the date of posting this tutorial you should see a download for a file called MediaCreationTool21H2.exe.

 

Upon launching the creation tool you will need to work your way through the following prompts:

  1. Applicable notice and license terms
    1. Accept the EULA
  2. What do you want to do?
    1. Create installation media (USB flash drive, DVD, or ISO file) for another PC
    2. Click Next
  3. Select language, architecture, and edition
    1. Leave everything on default.
    2. Click Next.
  4. Choose which media to use
    1. ISO File
    2. Click Next
    3. Choose where to save Windows.iso. Default is your Documents folder. Which is fine.
    4. Click Save (the file will be downloaded which may take some time to complete)
  5. Burn the ISO file to a DVD
    1. Click Finish. We do not want to do that.

Photographic instructions provided below.

 

Step 1

1023616703_Screenshotfrom2022-07-0220-11-04.png.f6f265098c9bc890fdcc1d8d7c740a13.png

 

Step 2

578682653_Screenshotfrom2022-07-0220-11-52.png.470a4472fb93c7695728bae9a4e7f1e7.png

 

Step 3

1019532886_Screenshotfrom2022-07-0220-12-06.png.9da88257c91091b53e281c3b61cfab36.png

 

Step 4

563916175_Screenshotfrom2022-07-0220-12-28.png.ea1a2725e633548fc48cb6eced16db52.png

 

1021381843_Screenshotfrom2022-07-0220-13-28.png.8b3f79774d07ef4eeb4ec13d67d7b62b.png

 

Step 5

1769183156_Screenshotfrom2022-07-0220-17-52.png.663bb0a3784689a85482a93668c9dc17.png

 

 

 

Once you have your Windows.ISO file ready, go to the Integration tab of AIO Boot Creator. Here is where you can induct a plethora of OS.ISO files.

 

473204936_Screenshotfrom2022-07-0314-09-21.png.3b5c3ee2f6a718d0d58864e6e90e96ed.png

 

  1. Select Pack
    1. From the drop-down find Windows.
    2. From the drop-down find Windows 7/8.1/10/Server Setup
  2. Select File
    1. Click ...
    2. Select Windows.iso from wherever you saved it.
    3. Click Open

 

583651803_Screenshotfrom2022-07-0314-13-04.png.97a073c0bb23015d355bbc331bf1999a.png

 

From here click OK. You may receive a prompt to install ImDisk. Click OK.

 

993197970_Screenshotfrom2022-07-0314-24-16.png.52b876d0488e1087d8799978c33544b9.png

 

Now choose a name for this file. This is the name that will appear on the (i)PXE menu when you go to perform the Windows install operation.

 

921323159_Screenshotfrom2022-07-0314-25-13.png.315fdac8425969d0ff352da4839b311a.png

 

After this the .ISO image will be imported to AIO Boot Creator and will finish importing with the following prompt.

 

993868061_Screenshotfrom2022-07-0314-25-38.png.1c1a0cc7acead7e38c463213382266c3.png

 

Go ahead and click OK. Setup of AIO Boot is complete.

 

Running Tiny PXE Server for the First Time

Spoiler

Going back to the Main tab click Run PXE. This will run the sub-application Tiny PXE Server. When running Tiny PXE Server for the first time Windows Firewall will likely complain.

 

1564754951_Screenshotfrom2022-07-0314-40-52.png.64fec18adc336af2350a5edeea060b2a.png

 

2058804145_Screenshotfrom2022-07-0314-41-40.png.2ed9d600510f891b1fe06cfca54b6ee8.png

 

  1. FreeNFS.exe is a NFS Server application meant to allow the sharing and booting of GNU/Linux distributions via the Network File System protocol NFS and is optional if you do not want to allow it access.
  2. PXESrv.exe is our server for hosting our Windows Network Installer and will require access so click Allow access.

 

And with that our server is now live.

 

399625702_Screenshotfrom2022-07-0314-59-21.png.ef7661d6ed6d91e3871e4aab16ad9656.png

 

For how simple Tiny PXE Server is it still hosts a multitude of nice features. For example it pre-configures itself based on your network. Right now it is possible to test (i)PXE Boot on a client on the same subnet but before we do that there's a few important points to go over.

  1. The default configuration may not work well with your network setup.
    1. Tiny PXE Server supports features like ProxyDHCP since multiple DHCP servers on one subnet is usually not a good thing Tiny PXE Server can forward DHCP requests onto your home router. This is helpful when random clients need an IP and happen to get a response from Tiny PXE Server instead of the Router but your network setup may or may not allow this and will require modification accordingly.
  2. Legacy & UEFI BIOS Support.
    1. As previously mentioned at the beginning of this tutorial Tiny PXE Server should work with both Legacy & UEFI clients. However if you have a UEFI client that isn't responding to the iPXE server properly there is a good chance you will have to disable Secure Boot as this is usually the cause of the problem.
  3. Alternate Networks Without a Router.
    1. If for whatever reason your setup does not contain a DHCP server you will want to disable ProxyDHCP. This will make every client on the network treat this server as the DHCP server.

For the most part all other settings can be left alone. If you have a special situation you want help working through comment below.

 

Outside of this we can try enabling iPXE on a client and see what happens when we boot it.

 

Booting an (i)PXE Client

Spoiler

With Tiny PXE Server running somewhere on your network we're ready to (i)PXE boot a computer. However everybody's BIOS is different so I cannot provide universal instructions here. Typically if (i)PXE isn't already enabled as a boot option you may find it in the Boot Menu which depending on your motherboard may be brought up at POST using F8, F10, or F11 (depending on vendor/series). Alternatively you can enter the BIOS and find your way to the Boot tab and enable (i)PXE there.

 

Once you have (i)PXE enabled save & exit. Alternatively check if you have a Boot Override menu in the BIOS (usually under the Save & Exit menu). Sometimes it's an option in there. Once launched you should see the following behavior:

 

This is what it looks like on the server side:

1:09:10 PM DHCPd:DISCOVER received, MAC:BA-DD-AD-63-1D-B8, XID:3AC915A1
1:09:10 PM DHCPd:OFFER sent, IP:0.0.0.0, XID:3AC915A1
1:09:14 PM DHCPd:REQUEST discarded, MAC:BA-DD-AD-63-1D-B8, XID:3AC915A1
1:09:14 PM PDHCPd:REQUEST received, MAC:BA-DD-AD-63-1D-B8, IP:192.168.0.23, XID:48FB8909
1:09:14 PM Proxy boot filename empty?
1:09:14 PM PDHCPd:DHCP_ACK sent, IP:192.168.0.23:4011, xid:48FB8909
1:09:15 PM TFTPd:DoReadFile:ipxe64.efi B:1468 T:1064704
1:09:15 PM TFTPd:DoReadFile:ipxe64.efi B:1468 T:0
1:09:21 PM DHCPd:DISCOVER received, MAC:BA-DD-AD-63-1D-B8, XID:95D3EA04
1:09:21 PM DHCPd:OFFER sent, IP:0.0.0.0, XID:95D3EA04
1:09:22 PM DHCPd:DISCOVER received, MAC:BA-DD-AD-63-1D-B8, XID:95D3EA04
1:09:22 PM TFTPd:DoReadFile:menu.ipxe B:1432 T:7593
1:09:22 PM HTTPd:Connect: 192.168.0.18, TID=2884
1:09:22 PM HTTPd:Client: 192.168.0.18 [GET] /grub/themes/splash.png
1:09:22 PM HTTPd:Server : Returning /grub/themes/splash.png
1:09:22 PM DHCPd:OFFER sent, IP:0.0.0.0, XID:95D3EA04
1:09:22 PM DHCPd:REQUEST discarded, MAC:BA-DD-AD-63-1D-B8, XID:95D3EA04
1:09:34 PM HTTPd:Exception: , Connection Closed Gracefully.
1:09:34 PM HTTPd:DisConnect: TID=2884

This may look like gibberish to a lot of people but fairly simply:

  1. The (i)PXE Client queried the server for an IP.
  2. The (i)PXE Server forwarded the request to the local router.
  3. Local router responds back with an IP.
  4. The (i)PXE Server forwards the IP of TFTP, the file to download, in addition to the queried IP to the (i)PXE Client.
  5. The (i)PXE Client receives IP and as requested by the server requests the file to download from TFTP (ipxe64.efi).
  6. The (i)PXE Client chainloads ipxe64.efi which is a special updated copy of iPXE.
  7. Now updated, client runs through the same process again receiving a different file to fetch (menu.ipxe). Followed by splash.png.

 

This is what it looks like on the client side. NOTE: Your output will vary to a degree

>>Start PXE over IPv4
  Station IP address is 192.168.0.23
  
  Server IP address is 192.168.0.21
  NBP filename is ipxe64.efi
  NBP filesize is 1064704 Bytes
 Downloading NBP file...
 
  NBP file downloaded successfully.
BdsDxe: loading Boot0002 "UEFI PXEv4 (MAC:BADDAD631DB8)" from PciRoot (0x0)/Pci(0x1E,0x0)/Pci(0x1,0x0)/Pci(0x12,0x0)/MAC(BADDAD631DB8,0x1)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)
BdsDxe: starting Boot0002 "UEFI PXEv4 (MAC:BADDAD631DB8)" from PciRoot (0x0)/Pci(0x1E,0x0)/Pci(0x1,0x0)/Pci(0x12,0x0)/MAC(BADDAD631DB8,0x1)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)
iPXE initialising devices...ok


AIO BOOT
iPXE 1.20.1+ (gbf05) -- Open Source Network Boot Firmware -- https://www.aioboot.com
Features: DNS FTP HTTP HTTPS iSCSI NFS TFTP SRP VLAN AoE EFI Menu
Confiuring (net0 ba:dd:ad:63:1d:b8)...

 

Following this you will be presented with the iPXE Boot Menu.

 

952379415_Screenshotfrom2022-07-0317-06-17.thumb.png.4df5be6cc59ec9b9a21b83cb5519e0e2.png

 

We want WinPE & Setup. Use the arrow keys to highlight it if it's not selected by default and hit Enter. You will then see the following menu.

 

1287489874_Screenshotfrom2022-07-0317-10-10.thumb.png.84396a3ec67195619b4534793c8ff88e.png

 

If you recall this is the exact filename that was typed in when importing your .ISO file. As you can imagine this opens up the ability to run many additional ISO files as this list can contain multiple. We just have one for the sake of demonstration. Go ahead and hit Enter. The .ISO files will start being pulled from the Tiny PXE Server until you land on the following page.

 

1436579149_Screenshotfrom2022-07-0317-16-46.thumb.png.06f91ded5cabaf6a917d9f7abc3cfc88.png

 

At this stage you have two options:

  1. You can type in the hostname of the Tiny PXE Server followed by the drive hosting the files.
    1. \\Desktop-r44jkmk\e
  2. You can type in the IP of the Tiny PXE Server followed by the drive hosting the files.
    1. \\192.168.0.21\e

It should look like this before you hit Enter or else you'll get an error.

 

1182068814_Screenshotfrom2022-07-0317-32-27.png.7e4f07713da82ee0d2ae8974b5de179d.png

 

When you do hit Enter, if it works, a Command Prompt will open asking you for your computers (server) username:

Enter the user name for '192.168.0.21':

Once you've done that it'll ask for the user password.

Enter the user name for '192.168.0.21': ipxe-installer
Enter the password for 192.168.0.21:

After this the normal Windows Installer screen will appear.

 

1166069803_Screenshotfrom2022-07-0317-41-05.thumb.png.31c967c989191a50900557360d3f9f81.png

 

After this installing Windows is no different from installing Windows locally. Enjoy! :old-grin:

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×