Well, there is Windows To Go for that. Basically it’s just a fancy name for installing Windows into a USB stick, in reality it’s the same Windows as anywhere else, with some different default settings.
Of course, the normal Windows installer won’t let you install into a USB stick because Microsoft initially intended to limit this “feature” to Enterprise versions, the installer doesn’t really know the version it’s installing, etc. The official way of using it is having Windows installed on a PC, and launch the Windows To Go creator. If you’re not running Enterprise, there are 3rd party apps that do the same.
However, in my understanding your goal is to boot Windows from a USB stick without ever installing Windows into a computer hard drive. Well, fine. That is also possible. Let’s go through what the normal installer does:
Lets you select the language used during install, then choose the Windows edition and the destination hard drive / partition.
Select the appropriate image version
Create boot partitions, UEFI records etc. - all that is required to make your hard drive bootable.
Extract the contents from a .wim file, for the right version, into the right partition.
Reboot your computer into the freshly baked Windows partition. The extracted files do the rest.
The Windows To Go tools does all the same, except it skips asking you language, and instead of letting you choose the partition, it only lets you choose which USB stick you want to use. It also does some magic between steps 4 and 5, but we’ll come to that later.
Now, you can do all of it in any OS, such as Linux, but you’ll have to do it manually. Let’s take a stroll through this:
We’re not really interested in steps 1 and 5. Simple stuff.
Step 2: the official installer gets the list of available editions by reading the WIM file, so let’s do the same. You’ll need to get a Windows install disc and find an application for your OS that can open WIM files. A WIM file is just like a zip archive, except it also has kind of “partitions” inside - they are treated different than folders, so some tools will open WIM files just fine, but will not allow you to choose the “partition”, hence you’ll only see the contents of the first one. If your install disc only has one edition available, then that’s fine, as there won’t be multiple “partitions” in there. But if you have multiple and want to be able to choose, better look for an app that lets you do that. The WIM file is located in a folder named “source” that is inside the install disc. Usually called install.wim.
Next, step 3. You can do it manually, but this depends on whether you’re using UEFI or BIOS, so I won’t tell you how to do it. Simply put, make your USB stick bootable. Simple, but the trick here is that it needs to be formatted in NTFS. There is an NTFS driver for Linux as far as I know, so it’s doable. But I’m not very good at Linux, so I will not attempt to teach you how to do it. Maybe you can even get Unetbootin to work here? Of course, the NTFS part is the hardest one.
Ok, step 4. This is pretty simple, you just grab that image file you opened in step 2 and extract everything into the NTFS partition you created in step 3.
And finally, we haven’t talked about the “magic” that goes between step 4 and 5 if you use the Windows To Go creation tool. Well, to be frank, it’s not that important. Most 3rd party tools don’t do any of that, and yet the install works just fine. Some differences I can notice between a version created by official and unofficial tools:
An “official” version seems to always be pre-activated with the same method you used for acticating the Windows install that created your Windows To Go stick. Since 3rd party tools are meant to be used mostly with Wundows Home versions, they don’t bother with that, because Home licenses wouldn’t allow you to activate a second install anyway. And if you’re doing it all manually, you can just activate your stick after you boot it, it will be way easier.
The internal hard drives are not visible in an “official” version, yet they appear normal if you use a 3rd party tool to create the bootable stick. Basically that’s a “safety net” from people messing with computers that are not actually theirs, or accidentally storing data on an internal hard drive and thinking they will be able to access it when they plug in their USB stick into a different terminal. Of course, you can easily toggle this behavior with a group policy.
Maybe some other minor things, just like above.
So, basically, you can just skip all that “magic”. It is not needed.
Just be aware that the first bootup of such stick might be a bit unstable. Windows will have to download drivers for your hardware and after the next reboot it should be more stable. This also happens when plugging it into a different computer, but the more similar the hardware is to anything you’ve used before, the better. However, try to avoid plugging it into all kinds of different computers - all the different drivers kight start messing with each other. Windows To Go is meant to be shared between 2 workstations max.