Make a bootable Windows 10 USB drive from a Mac

Burn a Windows 10 ISO to a USB drive on a Mac

This is a quick "how to" guide to make a bootable Windows 10 USB drive/stick on a Mac from an ISO file. If you haven't already done so, you'll need to download the Windows 10 disk image (ISO) file from Microsoft.

The process is straightforward, but requires one third party tool called wimlib and some terminal/command prompt usage.

Preamble: why's it so difficult?

Normally I use etcher for burning ISOs, but a Windows USB installer has special requirements in order to be bootable (it uses a special UEFI boot process).

Originally it seems that you could create a bootable USB disk using MacOS's Boot Camp Assistant1, but that option seems to've been removed in recent versions of MacOS.

I found a guide from a guy called Josh Beam which was written in 2017. He suggests formatting the USB disk on the command line and copying the files over manually. This helped, but I came across a problem: the installer requires the USB drive be formatted as FAT32, which has a file size limit of 4 GB. One of the files in the current 64-bit version of the Windows 10 installer, install.wim, is 4.3 GB. The solution is to split the file, as described in the official installation instructions from Microsoft, but that only covers creating the USB drive from Windows.

Here, I'll describe how to do so on a Mac using a special third party tool called wimlib.

Step 1: Format the USB drive

The first step is to identify the USB drive device name using diskutil list. Make sure you identify the correct USB disk, as entering the wrong device name in the next command could lead to data loss.

Now format the drive as follows, substituting your disk name for diskN:

diskutil eraseDisk MD-DOS "WINDOWS10" MBR diskN

Step 2: Mount the ISO and copy most of the files

Mount the Windows 10 ISO by opening it in Finder. Check the name of the volume in Finder, or in the command prompt:

ls /Volumes

For me, using the Windows 10 Fall Creators Update, the disk name is /Volumes/CCCOMA_X64FRE_EN-US_DV9. If yours is slightly different, substitute it in future commands.

Check the size of the install.wim file as follows:

ls -lh /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim

If it's less than 4 GB, you can just copy all files over as follows, then you're done (just eject the USB disk in Finder when complete):

rsync -avh --progress /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WINDOWS10

If it's more than 4 GB, which it seems to be on all recent Windows 10 downloads, you'll need to split the file. Copy all files except install.wim to the USB drive:

rsync -avh --progress --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WINDOWS10

Step 3: Download wimlib and use it to split install.wim

The final problem is that the install.wim file is too big to copy across to the FAT32-formatted USB stick2 (you can try, but will be met with an error). On Windows, Microsoft's official solution is to split the file using a special tool designed for these .wim files. Fortunately, there's also a free alternative called wimlib which works on Mac (and Linux). The easiest way to get this installed is using a package management tool called homebrew, which allows easy installation of lots of free software and is highly recommended.

To install homebrew, run the following:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This will create a new command, brew, which handles package management (like installation and upgrades).

Use homebrew to install wimlib, like this:

brew install wimlib

Then you can split the install.wim file as follows:

wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WINDOWS10/sources/install.swm 4000

The 4000 means the file should be split into 4000 MB-sized chunks (which is slightly less than 4 GB).

Finally, simply eject the WINDOWS10 volume by clicking on the eject symbol in Finder, and remove the USB drive. It's now ready to use as a bootable installation disk.

Summary

Here, I've covered how to create a bootable USB drive for installing Windows 10 using a Mac and an ISO image downloaded from Microsoft. File this one under "no idea why they make this so difficult"!

Thanks for reading!

  1. https://www.windowscentral.com/how-create-windows-10-installer-usb-drive-mac
  2. I've also tried using exFAT, which doesn't have the 4 GB file limit, but then the USB drive isn't bootable in my machine

Related Posts