How to use macOS to create a Windows 11 USB installer flash drive?
Mar 9
The Windows 11 ISO file, which can be downloaded from Microsoft, contains a install.wim file that is greater than 4 GiB in size. This prevents creating a USB flash drive installer by simply copying the files from the mounted Windows 11 ISO file to a FAT32 formatted USB flash drive.
If you have a machine running Windows, this is not a problem because you can download and run the mediacreationtool.exe file, which can create either a USB flash drive installer or Windows 11 ISO file. In this case, an install.esd file is substituted for the install.wim file. This install.esd file is less that 4 GiB in size and therefore will fit a FAT32 formatted volume.
However, I am use macOS which cannot execute the mediacreationtool.exe file. I am looking for a solution that can be used to create an USB Windows 11 flash drive installer. I would prefer a solution that does not involve using third party tools.
1 answer
Accepted answer · original discussion
Mar 9
This answer is summarized below.
- MBR partition a 16 GB or larger flash drive to contain a FAT32 volume and an ExFAT volume.
- Copy all the files, except
sources/install.wim, from the mounted Windows ISO file to the FAT32 volume on the flash drive. - Copy
sources/install.wimfrom the mounted Windows ISO file to the ExFAT volume on the flash drive. - Boot from the flash drive and enter a command to split the
install.wimon the ExFAT volume to two files placed on theFAT32volume. - The result is an USB flash drive which can be used to install Windows 11.
The steps are given next.
Goto Microsoft's Download Windows 11 website and download the Windows 11 disk image (ISO) for x64 devices. In my case, the
Win11_24H2_English_x64.isofile was downloaded to myDownloadsfolder. If your file name is different, then make the appropriate substitutions when entering the commands below.Insert a 16 GB or larger flash drive in an USB port on or connected to the Mac.
Open a Terminal application window.
Use the command below to determine the identifier for the USB flash drive. I my case, this was
disk2. If your identifier is different, the make the appropriate substitutions in the following commands.diskutil list externalEnter the command below to format the flash drive.
diskutil partitiondisk disk2 mbr fat32 MYFAT32 8G exfat MyExFAT REnter the command below to remove all extended attributes from the Windows ISO file. This will remove the quarantine placed on the file when it was downloaded.
xattr -c ~/Downloads/Win11_24H2_English_x64.isoEnter the command below to mount the Windows 11 ISO file. In my case, the output from the command shows the file was mounted on
/Volumes/CCCOMA_X64FRE_EN-US_DV9. If your folder name is different, then make the appropriate substitutions when entering the commands below.hdiutil attach ~/Downloads/Win11_24H2_English_x64.isoEnter the command below to change the current directory to
/Volumes/CCCOMA_X64FRE_EN-US_DV9.cd /Volumes/CCCOMA_X64FRE_EN-US_DV9Enter the commands below to copy the files from the mounted ISO to the flash drive. Note: Since the
install.wimfile is very large, thecpcommand can take a while to complete.rsync -r -t --exclude=sources/install.wim . /Volumes/MYFAT32 cp sources/install.wim /Volumes/MyExFATEnter the commands below to unmount the Windows 11 ISO file.
cd ~ hdiutil detach /Volumes/CCCOMA_X64FRE_EN-US_DV9Enter the command below to eject the flash drive. Afterwards, you can remove the flash drive.
diskutil eject disk2You can quit the Terminal application.
Using the computer where Windows is to be installed, UEFI boot from the flash drive. You should get a window similar to the one shown below. You can ignore the contents of this window.
Press the shift+F10 key combination to open Command Prompt window.
Enter the command below. From the output, determine the drive letters for the
MYFAT32andMyExFATvolumes. In my case, the wasCandDrespectively. If your letters are different, the make the appropriate substitutions forc:\andd:\when entering thedismcommand given below.echo list volume | diskpartEnter the command below to create the
install.swmandinstall2.swmfiles in thec:\sourcesfolder. Note: This command will take a while to complete.dism /split-image /imagefile:d:\install.wim /swmfile:c:\sources\install.swm /filesize:4000Enter the command below to close the Command Prompt window.
exitClose the window. When the popup shown below appears, select "Yes". The computer will reboot.
The next time you UEFI boot from this USB flash drive, you should encounter the following window. You then can proceed and install Windows 11.
Example of Using the Terminal Window
Last login: Sun Mar 9 09:16:57 on console
davidanderson@Davids-Mac ~ % diskutil list external
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk2
1: DOS_FAT_32 MYFLASHDRV 15.9 GB disk2s1
davidanderson@Davids-Mac ~ % diskutil partitiondisk disk2 mbr fat32 MYFAT32 8G exfat MyExFAT R
Started partitioning on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk2s1 as MS-DOS (FAT32) with name MYFAT32
512 bytes per physical sector
/dev/rdisk2s1: 15594504 sectors in 1949313 FAT32 clusters (4096 bytes/cluster)
bps=512 spc=8 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=2048 drv=0x80 bsec=15625000 bspf=15230 rdcl=2 infs=1 bkbs=6
Mounting disk
Formatting disk2s2 as ExFAT with name MyExFAT
Volume name : MyExFAT
Partition offset : 15628288 sectors (8001683456 bytes)
Volume size : 15370240 sectors (7869562880 bytes)
Bytes per sector : 512
Bytes per cluster: 32768
FAT offset : 2048 sectors (1048576 bytes)
# FAT sectors : 2048
Number of FATs : 1
Cluster offset : 4096 sectors (2097152 bytes)
# Clusters : 240096
Volume Serial # : 67cdc143
Bitmap start : 2
Bitmap file size : 30012
Upcase start : 3
Upcase file size : 5836
Root start : 4
Mounting disk
Finished partitioning on disk2
davidanderson@Davids-Mac ~ % xattr -c ~/Downloads/Win11_24H2_English_x64.iso
davidanderson@Davids-Mac ~ % hdiutil attach ~/Downloads/Win11_24H2_English_x64.iso
/dev/disk3 /Volumes/CCCOMA_X64FRE_EN-US_DV9
davidanderson@Davids-Mac ~ % cd /Volumes/CCCOMA_X64FRE_EN-US_DV9
davidanderson@Davids-Mac CCCOMA_X64FRE_EN-US_DV9 % rsync -r -t --exclude=sources/install.wim . /Volumes/MYFAT32
davidanderson@Davids-Mac CCCOMA_X64FRE_EN-US_DV9 % cp sources/install.wim /Volumes/MyExFAT
davidanderson@Davids-Mac CCCOMA_X64FRE_EN-US_DV9 % cd ~
davidanderson@Davids-Mac ~ % hdiutil detach /Volumes/CCCOMA_X64FRE_EN-US_DV9
"disk3" ejected.
davidanderson@Davids-Mac ~ % diskutil eject disk2
Disk disk2 ejected
davidanderson@Davids-Mac ~ %
Example of Using the Command Prompt Window
Microsoft Windows [Version 10.0.26100.1742]
(c) Microsoft Corporation. All rights reserved.
X:\sources>echo list volume | diskpart
Microsoft DiskPart version 10.0.26100.1150
Copyright (C) Microsoft Corporation.
On computer: MININT-NBNQP5I
DISKPART>
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 E DVD-ROM 0 B No Media
Volume 1 C MYFAT32 FAT32 Removable 7629 MB Healthy
Volume 2 D MyExFAT exFAT Removable 7505 MB Healthy
DISKPART>
X:\sources>dism /split-image /imagefile:d:\install.wim /swmfile:c:\sources\install.swm /filesize=4000
Deployment Image Servicing and Management tool
Version: 10.0.26100.1150
The operation completed successfully.
X:\sources>exit
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.