We were talking at the office about having a LAN Party and playing some old school games like Age of Empires and Starcraft. The issue is that I have Linux installed. I didn't want to ruin everyone else's fun by having random crashes, out-of-sync errors and similar stuff using Wine, and I didn't want to do the dual boot dance, so I figured out that the best option was to install Windows to an external drive.
I remember that something called Windows To Go existed a while ago, but it was restricted to Enterprise versions. Eventually I found out that creating a Windows To Go drive is a really straightforward process:
- Partition the External Drive and format it as NTFS.
- Expand the Windows image using
dism
. - Install BOOTMGR using
bcdboot
. - Boot from the External Drive and continue the setup.
The process was so straightforward that I tried to do everything from the Linux side, but I encountered some issues and eventually gave up. It may actually be doable, because the issues were small:
-
You need to compile the edge version of
ntfs-3g
, and buildwimlib
(linux alternative to dism) linking it against the edge version ofntfs-3g
in order to expand Windows 10 images. Source. -
There isn't a tool like
bcdboot
for Linux, so you need to install BOOTMGR manually.
In the end, I decided to do everything from WinPE and the most straightforward way to use WinPE is to boot into the Windows Setup.
-
Download the ISO from the official website.
-
Boot into the Windows Setup and open the Command Prompt with
Shift + F10
.This step is intentionally left ambiguous. There are too many many ways to boot into the Windows Setup. You can create a bootable USB, burn a DVD, you can also mount the ISO and your external disk in VirtualBox.
This article will use the VirtualBox approach, you can check the instructions to mount your external disk here.
-
Run
diskpart
to partition and format the disk.list disk // list every disk and their number select disk 0 // change 0 with the # you wish to use clean create partition primary size=512 format fs=fat32 quick label=BOOT active assign create partition primary format fs=ntfs quick label=Windows assign list volume // you'll need the drive letters later exit
These steps will create an MBR layout in the disk and a boot partition, this is intentional to achieve compatibility with both firmwares: BIOS and UEFI.
In this example, the
C
drive is theBOOT
partition, theD
drive is the Windows Setup DVD, and theE
drive is theWindows
partition. The drives in your PC will probably be different, so you'll need to update the instructions for your particular configuration. -
You'll need the find the
index
of the edition of Windows you wish to install usingdism
. Remember to adjust the/imagefile:
argument if required:dism /get-imageinfo /imagefile:D:\sources\install.wim
-
Proceed to expand the Windows image with
dism
, in this example I'll be installingWindows 10 Pro
, which is the 6th index. Remember to adjust the/imagefile:
,/index:
and/applydir:
arguments if required:dism /apply-image /imagefile:D:\sources\install.wim /index:6 /applydir:E:\
-
Install BOOTMGR to the external drive. Remember to adjust the arguments if required; In this example I'm telling
bcdboot
that Windows was expanded toE:\Windows
and that it should install the bootloader inC:
; the/f ALL
argument installs both UEFI and BIOS bootloaders:bcdboot E:\Windows /s C: /f ALL
-
Hide the
BOOT
partition usingdiskpart
.list volume select volume 1 // select the `BOOT` volume set id=1c // `1c` is Hidden FAT32 (LBA) exit
-
Finally, turn off the VM, plug the external drive to your PC and continue the Windows Setup. It will proceed to install the drivers and apply the initial configuration.
TODO: Write instructions to mount the external HDD in VirtualBox.
TODO: Publish to medium
http://markdowntomedium.com/