I just went through the trouble of setting this up for myself, and want to share my notes on the process with the community here.
In order to install Windows onto the expansion card, it is necessary to manually create the required partitions, then copy the Windows image over manually. This manual process is entirely accomplished from within the Windows installer itself, by dropping into a command prompt rather than installing graphically as usual.
The easiest way to do this is from an existing Windows installation. You should also be able to make one from within GNU/Linux using WoeUSB.
Boot into the Windows installer, by pressing the F12 key (repeatedly) on boot. If this doesn’t work, double check that fn lock is not set on your keyboard.
Once booted into the Windows installer, proceed page by page until you have accepted the license agreement, then on the next page hit Shift+F10 to open a command prompt.
From this point on, ignore the graphical installer, everything will be done manually via the command prompt.
Type in the command diskpart and hit enter to open the built in partitioning tool.
WARNING: Be sure to read this procedure carefully and understand that selecting the wrong disk will potentially overwrite an existing install on the internal drive.
Windows requires the following partitions to be created:
- Windows RE Tools partition
- System partition
- MSR partition
- Windows partition*
- Recovery image partition
Partition the disk using the following sequence of commands in
*Make note to choose an appropriate size for your Windows partition, in my case I used a 250 GB expansion card, and made my Windows partition size=230000, if you are using a 1 TB drive, use size=949044 to use the full drive.
list disk select disk x (where x is the number corresponding to your expansion card) clean (WARNING: This will format the whole disk, make SURE you have selected the proper disk) convert gpt create partition primary size=500 format quick fs=ntfs label="Windows RE Tools" assign letter="T" set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" gpt attributes=0x8000000000000001 create partition efi size=100 format quick fs=fat32 label="System" assign letter="S" create partition msr size=128 create partition primary size=230000 format quick fs=ntfs label="Windows" assign letter="W" create partition primary size=4096 format quick fs=ntfs label="Recovery Image" assign letter="R" set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" gpt attributes=0x8000000000000001 list volume exit
For the following procedure, make a note of the drive assigned to the drive containing your Windows installer. In my case it is X.
md R:\RecoveryImage copy X:\sources\install.esd R:\RecoveryImage\install.esd X:\Windows\System32 dism /Apply-Image /ImageFile:R:\RecoveryImage\install.esd /Index:1 /ApplyDir:W:\ md T:\Recovery\WindowsRE copy W:\Windows\System32\Recovery\winre.wim T:\Recovery\WindowsRE\winre.wim bcdboot W:\Windows /s S: /f UEFI W:\Windows\System32\reagentc /setosimage /path R:\RecoveryImage /target W:\Windows /index 1 W:\Windows\System32\reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows
If the previous steps were completed without issue, exit the installer being sure to remove the USB installer drive before your machine reboots.
You may need to hit F12 again to get into the boot menu in order to choose the Windows Boot Manager.
Once you have successfully booted into Windows, you will be prompted to complete the setup and may proceed as usual.
At this point you should have a functioning Windows install, however you still need to install the Driver Bundle.
If desired, you can also select the default boot order in the BIOS setup menu under Boot > EFI Boot Order (press F2 on boot to enter setup).
In my case, running Debian Bullseye on my internal drive, I ran the
sudo update-grub command and it automatically generated a grub boot menu entry for the Windows Boot Manager. This allows for choosing which OS to boot without having to manually override using the F12 key.
(I had to make a few notable changes, including increasing the size of the Windows RE Tools partition, and using install.esd in place of install.wim)