Skip to content

Comment on Netboot Windows 11 with iSCSI and iPXE

Comments

Hey Terin! Nice post!

I also netboot Windows this way! To run a 20 machines in my house off the same base disk image, which we use for LAN parties. I have code and an extensive guide on GitHub:

https://github.com/kentonv/lanparty

It looks like you actually figured out something I failed at, though: installing Windows directly over iSCSI from the start. I instead installed to a local device, and then transferred the disk image to the server. I knew that building a WinPE environment with the right network drivers would probably help here, but I got frustrated trying to use the WinPE tools, which seemed to require learning a lot of obscure CLI commands (ironically, being Windows...).

You observed some slowness using Windows over the network. I did too, when I was doing it with 1G LAN, but I've found on 10G it pretty much feels the same as local.

BTW, a frustrating thing: The Windows 10->11 updater also seemingly fails to include network drivers and so you can't just upgrade over iSCSI. I'm still stuck on Windows 10 so I'm going to have to reinstall everything from scratch sometime this year. Maybe I'll follow your guide to use WinPE this time.

Hey Kenton!

I figured you had done something similar with the LAN Party House. If I hadn't figured it out I was going to ask/look for your setup.

You observed some slowness using Windows over the network.

Mini-ITX makes it a bit difficult to upgrade to 10GbE (only one PCIe slot!), and the slowness isn't bad enough in-game to deal with upgrading it just yet.

BTW, a frustrating thing: The Windows 10->11 updater also seemingly fails to include network drivers and so you can't just upgrade over iSCSI.

I've read (and also observed, now) that if you install directly on iSCSI Windows doesn't make the recovery partition. This evidently also breaks 10->11 upgrades.

God bless you for this sir. I've been wanting to get Windows iscsi boot working, but there's always one more thing. Did you get anything else fun working with ipxe? all the exampled online seem so outdated.

If you get (i)pxe running, you can chain to https://netboot.xyz/ which lets you boot lots of open source stuff.

It's a bit of a mixed bag, because pxe environments have a way of not always being useful. On bios boot, there's tools from isolinux to memory load disk images and hook the bios calls... but if your OS of choice doesn't use bios calls for storage, it needs a driver that can find the disk image in memory.

For uefi boot, there's not a good way to do this, supposedly some uefi environments can load disk images from the network, but afaik, it's not something you can do from ipxe. Instead, for UEFI, the netboot.xyz folks have some other approaches; typically fetching the kernel and initrd separately or otherwise repackaging things rather than using official ISO images.

And I've run into lots of cases where while pxe seems to work, maybe the keyboard doesn't work in pxe, or something else doesn't get properly initialized and you end up having a better time if you give up and boot from USB.

System Rescue CD and Clonezilla are PXE-bootable.

"OneFileLinux: A 20MB Alpine metadistro that fits into the ESP" https://news.ycombinator.com/item?id=40915199 :

Ventoy, signed EFIstubs, USI, UKI

TIL about https://netboot.xyz/

Since the goal was just to have non-virtualized Windows to satisfy game developers, I haven't tried much else. Sorry.

all the exampled online seem so outdated.

Many of the guides felt like they've been only slightly dusted since the Windows XP days. I've seen none that even hinted at making the DVD ISO a target, leading me to believe it wasn't well supported 20 years ago.

I've seen none that even hinted at making the DVD ISO a target, leading me to believe it wasn't well supported 20 years ago.

One of the most underrated things about UEFI in my opinion is how it made booting simple. No longer did you need to use special tools (or arcane knowledge) to stick a special real-mode binary in to a normally hidden area of your intended media, now you just drop a few PE binaries in a filesystem your UEFI can read and let it figure itself out.

I just created a bootable restore image for one of my clients and it's literally a zip file that can be extracted in to the root of a FAT32 disk drive and will boot on any x86-64 UEFI PC, with Secure Boot fully operational. No special tools required, just drop files on any disk using a filesystem any computer that matters can read/write.

One of the most underrated things about UEFI in my opinion is how it made booting simple. No longer did you need to use special tools (or arcane knowledge) to stick a special real-mode binary in to a normally hidden area of your intended media, now you just drop a few PE binaries in a filesystem your UEFI can read and let it figure itself out.

In theory, yes. In practice, booting Slackware (elilo) from UEFI has been a challenge.

I guess for removable media that's fine, but Windows still likes to hide the ESP.

I guess for removable media that's fine, but Windows still likes to hide the ESP.

It's not hidden, it's shown in disk management, it's just not mounted by default.

IMO that is perfectly reasonable considering 99.999% of users will never want or need to do anything with it and those who do want/need to access it should have no problem finding a single well-documented command. For everyone else it's just a "delete system32" level temptation to do something stupid that'll break their system.

mountvol <letter>: /s

I honestly have no idea what it'll do if multiple EFI system partitions are present though. I presume this command will mount the one Windows has booted from.

Yeah, but even then to change the default loader you'll need to point it to something else using some arcane bcdedit command. Dropping some PE binaries is not good enough.

Or just boot in to the EFI config interface and set a new default that way.

Only if it's registered! Registering a new binary isn't usually in the customer motherboard menus.

I may have written one of those dusty guides in my younger days.

I've seen none that even hinted at making the DVD ISO a target, leading me to believe it wasn't well supported 20 years ago.

iPXE has always supported this, but the devil is always in the details.

Windows Setup has a disk-bootability-validation step that it runs before it'll let you install Windows. It checks that the firmware can actually see the drive (i.e. it was present during system boot) and understands the boot chain, looking for the ESP or MBR that will actually load Windows once Setup completes.

