Guide Index Quick Links

Installing Windows 7 over PXE to a Ryzen System

Created on December 10, 2022

  1. Getting WinPE (Windows 7 Version)
    1. Integrating New Stuff into WinPE
    2. Building the WinPE ISO
  2. Preparing the Windows 7 Installation Source for a Network Share

Inevitably, there's going to be many users who still need to run Windows natively for one or several applications that cannot yet be sufficiently replaced by free alternatives. Maybe they have a bunch of old project files they need to go through, or there's some device that needs to be used which simply does not operate optimally elsewhere. For everything else, Linux should always be favored to maintain good health, but while we all wait for Kdenlive and Olive to grow stronger and yet more intuitive, I can help get you covered for those Adobe programs you may still have to rely on. You don't have to put up with the bullshit of Windows 10 and 11; it is still very much possible to run Windows 7 on a Ryzen system.

The prerequisites here may be different from what you're really wanting to go for. My guess is that you'll be wanting to burn a new DVD or reflash a USB mass storage device, but I never liked bothering with physical media. So, for the most optimal route, I'll be grabbing a WinPE image that I will modify to include support for later necessities, and it will be loaded by PXELINUX when it is assembled into a new ISO. Similarly, the actual Windows 7 installation medium will have a plentiful of drivers and updates preloaded into it. The methods to be used do not involve extraneous tools such as NTLite or AIO Extractor. It's better to do this with Microsoft's own programs so as to get a proper idea of the whole process.

You should have a PXE server running by now; dnsmasq has its own TFTP service built-in if you plan to use that, or you can go with tftpd-hpa if you're using other service packages in tandem with TFTP. These are for Linux; if you will be serving an installation from a Windows machine, you can always use TFTPD32/64. It is assumed that you'll conduct the network boot over BIOS, as UEFI requires setting up things differently. If you don't know how to get a PXE server running, check out the guides for configuring dnsmasq and PXE to help get you started. There's plenty other online resources out there as well.

You probably need a proper Windows installation to move along; while it may be possible to get the truly needed programs working under WINE, I can't confirm this as I have not tried it myself. If you don't have a spare Windows installation somewhere of version 7 or later, you can brew up a quick and dirty, temporary installation in a virtual machine. QEMU is fine for the job, provided you have a means of transporting files back and forth easily.

Getting WinPE (Windows 7 Version)

The Windows 7 version of WinPE is still available for download on Microsoft's website here, distributed as part of the Windows Automated Installation Kit DVD. Even so, as we're really close to Windows 7's end of its ESU period, it is entirely possible this may be taken down in the near future. Once you've got that, you can either load the ISO into a virtual machine, extract the contents of the file with something like 7-Zip, or, if you're really wasteful, you can burn it to an actual DVD.

Deployment Tools Command Prompt

Once it is loaded somehow, run the AutoRun program and select Windows AIK Setup. Go through the steps of the installation wizard normally. After that's done, a shortcut in the Start menu will appear; go to Programs > Microsoft Windows AIK > Deployment Tools Command Prompt. This shortcut preloads some paths to commands you'll be using to get the appropriate WIM and build a new bootable ISO. You should also open up a separate command prompt as an administrator to be able to use another command; you can do this by right clicking on the command prompt icon and selecting Run as administrator.

You'll need to decide on a new directory for placing the WinPE files at. You'll also need to know if you're going to be targeting a 32-bit or 64-bit client. Getting the necessary files copied over is easy. For the 64-bit version, run this command:

copype amd64 C:\winpe

This will create a new directory at C:\winpe and copy some essential files over. If you need the 32-bit version, run this instead:

copype x86 C:\winpe

If you plan to target both 32-bit and 64-bit clients, you should have separate directories for each, like winpe_x86 and winpe_amd64.

After running the command, you will also be moved into the newly created directory. You'll want to run this other command real quick:

copy winpe.wim ISO\sources\boot.wim

You could also move the WIM file to this directory with the new name if you're more confident with the process or otherwise want to save on space. If you don't need to integrate anything, proceed to Building the WinPE ISO.

Integrating New Stuff into WinPE

If you are working with newer network adapters, or even later systems overall which exclusively use XHCI for USB devices, you need to integrate the drivers for them into WinPE. The same goes with if you plan on installing to an NVMe SSD. Integrating all the drivers will make it MUCH easier to get Windows 7 installed on XHCI-exclusive systems, especially those that don't even have a PS/2 port of any kind.

I've repackaged the necessary drivers (courtesy canonking) and NVMe updates into a new ZIP file you can download here. Some of the drivers included here may fail signature checks and/or were hacked to work on Windows 7, so I can make no guarantees on their safety or stability. However, I have used the modified X570 USB driver on Windows 7 for one and a half years before switching to Linux full time, so it should be legit. By the looks of it, some drivers catering to Intel motherboards are not included and may not work on such systems; if there's any such later drivers known to work in Windows 7, I'd be willing to throw them in this ZIP file.

Extract the contents of the ZIP file to a directory not far from the root of a drive, such as C:\win7upd, just so you don't have to type as much at the command line.

In any administrative command prompt, make sure you're changed into the directory where your WinPE files are located (C:\winpe in my case). A WIM may have several different indexes that can be mounted, so to ensure you get the one you want, run this command to get a list of index names:

dism /get-wiminfo /wimfile:.\iso\sources\boot.wim

For the 64-bit WinPE, you should get a name like Microsoft Windows PE (x64). To mount the WIM so you can make changes to it, run this command:

dism /mount-wim /wimfile:.\iso\sources\boot.wim /name:"Microsoft Windows PE (x64)" /mountdir:.\mount

This process may take a while, because it is effectively making the WIM contents accessible in a normal directory. If all goes well, you're now ready to integrate new drivers into it. If at any point something goes wrong while the WIM is mounted, such as if you reboot or you have directories being used while the WIM is being unmounted, you have to start over by unmounting the WIM again using the /discard switch. The unmount command is brought up near the end of this section.

We should start off by integrating one of the updates to enable NVMe support (KB2990941). This can be accomplished with the following command:

dism /image:.\mount /add-package /packagepath:C:\win7upd\Windows6.1-KB2990941-x64.msu

Replace x64 with x86 if you are working on a 32-bit image.

Next, to add the drivers for network, storage, and USB, run these commands:

dism /image:.\mount /add-driver /driver:C:\win7upd\net /recurse /forceunsigned
dism /image:.\mount /add-driver /driver:C:\win7upd\storage /recurse /forceunsigned
dism /image:.\mount /add-driver /driver:C:\win7upd\usb /recurse /forceunsigned
dism /image:.\mount /add-driver /driver:C:\win7upd\iusb64 /recurse /forceunsigned

For 32-bit systems, use the directory iusb32 in the bottom line. Note the use of the /forceunsigned switch at the end there. That will force drivers that are not signed or have invalid signatures to be integrated into the WIM. As always, you want to be aware of what you are integrating when you use this switch. Omitting it will only allow drivers with valid signatures to be integrated - but this means some of the ones you might want may not get in.

Once you are done, you can save the changes to the WIM by unmounting it. Make sure no active command prompts or Explorer windows are currently switched to any directory within the mount path when you do so. To unmount the WIM, use this command:

dism /unmount-wim /mountdir:.\mount /commit

Wait a moment, and the updated WIM will be saved. If something went wrong, you need to run the above command, but replacing /commit with /discard before attempting to mount the WIM again.

If you will not use WinPE and intend to create a complete Windows 7 ISO instead, modify sources\boot.wim in a copy of the contents of your Windows 7 disc instead. Building such a file will be covered further down this page.

Building the WinPE ISO

To build the WinPE ISO, whether modified or not, run the following command in a Deployment Tools command prompt:

oscdimg -n -b.\etfsboot.com ISO winpe.iso

Now you can either burn the newly created ISO to a CD, or upload it to your PXE server, where SYSLINUX can be used with any BIOS client to copy it to RAM. It is strongly advised that you have at least 1GB of RAM installed in your target machine, especially since booting via Memdisk will eat a large chunk of it. Here is an entry you can add to your SYSLINUX menu:

LABEL win7_64
	MENU LABEL WinPE for Windows 7 64-bit
	KERNEL memdisk
	INITRD images/winpe.iso

Read up on my PXE server guide for more details on getting SYSLINUX or PXELINUX up and running.

Preparing the Windows 7 Installation Source for a Network Share

First off, you should have a Windows 7 disc or ISO handy. You can image one yourself from a disc you may have, which is the ideal route. Microsoft used to officially provide Windows 7 ISOs, but on a whim, they have decided not to do it anymore. I'm going to assume your disc has Service Pack 1 integrated, which may be needed for a lot of things. If it doesn't, you'll need to obtain this and integrate it beforehand.

Let's get some updates now. These should cover you up to 2017. If you need to integrate more updates, you'll have to look somewhere else, but personally I wouldn't even bother with updating Windows 7 beyond that either way. One of the really late updates merely tried to install Chromium-based Microsoft Edge onto computers, which could ironically make it potentially hazardous, or otherwise inconveniencing to have automatic updates enabled - not that there is much use of having it turned on post-EOL. There is always that chance of Windows 7 being more vulnerable to security threats, so I recommend using an installation of it offline when it is installed or keeping it behind a VLAN which relies on a separate router for internet connectivity - and only use the internet on there when you absolutely need to.

Note that the Convenience Rollup links go through HTTP, and as such, your browser may stop them to prevent a potential security risk. As of now, these links point directly to Microsoft's Windows Update site, so they should be safe. Confirm in your browser that you want to download them. (If any of these links become broken, let me know)

Windows 7 setup disc files

Once you have the updates downloaded for the architecture you're targeting, move them to your directory full of the updates and drivers we'll be integrating into the Windows 7 installation distribution. Now, copy all of the files from your Windows 7 disc to a new directory. I called mine iso, but any will work.

If you have nothing you need to integrate, these files can go straight on a network share right now. But I need to install Windows 7 onto a Ryzen-based system over the network, so it's necessary to modify its primary gob full of data.

