“I know it’s easy to install a Linux distribution to one of the storage expansion cards and boot into it on the fly, but what if I wanted to do that with Windows?”
“Windows is more complicated.”
And it is! However, it can be done, and while the process can look intimidating, all it really requires is patience to go slowly and double check each step.
The end result is a full, non-restricted Windows install on one of your expansion cards that you can remove, insert, and boot into at your convenience.
This is a guide that had been floating around the Framework community forums, and while trying this was part of my initial intent/plan with my Framework when I ordered an extra 250gb expansion card, I got intimidated by the process and put it off until yesterday.
The good news is that it all works, activation, Windows updates, through updating to the BIOS beta from Framework all through the Windows install on the card. The guide does require a few tweaks, though.
So, with full credit to Siddarth Shankar and his Decrypting Technology post from 2015, as this is not my solution, I’m not even the one bringing it to the Framework, I am just trying to make it easy for anyone else who wants to try, let’s get into it.
What You’ll Need:
-
A Windows 10 Bootable USB
-
You can use the guide from Framework to get this if you don’t already have it.
-
Note: For myself coming from a pure Linux install, after trying a couple of USB creation tools that didn’t work, I ended up having to make the USB from the Media Creation Tool running on a Windows VM that I gave access to the USB stick. It worked.
-
-
An empty Framework storage expansion card.
-
Caveat One: You will be running Windows off of a USB drive. It will not be Native NVMe speeds. I can tell you that for myself running it, I do not notice enough to care, but it is a thing.
-
Caveat Two: I have seen some media reports/testing that indicates the 1tb expansion card can get a little toasty and throttle its maximum transfer speed. I haven’t done any testing on this because I had always planned on using a 250gb so this guide assumes the 250gb card, with notes of where to change the value if you decide to try to 1tb.
-
What You’ll Be Doing:
-
Changing boot orders in the BIOS
-
Caveat Three: When everything is said and done, this is still how I personally switch back and forth between the two OSes. Someone with a better understanding of bootloaders may come up with a more elegant solution at some point.
-
Caveat Four: The only other OS that existed on my machine at the time I tried this process was Fedora 35, and Fedora does not require disabling or changing secure boot to install. I have no idea if it’s as simple as re-enabling it for the Windows install if you have disabled it at some point, or if that introduces a lot more complexity. I will not be of any help there.
-
-
Fun times on the Windows Command Prompt!
-
The main tools we’ll be using are ‘diskpart’ and ‘DISM’ (Deployment Image Service and Management)
-
Caveat Five: First time working with DISM? Me too! Exciting! That does mean further technical support and assistance will be extremely limited. I understand the steps taken and what they do, but I did not veer of the beaten path.
-
From This Point Forward:
When you see code:
like this
You need to enter that line exactly as written into a Windows command prompt we’ll open during the install process.
Let’s Go!
Restart your system with the bootable Windows 10 USB, and the expansion card to which you wish to install Windows, inserted.
- In an abundance of caution, these were the only external storage media plugged into my machine at the time.
When you reboot, as soon as the display lights up, begin pressing F2 repeatedly to get into the BIOS.
Once you’re inside the BIOS, navigate to the Boot tab with the arrow keys and down to the menu option that reads ‘New Boot Device Priority’ and set it to ‘First’
Then, navigate to the ‘EFI Boot Order’ option, and using the F5 and F6 keys, ensure that ‘EFI USB Device’ is at the top of the list. Depending on the type of USB stick you’re using there could be some extra characters follow its name.
Press F10 to Save and Exit the BIOS.
You should now be rebooting onto your Windows Install USB.
When you’re greeted with the Windows installer, select your time, currency, click install now, enter or skip the product key according to taste, and when you reach the screen asking you if you want to upgrade or perform a custom install press SHIFT+F10 to open a command prompt.
First, we’re creating a Windows partition layout that we will then flash images of Windows over to.
Remember: Enter these lines at command prompt exactly as written.
diskpart
list disk
This presents a list of your disks, with a numerical index. Be absolutely certain that you are selecting and partitioning the expansion card in the following steps.
select disk x
Where ‘x’ is the number associated with your expansion drive.
clean
convert gpt
create partition primary size=450
If you follow the original guide here and enter ‘350’ for the size, you’ll receive an error later on telling you you don’t have enough space. Enter ‘450’ to give it room.
format quick fs=ntfs label="Windows RE Tools"
assign letter="T"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
That is fourteen (14) zeroes.
create partition efi size=260
The original guide sets the size to ‘100’ here, and includes a note that newer drives will need to set it to ‘260’, thus it is set to ‘260’.
format quick fs=fat32 label="System"
assign letter="S"
create partition msr size=128
create partition primary size=225000
This is the actual value for the end size of your Windows install. The output for ‘list disk’ for me, gave a size in gb in the 230s, so given the size of the other partitions, I decided ~225gb would be safe. It does leaves some space on the table, and someone who’s more properly motivated could easily fine tune this.
This is also the value to change for people trying it on the 1tb.
format quick fs=fat32 label="System"
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
That is, once again, fourteen (14) zeroes.
list volume
This will present you with a list of your newly created partitions, including their letter assignments. Make note of the letter assignment of the USB stick you’ve been using for the install. For me, this was D: . You can run diskpart and ‘list volume’ again whenever you need to to double check.
exit
This exits diskpart, but you still need the command prompt. If you closed it, open it again with SHIFT+F10
Enter the correct letter for your USB stick.
D:
D: is the example from my own install.
R:\RecoveryImage
copy C:\sources\install.esd R:\RecoveryImage\install.esd
The original guide points towards ‘install.wim’, which will result in a file not found error. The guide can be completed by substituting ‘.esd’ for ‘.wim’ at the relevant steps.
cd X:\Windows\System32
dism /Apply-Image /ImageFile:R:\RecoveryImage\install.esd /Index:1 /ApplyDir:W:\
This is the meat and potatoes of the process, flashing the Windows images over to the drive.
md T:\Recovery\WindowsRE
copy W:\Windows\System32\Recovery\winre.wim T:\Recovery\WindowsRE\winre.wim
Here, using the ‘.wim’ extensions worked for me, but a baseline troubleshooting tip for this section could be to swap out instances ‘.wim’ and ‘.esd’ and I will edit and update if I missed anything in my notes.
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
From here, exit the command prompt, exit the Windows installer, and when your machine reboots, press F2 to enter the bios, navigate to the Boot tab, then under the ‘EFI Boot Order’ option make sure that ‘Windows Boot Manager’ is the first entry, again using F5 and F6 as necessary to adjust.
Press F10 to save and exit.
Your laptop should now boot into the Windows first boot sequence, running entirely from your expansion storage card.
You can let the Framework guide on installing Windows 10 take over from here once again to install the necessary drivers to get the machine fully up and running. I had to connect to an Ethernet dongle to download the drivers bundle, but after that all of the hardware was detected as a native installation.
Caveat Six: Haven’t tried Windows 11 and don’t plan on it until the Windows updating tool gives the go ahead. I leave it for braver souls to try.
Caveat Seven: The user @lightrush here on the Community Forums from their own experience has a hypothesis that one or more of the recovery partitions may be unnecessary, which would make this process even simpler. Once again, I leave it for braver souls to try.
And there it is. You should now have a full, non-restricted, fully portable, install of Windows on of your expansion cards.
Afterwards, I was able to go into the BIOS, set the boot order to have my Fedora 35 install be the first entry, and I booted back into my fully encrypted main OS drive as though I had never left.
I hope this proves useful and possibly even a fun little project for people to do with their Frameworks.
(This was also posted to Framework subreddit)