There's something about loading more than one disk into the iBFT[1] and hooking those disks into INT13 on a BIOS-based system that very frequently breaks one of those checks. You try to select a disk and Windows Setup complains about not being able to verify that it's bootable.

It'd all likely work just fine on a typical UEFI system these days.

Of course, since it's Windows, there's no "I checked and it's okay please install anyway" button. But I'm pretty sure you can just apply the wim manually from the command line and install the bootloader, but I was never clear if that process implemented the driver reflection step necessary to ensure the NIC would start on boot...

It's unfortunate that Windows Setup itself isn't open-source. It'd probably have made the time I spent doing this stuff a lot more interesting.

[1]: iSCSI Boot Firmware Table is a memory structure used to pass iSCSI disks from a firmware-level software initiator to the OS-level software initiator after the kernel takes over the hardware

[2]: https://ipxe.org/wimboot

Thanks, I skimmed some details about iBFT (mostly reading what the Linux kernel does with it) before writing the post, and came away with it likely being a difference in how things were hooked up in BIOS vs UEFI systems. Thanks for your perspective on it!

Oh, maybe the lack of recovery partition is my real problem, because I definitely deleted mine. The installer isn't really clear why it's failing, it just does its thing for a bit and then reboots into Windows 10 and says it didn't work, no explanation.

Things like this iPXE have a similarity to multibooting to where you may be a lot better off NOT having a (single) dedicated Recovery partition at all, but you need full responsiveness to Windows Update.

And please no hibernation for multibooting. POWERCFG /H OFF.

For recovery manipulation you need to utilize the REAGENTC command, and take advantage of the existing default C:\Recovery folder. Normally this is not considered the best location for "recovery" since if C: gets borked so does default recovery console.

And this really gives an example of essential use of inbuilt Helps.

On a mainstream system all you have is a single (hidden) ESP volume containing its EFI folder:

In admin CMD, type Bcdedit /Enum All to show all your boot entries.

If "recovery" is even set up, there will be a Boot Loader entry where the Device is a Ramdisk. If so there will also be a volume letter in square brackets if the target volume is unhidden at the time.

But for those of you with no recovery set up, you get to do it yourself as you see fit.

Type Reagentc /info, it will confirm recovery is disabled.

Reagentc /? gives you the next clue, the example /setreimage.

Copy the displayed REAGENTC.EXE /setreimage /? from the display down to the active command line (or just type it in). You get two syntax examples, it's the second one. But you probably don't even have an R: volume and you want to use C: anyway to make Windows more self-sufficient from its own partition.

edit it so:

REAGENTC.EXE /setreimage /path c:\Recovery\WindowsRE /target C:\Windows

After this operation is successful, there is still no apparent change under Reagentc /info, recovery is still disabled. And your BCD remains unchanged with no ramdisk object yet.

"Reagentc /enable" will then autoadd the ramdisk recovery bootentry to the BCD, directing the recovery routine (when triggered) to point to your C: volume which will always exist accessibly, plus most likely have enough free drive space to accommodate the larger updates to the recovery WIM files themselves, which are recently giving users show-stoppers when their dedicated factory recovery partitions were not big enough for that.

Now for the good news.

Once you find a ramdisk recovery bootentry in your BCD, an easy baby-step toward multibooting is a piece of cake. Everybody already has a Windows boot menu that you are using every time you boot, it is simply not displayed if there is only one entry, like most factory set ups.

So add the Recovery Console to the menu your dang self.

It can come in really handy.

From the Bcdedit output text, copy the shown GUID for the main ramdisk recovery object, so you can paste afterward and don't have to type it all into the following command:

bcdedit /displayorder {your-guid-here} /addlast

Then if you don't want to maintain the default 30 second timeout before progressing to the default OS on the bootmenu, set it for something like 5 seconds:

bcdedit /timeout 5

That's it.

Now if you don't have a touchscreen, you probably would be better off with the "legacy" text menu, for that you would need to change the bootmenupolicy from Standard to Legacy for the GUIDs that have a bootmenupolicy. Bcdedit /set {target-guid-here} bootmenupolicy Legacy.

Also remember if using Powershell it's still having trouble with the curly brackets so in every case they need to be quoted like Bcdedit /set "{target-guid-here}" bootmenupolicy Legacy.

Also interesting using it as an EFI executable. Remind me to start adding that to the menu of ... well, everything.

Did you run into any licensing issues with your setup?

Microsoft keeps track of licenses in some cloud database keyed by machine fingerprint, so if you run the same image on multiple machines it's supposed to work fine. I have actually purchased licenses for all the machines.

I have found, though, that sometimes machines don't actually query Microsoft for activation info, and instead complain about activation after a few hours. If I then manually go to the activation settings and click "troubleshoot activation", then it realizes that it's already registered in the Microsoft database and it stops complaining.

But this is really annoying to have to do for every machine at every party, so more commonly we just don't bother, and some people end up with the annoying "Activate Windows" overlay in the corner. But it's actually far enough into the corner and subtle enough that often people just don't even notice it's there and it's fine...

If you’ve already purchased licenses, have you considered using more “illicit” means keep the machines activated?

Love that party house !

Looks like you have a similar soundbar to my LP-S08.

I had to open it up to access the battery, and interestingly the audio output on the PCB was naturally laid out for stereo operation like you would expect.

Except on mine only one channel of the PCB was populated from the factory, the other channel empty, and it was output to both speakers as mono not stereo.

I recently saw this and want to do something similar with just 4 machines to play relatively simple games (e.g. age of empires). I might follow what you have here directly, but am also considering just using a single machine with 4 vms.

The big constraint for me is I don't want to buy a bunch of hardware.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.