In this post, I’ll describe how you can create a bootable Windows installation USB drive using macOS (and Linux too).

Please note that this guide is written primarily for macOS, you might need to adapt some parts on Linux. Disk Utility, for example, is not available on Linux, but you can replace it with gparted or a command line tool to achive the same effect.

Prerequisites

You’ll have to have the following:

Creating the USB drive

You can create the USB drive by using the following steps:

  1. Open Disk Utility and Erase the USB drive
    • You might need to use “View > Show All Devices” in order to see the target drive itself instead of the volume
    • Use FAT as partition format, and MBR instead of GUID
  2. Mount the iso using the following command:
    • hdiutil mount /path/to/windows.iso
    • Replace /path/to/windows.iso with the actual path of the .iso file
  3. Copy the iso contents to the drive:
    • rsync -vha --exclude=sources/install.wim /Volumes/NAME_OF_ISO/* /Volumes/TARGET_DRIVE
    • Replace NAME_OF_ISO with the name of the mounted volume (visible in Finder or Disk Utility)
    • Replace TARGET_DRIVE with the name of the target drive volume (also visible in Finder or Disk Utility)
  4. Rebuild/split the install.wim archive:
    • wimlib-imagex split /Volumes/NAME_OF_ISO/sources/install.wim /Volumes/TARGET_DRIVE/sources/install.swm 3800
    • Replace NAME_OF_ISO with the name of the mounted volume (visible in Finder or Disk Utility)
    • Replace TARGET_DRIVE with the name of the target drive volume (also visible in Finder or Disk Utility)
  5. Unmount the target drive and use it to boot the Windows installer