You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.
### 1. Download a Windows disc image (i.e. ISO file)
You can download [Windows 10](https://www.microsoft.com/en-us/software-download/windows10ISO) or [Windows 11](https://www.microsoft.com/en-us/software-download/windows11) directly from Microsoft.
### 2. Identify your USB drive
After plugging the drive to your machine, identify the name of the USB device using `diskutil list`, which should return an output like the one below. In my case, the correct disk name is `disk2`.
Format the drive with the following command, substituting `disk2` with whatever is the one that corresponds in your machine.
```zsh
diskutil eraseDisk MS-DOS "WINDOWS10" MBR disk2
```
### 4. Mount the Windows ISO and check its size
Mount the ISO file in your system (usually by simply double-clicking it), and verify it's listed in `/Volumes`—the disk name usually starts with `CCCOMA_`. With the disk mounted, check the size of the `sources/install.wim` file with the following command:
```zsh
ls -lh /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim
```
### 5. Copy (almost) all files to USB drive
**If `sources/install.wim` is less than 4GB in size**, you can copy all the files from the mounted disk image onto the USB drive with the following command (notice the trailing slash in the first path!):
**If `sources/install.wim` is more than 4GB**, then we'll need to split the file before copying it. In the meantime, we can copy all the other files from the mounted image onto the USB drive with the following command (again, notice the trailing slash in the first path!):
### 6. Use `wimlib` to split and copy `sources/install.wim`
If `sources/install.wim` is more than 4GB, it is too large to copy onto a FAT32-formatted drive. Microsoft's [official solution](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/install-windows-from-a-usb-flash-drive?view=windows-11) is to split the file, and there is a free utility available in macOS and Linux to do so—`wimlib`. The tool can be installed with [Homebrew](https://brew.sh/):
```zsh
brew install wimlib
```
After installing `wimlib`, split and copy `sources/install.wim` using the following command: