Skip to content

Instantly share code, notes, and snippets.

@joaofraga
Created November 24, 2015 17:37
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save joaofraga/db7ce4b162b2412d71d0 to your computer and use it in GitHub Desktop.
Save joaofraga/db7ce4b162b2412d71d0 to your computer and use it in GitHub Desktop.
Bootable Windows USB from Mac OSX (Terminal)

How to create an Bootable Windows USB from OSX without Bootcamp

You will need

  • USB SSD with at least 8GB
  • Windows .ISO

With this on hands

Open terminal and do the following:

diskutil list

This will list your mountable disks on your Mac, discover which is the path of your USB stick and then: IMPORTANT: The value will be something like: /dev/disk10 (the number is what identify your disks, be carefull).

diskutil unmountDisk /dev/disk10

Next open and terminal and use:

sudo dd if=PATH_TO_WINDOWS10_ISO of=USB_MOUNT_PATH bs=1m 

This is what the final command should look like:

sudo dd if=/Users/joao/Downloads/pt_windows_10_education_version_1511_x64_dvd_7224110.iso of=/dev/disk5 bs=1m

Next press enter, its going to ask for your password, enter your password and hit enter. This will start the process.

You need to be patient when I first did this on a USB 2.0 it took 39 minutes. This time because i was curious I used a USB 3.0 and it took 21 minutes

When its finished you will see the bytes transferred, the time it took in seconds, and the bytes/sec.

Finally, you have one more step. In terminal you want to type

diskutil eject /dev/disk10

This will eject the disk, and you can remove it from the USB port. For verification, I reinserted the USB, opened it up, and this is what you should see

Congratulations

You now have a bootable Windows 10 USB drive.

@TechUnRestricted
Copy link

TechUnRestricted commented Apr 13, 2024

I came here to say that in 2024, using the dd command, it is impossible to create a full-fledged bootable USB flash drive with Microsoft Windows.

Modern Windows .iso images are using the Universal Disk Format (UDF), instead of MS-DOS (FAT32) so it's not compatible with most motherboard firmwares.

The only real way is to format the drive in FAT32 with MBR partition map.

  • Why FAT32?
    It's the most supported filesystem for UEFI firmwares. Use exFAT if you want to make a bootable drive for Mac computers only.
  • Why MBR?
    Microsoft installer is a bit buggy, so if it sees a EFI partition on USB drive, it sometimes crashes at the end of the process with the message like "Windows could not prepare the computer to boot into the next phase of installation"

So the next step should be like: "Format the USB drive and then copy the contents from .iso to USB."

But here is a problem:
The max file size for FAT32 file is ~4GB, so depending on the Windows version, the size of install.wim file can be over 4GB.

So we need to somehow bypass this limitation.
Of course we will split it into multiple parts!

You can do it manually or just use my utility I developed in order to solve these problems in one click.
It's completely free and open-source. So no need to worry about anything.

WinDiskWriter

It supports every Windows version, starting from Vista and up to 11.

  • UEFI & Legacy,
  • x64 & x32

It acts almost like a Rufus but for macOS.
How to run? Check the instructions.

Any questions? You can ask me :)

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