Open a command prompt as an administrator if you don't already have one open, and change to the directory containing your setup files (where autorun.inf would be located). You'll need to know which edition of Windows 7 you'll be using, because yes, apparently all the four mainline consumer versions appear to reside in the same disc, unless I'm missing something. Artificial market segmentation galore. (And, if you use anything below Professional, you'll be arbitrarily capped at 16GB of RAM, which, appallingly, may not be enough for some modern uses)

Run this command to get a list of possible names:

dism /get-wiminfo /wimfile:.\sources\install.wim

The index containing the name of your version is the one you should use. In my case, I would select Windows 7 ULTIMATE. Mount install.wim like so:

dism /mount-wim /wimfile:.\sources\install.wim /name:"Windows 7 ULTIMATE" /mountdir:.\mount

Since this file is roughly around 3GB compressed, it may take some time for the WIM to be mounted. Once it is, though, you should be ready to start integrating drivers and updates into it. Unfortunately, a lot of vendors like to put their drivers in these gigantic executable installers, but the ZIP file provided above does have a plentiful of drivers already extracted.

But first, let's get the important updates in there. Start with the servicing stack update. Remember, x86 for 32-bit systems, x64 for 64-bit systems. Don't try to mix and match. I will be applying the 64-bit updates in the following commands, so be mindful to replace any text if needed.

dism /image:.\mount /add-package /packagepath:C:\win7upd\Windows6.1-KB3020369-x64.msu

This will get your distribution readied up for the convenience rollup. Before that, though, you should also add the NVMe update especially if you are to install Windows 7 to an NVMe SSD:

dism /image:.\mount /add-package /packagepath:C:\win7upd\Windows6.1-KB2990941-x64.msu

Now, to load the convenience rollup... this one will take a very long time because of its sheer size. Your distribution will grow by a very large margin. You should just copy/paste the file name so you don't go nuts.

dism /image:.\mount /add-package /packagepath:C:\win7upd\windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu

With that out of the way, you can now preload the drivers. These should allow you to fully utilize USB and NVMe, as well as some later popular network interfaces. Integrating XHCI support is very much a necessity to be able to use basic USB perhipherals on systems which only have that and don't have any such PS/2 ports.

dism /image:.\mount /add-driver /driver:C:\win7upd\net /recurse /forceunsigned
dism /image:.\mount /add-driver /driver:C:\win7upd\storage /recurse /forceunsigned
dism /image:.\mount /add-driver /driver:C:\win7upd\system /recurse /forceunsigned
dism /image:.\mount /add-driver /driver:C:\win7upd\usb /recurse /forceunsigned
dism /image:.\mount /add-driver /driver:C:\win7upd\iusb64 /recurse /forceunsigned

Again, replace iusb64 with iusb32 if you are installing the 32-bit version. Be mindful that the /forceunsigned switch will permit integrating unsigned drivers, or drivers with invalid signatures.

If you want to integrate more drivers, particularly those enclosed in these obtuse executable installers, you may be able to open them up using 7-Zip, and extract the drivers you need from it. This may be pretty hard to grasp at first, so if you're not too familiar with the workings of this, you may just want to install the extra drivers traditionally instead.

As an example, let's get the last drivers for the AMD Radeon released for Windows 7. Check this page, it should have a listing called Radeon Software Adrenalin 21.5.2 Driver for Windows® 7 64-bit. Get that, then open the executable in 7-Zip.

Inside there, you should find a directory called Packages\Drivers. Extract all the contents of this directory somewhere. Using the same method as seen above, recursively add the Radeon drivers to your image. From my experience, this does not load the "Adrenaline" software or whatever that obnoxious overlay system tray thing is called now. This is the desired outcome in most cases, unless you need some specific feature.

Some drivers may fail to be integrated due to compression-related quirks. Getting around this is easy enough. Make a new directory somewhere, such as C:\expanded. Open up another command prompt at the directory containing the files you're having trouble installing (B367348 for the Radeon driver files in my case), and run these commands:

expand *.*_ C:\expanded
del *.*_
move C:\expanded .

The files will be uncompressed while retaining their exact names. In INF lingo, the last letter of a filename's extension indicates it is compressed, and the INF engine automatically renames it to a proper filename afterwards. Afterwards, the existing compressed files are to be deleted, and their uncompressed counterparts take their place. Try loading in this driver again, it should work this time.

To uncompress a single file, such as the one found in the underlying amdfendr directory, run this:

expand amdfendrsr.ex_ amdfendrsr.exe

Then, you can delete the original compressed file ending in an underscore, and reattempt integrating the driver.

When all of that is done, it's time to unmount the WIM. Run this command:

dism /unmount-wim /mountdir:.\mount /commit

This will take some time to complete. When it is done, you can now copy all the setup files to some directory in a network share accessible by the guest account, and get installing. If you are running some Unix-like server with Samba, you'll need to enable the execute permission on every file in there with something like chmod -R +x <your_setup_files>/* so Windows 7 Setup can function.

Boot to your ISO, whether it be on WinPE or Windows 7 itself. If you don't run into a BSOD and your keyboard and mouse are working, you're pretty well off so far. WinPE starts off with a command prompt; this will be used to map a network drive and run the setup program residing there. It's not MS-DOS, but for these tasks, it works just as it would there. Let's say we have a share called clients residing on a server called hornet, and the Windows 7 setup files are sitting in a directory called win7_64... to map this temporarily to drive Z:, you'd type this:

net use z: \\hornet\clients

If a drive cannot be mapped, you do not have the right network driver integrated into WinPE, and so you'll need to go back and add it in there somehow. You should add it to Windows 7's installation distribution as well.

Windows 7 setup program

When Setup loads, you can proceed as you would if you had installed this normally back in the day. Select the Custom (advanced) installation mode, and if you can see all the drives you need, you're all set! Just pick the drive you need to use, preferrably one that's completely empty. If you need more flexibility, perhaps to make room for secondary partitions, select Drive options (advanced) and adjust the drives you want to work with accordingly.

If you encounter an error 0x80300024 when trying to install to a drive and you have multiple drives installed, the first thing you should do is exit out of the setup program, and run wpeutil shutdown at the command prompt to shut down your computer. From there, you should switch off the power supply and unplug anything you've got connected to the computer. Open the computer, and unplug all drives except the one you intend to install Windows 7 to. Plug the power and perhipherals back in, then boot back into your installation environment and try again using the above mentioned procedure.

Windows should install as it would, and you should eventually have a working installation ready to load some of your needed software on it. But you may need to install additional drivers you couldn't integrate previously. If you had to unplug any extraneous disks, shut down Windows and plug them back in so you can access them again. Either way, it ought to be enough to give you back some control of your computer for when you need to run Windows for any reason, but if you need to run much newer software, many developers are leaving Windows 7 in the dark these days. You should try to use Linux in such cases.


No comments for this page.

Leave a Comment

Name: (required)

Website: (optional)

Maximum comment length is 1000 characters.
First time? Read the guidelines

Enter the text shown in the image: