Guide: How to install Windows 10 onto storage expansion card

General overview

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.

Prepare a Windows 10 installer USB drive

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 installer

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.

Partition the disk

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 diskpart:

*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

Copy Windows data to the newly created partitions

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

Exit installer

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.

Post install

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.

Here is the source that I based this guide on

(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)

18 Likes

Ah, right. The expansion card is a “external storage device” so a regular Windows installer will refuse to install to it.
What you need is to create a Windows-to-go install media. You can only create it (the wtg install media) from a physical windows installer optic disk (the iso from the downloader is a separate version that dont have windows-to-go stuff). After the creation of a wtg install media, you can install windows on any “external storage device”.
Also. Installing on a internal SSD and then clone the disk (or just moving the disk into a external partition) will render Windows unbootable (have to do with the way some kernel driver and stuff)

2 Likes

That’s crazy. I just made the exact same guide. Well, I had not finished formatting my guide and yours is more polished so I guess I should delete mine so we don’t have two?

4 Likes

You should post what you have! I’m curious to see it now.

1 Like
3 Likes

For anyone that is wanting to do this on a 1TB expansion card, the primary “Windows” partition can be set to size=949044. If all the other partitions are set to the sizes that OP used, then the full size of the expansion card will be utilized.
This worked great for my Windows 11 install on a 1TB expansion card.

2 Likes

Glad to hear that worked for you! I will update the post with your size for the 1 TB drive.

2 Likes

I never do a fully partitioned disk because most SSDs do OP by leaving some of the disk unpartitioned (even if you don’t install their software and configure, it will actually act like OP). So on the daily driver 256GB I would, say, do 192GB of a C disk (and other things like boot sector and recovery), then just leave the 47GB or whatever unallocated.
It’s better to start small, because you can extend partitions (even if you are using them), but shrinking is a lot more complicated.
I would do a 350 gb C on a 512 disk, maybe 50 or so for a another partition (if needed), and leave the whatever rest for the OP.

2 Likes

So digging around in the documentation for these commands, I realized that the /Index:1 argument given to dism /Apply-Image is actually specifying the version of windows to install

If you do dism /Get-ImageInfo /ImageFile:R:\RecoveryImage\install.{esd,wim}, then it lists each Windows 10 version as a given index, with indices on my end being

1 == Windows 10 Home
2 == Windows 10 Home N
3 == Windows 10 Home Single Language
4 == Windows 10 Education
5 == Windows 10 Education N
6 == Windows 10 Pro
7 == Windows 10 Pro N
8 == Windows 10 Pro Education
9 == Windows 10 Pro Education N
10 == Windows 10 Pro for Workstations
11 == Windows 10 Pro N for Workstations

So if you want a version of Windows other than Home, check the indices in your image with dism /Get-ImageInfo and change the value accordingly

Looking at the other place where this index 1 shows up, I believe if a change is made with /Apply-Image then the same change needs to be made with specifying the recovery image via reagentc

Looking at

reagentc /setosimage /?

(or equivalently at the microsoft docs), we see that the index here is similarly specifying Index of the recovery image Windows imaging (WIM) file to be used by system reset

So from the sound of it, if you were to install Windows 10 Pro with /Apply-Image above and then leave this as /index 1, if you were to eventually restore your OS via the recovery partition you would have your install changed to Windows 10 Home

I am not sure. I know the OEM disks are the same and you can choose between Home, Education, and Pro (and Pro Ed), while Workstation ones are exclusive to those workstation installers

Because how Microsoft make the downloaded ISO a different version (you cannot make windows-to-go with those), I would also assume they shrunk it down so it only installs windows 10 home

Yeah, I haven’t messed around with it enough to say in general. I can say, though, that for an ISO that I downloaded from Microsoft using a Linux system (so no media creation tool) and then booted the installer for via Ventoy, I changed the index to 6 in my case and successfully ended up with Windows 10 Pro on my expansion card (so I’ve been able to enable things like Bitlocker).

1 Like

I just used RUFUS and a regular downloadable install iso. You select the windows-to-go option. It was easy.

The only problem was I had to use another machine to do it. rufus does run in wine, but I didn’t figure out how to make the usb drives available to wine.

However… I do actually like this idea of documenting a real reference way that doesn’t depend on any extra tools. Even if it’s more manual, it’s better in that it’s more deterministic.

I do recommend going through the trouble to add a thermal pad inside the module for this.

2 Likes

So, I have a question. Working my way through the guide and everything worked as advertised until I got to copy install.esd from sources. System returned a “cannot find specified file” I believe the error was but if I boot back into Ubuntu and search my install flash, sure enough it is there. Any idea what I’m doing wrong?

Did you try using install.wim as well? It looks like I might need to update the guide based on some other posts as well.

Wonders if there is a Windows 11 to go yet. Doesn’t look like it.

It probably will not have a “to-go” option because it tried to be more “secure” by auto-enabling things like bitlocker and forcing you to tie your local account to your microsoft account (and thus requires internet connection for setup)

I just installed 10 on my card and then updated to 11. Works great and you don’t even need a license.

Thank you for the great guide, I have Windows on my expansion card, and it is working great.

The only struggle was, once I went back to my Fedora install, the wifi wasn’t working. I had to disable fast boot in Windows and in the bios to get the wifi back.

1 Like

I just ran into this exact same issue so thought I’d post my workaround to save others the frustration.

Assuming you hit the same error at the same point in the guide, you’ll have already set up the necessary disk partitions to allow you to boot back into Ubuntu, mount the primary Windows partition, and copy over the install.esd file from your USB.

You can then boot back into the Windows installer, repeat the assign letter="" commands from Partition the disk (it seems to forget a few of the letters when you exit the installer), then continue to Copy Windows data to the newly created partitions.

The only difference now is that instead of copying install.esd from X:\sources\ you copy it from your primary Windows partition - in the guide this is W:\ but for me it was C:\. After that I was able to follow the rest of the steps without any hiccups.

Hope this helps someone! I’ve been trying to solve this all afternoon and it’s such a relief to finally have it sorted.

Rufus worked like a charm for me as well. My steps, which I followed on a separate Windows machine:

  • Download Rufus.
  • Download Windows 10 ISO (I downloaded and ran the Windows media creation tool and selected the local ISO option).
  • Plug in the expansion card (on the separate machine, not my framework laptop).
  • Run Rufus. Select “List USB Hard Drives” under “advanced drive properties” to make the storage card visible. Select the ISO, select the “windows to go” preset, and click “start”.

And that was it! After Rufus was done, I unplugged my storage card from the other machine and put it back in my framework laptop. I turned it on, spammed f12, selected the storage card as my boot media, and voila: I was in Windows.

2 Likes

I thought windows to go was no longer available. So now, I should be able to install a retail w10 on my usb 3 nvme card?>