In order to perform a clean Windows installation it is needed to create the installation media. In this port I will show how to manually create a Windows 11 installation USB drive.
For more information on how to obtain the official installation media see my post Windows 11 Installation.
Connect the desired USB drive to your PC and open Windows Terminal as administrator. I have another post on configuring Windows Terminal if you want to know more.
Load the application to partition the USB drive via the following command and if prompted allow changes to the device:
Note: Comamnds in diskpart can be used in its short format.
Verify which disk number is your USB drive by using the following command:
Select the disk (in my case is was disk 5):
sel dis 5
Wipe the disk:
Create a partition:
Note: For booting in UEFI, partition needs to be fat32 which cannot be created with sizes greater than 32GB. If your disk has bigger capacity, include the parameter size with a value no bigger than 32GB in the command line, otherwise, the parameter is optional.
See example for creating a partition sized at 8GB.
cre par pri size=8192
Make the partition bootable:
Format the partition with far32 type and assign a label to it so it is easier to identify the drive when inserted, for example Win11Setup.
format fs=fat32 quick label=Win11Setup
Assign a letter to the drive, W: in this example.
assign letter w
Now, close diskpart by typing exit and Enter or by closing the window.
Mount the Windows 11 installation media by double-clicking in the .iso file or right-click, then Mount.
Copy the whole content of the .iso and paste into your W: drive.
If the installation media has a install.wim file is bigger than the maximum file size a fat32 partition can store, the file will not be copied and a prompt will be displayed. Select to skip this file. We will split the file later so it fits the USB drive partition.
Copy the install.wim file from the installation media, folder sources, into a directory of your choice.
Go back to Windows Terminal and navigate to the folder you copied the install.wim file to.
We need to split the install.wim file using dism tool.
Note: To see the options and parameters used for this command, use:
dism /split-image /?
To split the install.wim in smaller files of 1GB or less, use the following command:
dism /split-image /ImageFile:install.wim /SWMFile:install.swm /FileSize:1024
Note: See that we have used .swm extension for the output files.
The final output should be something like this:
Now, copy all the .swm files to W:\sources
The final result should be this:
You now have a working USB drive for Windows 11 installation.