Install Windows 11 (UEFI) via USB 3.0 Drive

Search for a command to run...

No comments yet. Be the first to comment.
When attempting to setup Travis-CI, I saw more than a few articles on running Flutter tests with Travis, but none for actually building and obtaining a compiled APK as we wanted. Whenever changes are pushed to the GitHub repository a new build is aut...

In many ways, Flutter is a fantastic framework for building cross-platform mobile applications however when it comes to developing features that aren’t platform-agnostic many people seem to resort to platform channel code. I try to keep as much code...

SamJakob's Blog
3 posts
I'm Sam Jakob M.; a software engineer and a director of Apollo Software Limited.
Installing Windows 11 in UEFI mode from a USB 3.0 drive proves to be rather painful but luckily sticking together a few different workarounds for various issues sourced from all over the internet makes it possible - though rather convoluted...
Right off the bat, creating the drive manually instantly presents a problem; the Windows Imaging file for installation, install.wim is too large (> 4GiB) for the FAT32 partition that the installation media boots from so a direct image cannot be made.
Therefore, the image file needs to be split up into multiple split .wim files (SWMs). On macOS this can be done with wimlib as follows (for other systems there are undoubtably guides available and on Windows the Media Creation tool can presumably be used):
See below for an explanation.
open windows.iso # Replace windows.iso with the name of the installation ISO.
cd /Volumes/CCCOMA_X64FRE_EN-US_DV9 # Replace with the name of the mounted volume from the ISO.
rsync -avh --progress --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WINDOWS
# If you don't already have it installed, you will need to install wimlib with `brew install wimlib`
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WINDOWS/sources/install.swm 3800
sudo diskutil unmountDisk /Volumes/WINDOWS
sudo diskutil unmountDisk /Volumes/CCCOMA_X64FRE_EN-US_DV9
WINDOWS.open windows.iso in a Terminal window, where windows.iso is the Windows Installation ISO downloaded from Microsoft./Volumes/CCCOMA_X64FRE_EN-US_DV9 (ls /Volumes will allow you to check, but this guide will assume the aforementioned name).install.wim file to the USB drive): rsync -avh --progress --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WINDOWSwimlib with Homebrew - a tool used to split the WIM file: brew install wimlibwimlib (this should yield two files, named similarly to install.wim and install1.wim on the USB drive): wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WINDOWS/sources/install.swm 3800sudo diskutil unmountDisk /Volumes/WINDOWS and sudo diskutil unmountDisk /Volumes/CCCOMA_X64FRE_EN-US_DV9...and with that you're ready to begin attempting to install Windows.
With this done, I encountered another issue - USB 3.0 flash drives seem to cause problems with the Windows Setup wizard's checks as to whether Windows can be installed despite selection of a valid partition. (Presumably because Windows is unable to tell if a partition/volume belongs to a removable drive or not without the necessary drivers.)
I eventually managed to workaround this issue by performing installation manually with the DISM (Deployment Image Servicing and Management) tool included in the Windows Installation media.
diskpart.list disksel disk 0 (where 0 is the disk number from list disk).list part.sel part 1 (where 1 is the partition number from list part).S: with assign letter=s.sel part 3 (where 3 is the partition number from list part).W: with assign letter=w.diskpart with exitdism and identify the index of the edition you wish to install: dism /Get-WimInfo /WimFile:X:\sources\install.swm
install*.swm image(s) with dism (where X:\ is the Windows Installation USB and where the /Index - in this case 4 is the edition index identified from before): dism /Apply-Image /ImageFile:X:\sources\install.swm /SWMFile:X:\sources\install*.swm /ApplyDir:W: /Index:4
bcdboot: bcdboot W:\Windows /S S: /F ALL
...once you've completed the above you can close the Command Prompt window by typing exit, then click the close button on the installer and, again, click close (now on the Install/Repair screen) which should prompt you to say that continuing may cause the machine to reboot. Confirm this (and if the machine does not reboot, hold down the power button to shut down your machine and manually power it back on). As soon as the machine shuts down, remove the USB installation drive.
When the machine boots, you should be booted into your new Windows installation.
Even after all of the above, in my case I ended up with an 'S version' of Windows and the Activation section of Settings was both failing to load and missing the option to exit S mode.
Pressing Win + R and entering cmd launched a dialog that then allowed me to exit S mode.
After which, launching cmd and using the slmgr /ipk <product key> command, where <product key> is your Windows product activation key to manually install the product key, followed by restarting the machine allowed me to activate the machine.
It's unclear to me why exactly these complications have not been ironed out (perhaps with the exception of Problem 3) and hopefully they'll be fixed in future but I believe it's useful to have the steps noted down somewhere in case they're needed.
With the above, you should now have Windows 11 successfully installed and activated. If you notice any mistakes or oversights please be sure to leave a comment.