Prerequisites

  1. macOS system.
  2. A USB drive with at least 8 GB of storage.
  3. Download the Windows 11 ISO from Microsoft’s official site.
  4. Install Homebrew (required for wimlib).

Step-by-Step Guide

Step 1: List All Disks to Identify Your USB Drive

Run the following command to list all connected drives:

diskutil list

Example Output

/dev/disk4 (external, physical):
   #: TYPE NAME      SIZE      IDENTIFIER
   0: GUID_partition_scheme   *32.0 GB   disk4
   1: Microsoft Basic Data    WIN11      32.0 GB   disk4s1

Identify your USB drive (e.g., /dev/disk4). Replace diskX in subsequent commands with your USB’s identifier.


Step 2: Erase and Format the USB Drive

Format the USB drive for FAT32 compatibility:

diskutil eraseDisk MS-DOS "WIN11" MBR /dev/diskX

Example

diskutil eraseDisk MS-DOS "WIN11" MBR /dev/disk4

Step 3: Mount the Windows 11 ISO

Mount the ISO file:

hdiutil mount ~/path/to/Windows11.iso

Example

If your ISO file is in Downloads:

hdiutil mount ~/Downloads/Win11_24H2_EnglishInternational_x64.iso

The ISO mounts to a volume, e.g., /Volumes/CCCOMA_X64FRE_EN-GB_DV9.


Step 4: Copy Files to the USB (Excluding install.wim)

Copy the contents of the ISO to the USB drive, excluding the large install.wim file:

rsync -av --progress --exclude=install.wim /Volumes/WindowsISO/ /Volumes/WIN11/

Example

rsync -av --progress --exclude=install.wim /Volumes/CCCOMA_X64FRE_EN-GB_DV9/ /Volumes/WIN11/

Step 5: Split the install.wim File

Large files like install.wim need to be split for FAT32 compatibility.

  1. Navigate to the sources directory:

    cd /Volumes/WindowsISO/sources/
    

    Example:

    cd /Volumes/CCCOMA_X64FRE_EN-GB_DV9/sources/
    
  2. Install wimlib (if not already installed):

    brew install wimlib
    
  3. Split the install.wim file:

    wimlib-imagex split install.wim /Volumes/WIN11/sources/install.swm 4000
    

Step 6: Unmount the ISO and USB Drive

Unmount the ISO:

hdiutil unmount /Volumes/WindowsISO

Example:

hdiutil unmount /Volumes/CCCOMA_X64FRE_EN-GB_DV9/

Unmount the USB drive:

diskutil unmountDisk /dev/diskX

Example:

diskutil unmountDisk /dev/disk4

Troubleshooting

1. diskutil Error: Disk Busy

  • Ensure no files or programs are accessing the USB drive.
  • Retry the command after closing all applications.

2. install.wim Not Found

  • Double-check the path to the ISO.
  • Verify that the ISO is properly mounted.

Summary Script

Here’s a full script you can customize:

# Variables
ISO_PATH=~/Downloads/Win11_24H2_EnglishInternational_x64.iso
USB_DISK=/dev/disk4
MOUNTED_ISO_NAME=CCCOMA_X64FRE_EN-GB_DV9

# Step 1: Format the USB Drive
diskutil eraseDisk MS-DOS "WIN11" MBR $USB_DISK

# Step 2: Mount the ISO
hdiutil mount $ISO_PATH

# Step 3: Copy ISO files to USB (exclude install.wim)
rsync -av --progress --exclude=install.wim /Volumes/$MOUNTED_ISO_NAME/ /Volumes/WIN11/

# Step 4: Split install.wim
cd /Volumes/$MOUNTED_ISO_NAME/sources/
brew install wimlib
wimlib-imagex split install.wim /Volumes/WIN11/sources/install.swm 4000

# Step 5: Unmount the ISO and USB
hdiutil unmount /Volumes/$MOUNTED_ISO_NAME
diskutil unmountDisk $USB_DISK