Skip to content

Instantly share code, notes, and snippets.

@MuttakinHasib
Created August 11, 2025 01:14
Show Gist options
  • Save MuttakinHasib/4b2ef54ef365e89643a38c691c30a6d8 to your computer and use it in GitHub Desktop.
Save MuttakinHasib/4b2ef54ef365e89643a38c691c30a6d8 to your computer and use it in GitHub Desktop.
Create a Windows 11 Bootable USB (GPT/UEFI) on macOS

Create a Windows 11 Bootable USB (GPT/UEFI) Using macOS

This guide helps you create a Windows 11 installer USB that boots in UEFI/GPT mode using only macOS tools. No Windows PC required.


Prerequisites

  • Windows 11 ISO (Download from Microsoft)
  • USB flash drive (≥16 GB, all data will be erased)
  • macOS Terminal
  • wimlib (only if ISO's install.wim > 4GB)

Step 1. Download Windows 11 ISO

Go to Microsoft’s official download page and save the ISO to your Downloads folder.


Step 2. Insert and Identify Your USB Drive

Open Terminal and list disks:

diskutil list

Note your USB’s identifier (e.g. disk2). All data will be erased!


Step 3. Erase USB as GPT + FAT32

Run:

sudo diskutil eraseDisk MS-DOS "WIN11" GPT /dev/disk2
  • Replace disk2 with your USB’s identifier.

Step 4. Mount the Windows ISO

Double-click the ISO in Finder or run:

open ~/Downloads/Win11_English_x64.iso

The ISO mounts under /Volumes/, usually named CCCOMA* or CPBA*.


Step 5. Copy Installation Files

A. If sources/install.wim < 4GB

Simply copy all files:

rsync -avh --progress /Volumes/CCCOMA*/ /Volumes/WIN11/

B. If sources/install.wim > 4GB

  1. Install wimlib:

    brew install wimlib
  2. Copy all files except install.wim:

    rsync -avh --exclude=sources/install.wim /Volumes/CCCOMA*/ /Volumes/WIN11/
  3. Split install.wim into chunks:

    wimlib-imagex split /Volumes/CCCOMA*/sources/install.wim /Volumes/WIN11/sources/install.swm 3800

    This creates install.swm, install2.swm, etc.


Step 6. Eject USB

diskutil eject /dev/disk2

Remove the USB safely. It’s now ready for UEFI/GPT Windows installation.


Troubleshooting

  • USB not booting: Ensure you used GPT + FAT32 and Secure Boot is off or set to “Microsoft/3rd-party.”
  • “Missing media driver” error: Make sure install.swm files exist in /sources/.
  • Copy fails (“Read-only file system” on Sonoma):
    diskutil unmount /dev/disk2s1
    sudo mkdir -p /Volumes/WIN11
    sudo mount -w -t msdos /dev/disk2s1 /Volumes/WIN11
    Then resume rsync.

GUI Alternatives

  • BalenaEtcher: Simple but may fail on UEFI-only PCs due to lack of WIM splitting.
  • UUByte ISO Editor, Ventoy, UNetbootin: May not split WIM; Terminal method is most reliable.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment