Mac OSX : How to burn an ISO image to a USB key

Disk Utility FailIf you have tried to create a bootable USB key from an iso image in Mac OSX using Disk Utility then you have probably encountered the frustrating and almost Windows-like cryptic error message “Could not validate source – Invalid argument” error.

Looking in the system log via the Console app I suspect this is because internally DiskUtil tries to run /usr/sbin/asr to verify the image, which fails.

UDIF and NDIF are image formats used by Apple, and Disk Utility is pretty hopeless with anything that falls outside of these standards. The iso standard is short for ISO9660 and is a standard that defines the format of an image intended for burning to CD. Even after using hdutil to convert the image to UDRO (a UDIF Read-Only image) Disk Utility will still stubbornly refuse to help.

Disk Destroyer Duplicator to the rescue

Being Unix based, OSX has the command line dd utility available. Short for Disk Duplicator, dd is a block level reader/writer that makes raw copies from one file to another. But you want to copy the image to a device, right? That’s fine, because everything in the world of Unix/Linux is a file – even devices.

Informally referred to as Disk Destroyer, should you tell dd to output to the wrong device then your day is definitely going to be spoiled, so to avoid any mishaps we will make sure we know which devices on your system is your USB stick. You can determine this from the command line:

Each physical device will be listed as /dev/disk0, /dev/disk1, /dev/disk2 etc. Each partition on e.g. disk0, is listed as /dev/disk0s1, /dev/disk0s2, /dev/disk0s3 and so on. In the above example, /dev/disk0 is the main boot disk and /dev/disk1 is the USB stick. But there is a nicer way to be sure by typing:

It’s pretty clear from this output that /dev/disk1 is indeed my 8Gb Sandisk Cruzer USB drive.

Erasing the USB DriveThe easiest way to prepare a USB for burning is to erase it. This can be done using Disk Utility (I knew it was useful for something) by selecting your USB drive (not any of its partitions) in the left hand pane, clicking the Partition tab, and creating a 1 Partition layout, with the Format Free Space. See screenshot opposite.

Once you have removed any partition data from the device, the diskutil listing will look something like this:

The dd command is a simple animal, and only needs a few parameters:

  • if is the path to the Input File
  • of is the path to the Output File
  • bs is the Block Size (how big a chunk of data is read and written at a time). There is no real advantage to choosing a blocksize bigger than 1 megabyte.

Lets suppose we want to burn an image called sophos_usb.iso to the USB drive. The command will be

Note: We changed the device /dev/disk1 to /dev/rdisk1 – this is because in OSX each storage device has two references to it. disk[n] which is a block level, buffered device, and rdisk[n] which is the raw device – copying to the rdisk reference is about 20 times faster.

Entering the sudo command will require your admin password (due to the sudo – Super User do command). It will then take some time to copy your data and you won’t get any feedback from the terminal. As you can see, my 1Gb iso took about 90 seconds to copy.

That’s it – you should now be able to eject your USB drive and boot up the PC.

You can’t boot Macs from the majority of iso images as they don’t have the necessary EFI boot loaders – if you are trying to burn a linux iso, then take a look at Mac Linux USB Loader which we might look at another day 🙂

12 Responses to Mac OSX : How to burn an ISO image to a USB key

  1. Leila August 30, 2014 at 23:59 #

    OMG I LOVE YOU! Thank you so much for this amazing, detailed explanation!

  2. John Sanders September 15, 2014 at 02:42 #

    Thanks for your excellent article. It was the third I used to help build a bootable USB from an ISO, and it was definitely the more thorough, and explanatory.

  3. TalZ November 26, 2014 at 10:25 #

    Help me a lot.. Thanks!!
    Big (big) frustrations with disk utility…

  4. Drexo December 2, 2014 at 02:23 #

    Been trying to put a Windows 8 iso on a partition of an external HD for days now and still nothing. I came to this site because of the annoying “Could not validate source – Invalid argument” error and still nothing.
    I input the same exact command on terminal with the correct iso and partition location (I even tried to change .iso to .dmg) and after pressing enter…nothing…blank space no response…great, WTF do I do I’m obsessing!

    • Drexo December 2, 2014 at 02:26 #

      The other error I keep getting sometimes while trying to use the restore function on Disk Utility is “could not validate source – error 254”

    • Max March 24, 2015 at 18:36 #

      I thought something was going wrong as well when this happened to me… turns out I just had to wait as the Terminal is doing it’s thing. The bigger your .iso the longer you’ll have to wait!

  5. Martin W March 27, 2015 at 05:38 #

    This was incredibly helpful, I just wish I came upon this gem of an article before having to trudge through immense amounts of random irrelevant information thrown at me

    Thanks again and god speed!

  6. chrigu April 17, 2015 at 16:51 #

    you made my day man…thx

  7. choimiroquai May 8, 2015 at 02:13 #

    Thanks for your in-depth article. It turns out to be the most helpful one regarding such error. I was following the above instructions and was quite successful except the bootable usb for a firmware update wasn’t detectable on my macbook pro (15″ 2011-mid, OS X Lion 10.7.5). Can you guess any reason and a possible solution to get it detectable for booting?

  8. mike June 14, 2015 at 02:15 #

    So awesome – great formatting and explanation.

    Used it to burn a MintOS image to a USB key. Perfect and fast.
    Resulting disk booted perfectly

    Mahalo for your time and effort!

  9. longkt90 July 5, 2015 at 17:29 #

    Nice tip!

    Btw you will get error: resource is busy if you forget to umount the [mounted] USB. So just go to disk utility, choose the USB and unmount it, remember unmount – not eject.

  10. Walter R July 18, 2015 at 02:51 #

    *Slow clap*

    Thanks A LOT for this! Been struggling the last couple of days to make a proper windows usb boot and its been driving me insane.

    Another tip for someone who might have the same problem as I did: when I typed the name of the ISO. terminal couldn’t find the ISO file so instead i just dragged it directly into terminal instead of typing the name. Worked like a charm!

    Two thumbs up! Thanks again!

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.