This commit is contained in:
Cory 2025-08-04 20:01:55 -04:00
parent cc3e084982
commit 5057569fc4
3 changed files with 91 additions and 1 deletions

View file

@ -0,0 +1,87 @@
---
title: Creating a bootable Windows USB
description: Step-by-step guide to create a bootable Windows USB installer on macOS using built-in tools and additional utilities like wimlib.
---
Creating a bootable Windows installer USB on any OS that isn't Windows (shocker) is near impossible without knowing a bit of command line. Here's my steps to create a working Windows 10 or 11 USB using built-in macOS tools with the help of another tool called wimlib.
### 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 into 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 `disk4`.
```text
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: Apple_APFS_ISC Container disk1 524.3 MB disk0s1
2: Apple_APFS Container disk2 245.1 GB disk0s2
3: Apple_APFS_Recovery Container disk3 5.4 GB disk0s3
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +245.1 GB disk2
Physical Store disk0s2
1: APFS Volume Macintosh HD 11.3 GB disk2s1
2: APFS Snapshot com.apple.os.update-... 11.3 GB disk2s1s1
3: APFS Volume Preboot 7.1 GB disk2s2
4: APFS Volume Recovery 1.0 GB disk2s3
5: APFS Volume Data 172.7 GB disk2s5
6: APFS Volume VM 20.5 KB disk2s6
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.7 GB disk4
1: DOS_FAT_32 WINDOWS11 15.7 GB disk4s1
```
### 3. Format USB drive
Format the drive with the following command, substituting `disk4` with whatever is the one that corresponds in your machine.
```zsh
diskutil eraseDisk MS-DOS "WINDOWS11" 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!):
```zsh
rsync -avh --progress /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WINDOWS11
```
**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!):
```zsh
rsync -avh --progress --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WINDOWS11
```
### 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:
```zsh
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WINDOWS11/sources/install.swm 3800
```
Here, `3800` means that the file should be split in 3,800MB chunks.

View file

@ -28,7 +28,9 @@ Youll notice Roku devices arent listed. While they technically work, they
### Want something added to Plex?
If youd like to request a new movie or TV show, visit the [Plex Requests page](plex-requests.md) for more information on how. This helps keep the library updated with the content you want to see!
Ready to set up your streaming app? [Click here](clients/index.md) to continue.
#### Ready to set up your streaming app?
[Click here to continue →](clients/index.md)
---