How to Copy an ISO to a USB Drive from Mac OS X with dd

Jun 5, 2015 - 66 Comments

Terminal in OS X If you have downloaded an ISO image of another operating system, say Ubuntu Linux or Windows 10, and you wish to turn that ISO image file into a bootable USB installer drive using a USB flash drive or USB key, you’ll find the most reliable way to copy or ‘burn’ the ISO to that target USB volume is by turning to the command line of Mac OS X. There are alternative solutions, but this command line approach using dd requires no third party downloads, it is quite fast, and is consistently reliable in producing bootable volumes out of ISO files.


It’s important to note this is somewhat advanced and should only be used by Mac users who are thoroughly comfortable with the command line. By using sudo dd, there is little margin for error, and a wrongly implicated disk identifier could result in permanent data loss. That risk makes this method not appropriate for novice OS X users, instead, those users should turn to the simpler approach of using Disk Utility to burn an ISO the traditional way instead.

How to Copy an ISO File to a Target Drive Using ‘dd’ in Mac OS X

This will erase the target volume, replacing whatever data is on the destination drive with the ISO contents. There is no confirmation, therefore it is critical you use the proper drive identifier and proper syntax to avoid erasing the wrong thing. You should back up the Mac with Time Machine before beginning.

  1. Attach the target USB drive to the Mac if you haven’t done so yet, then launch Terminal
  2. Type the following command to print a list of attached volumes on the Mac:
  3. diskutil list
    This may look something like the following, it will be different on every Mac:

    $ diskutil list
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *251.0 GB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_CoreStorage 250.1 GB disk0s2
    3: Apple_Boot Recovery HD 650.1 MB disk0s3
    /dev/disk1
    #: TYPE NAME SIZE IDENTIFIER
    0: Apple_HFS Macintosh HD *249.8 GB disk1
    Logical Volume on disk0s2
    Unlocked Encrypted
    /dev/disk3
    #: TYPE NAME SIZE IDENTIFIER
    0: partition_scheme *5.3 MB disk3
    1: partition_map 32.3 KB disk3s1
    2: FAT_32 THE_DESTINATION 8.2 GB disk3s2
    /dev/disk4
    #: TYPE NAME

  4. Locate the USB volume name of the target drive (in this example, “THE_DESTINATION”) and make note of the identifier (in this example, “disk3s2”)
  5. Find the disk identifier with diskutil list to direct dd to

  6. Unmount the target volume using the following command, replacing the identifier as appropriate:
  7. sudo umount /dev/(IDENTIFIER)

    Again using the above example, which is not universally applicable:

    sudo umount /dev/disk3s2

  8. You’re now ready to format the target drive and ‘burn’ the ISO to that USB volume – this will erase all data on the target drive replacing it with the ISO, this can not be undone – it is absolutely critical that you target the proper identifier to avoid unintended data loss. Assuming you know what you’re doing, replace the iso path with the ISO to burn to the intended target identifier volume using the following command:
  9. sudo dd if=/path/image.iso of=/dev/r(IDENTIFIER) bs=1m

    For example, with a Windows ISO named ‘Windows10_x64_EN-US.iso’ on the desktop, the syntax would be:

    sudo dd if=~/Desktop/Windows10_x64_EN-US.iso of=/dev/rdisk3s2 bs=1m

    Note that an ‘r’ signifier is placed in front of the disk identifier, this makes the command much faster. The ‘bs=1m’ at the end is for blocksize, which also speeds up the process. Neither of these adjustments are necessary to copy the ISO to the disk image successfully, it just results in a notably faster experience.

  10. When you’re certain the syntax is proper, hit return and enter the administrator password, the copy process will begin immediately

There is no progress bar so just wait it out, how long the ISO copy process takes depends on a variety of things, including the speed of the Mac, the speed of the target volume, and the size of the ISO file being copied or burned to the destination.

When finished, you can eject the volume, it’s ready to go.

diskutil eject /dev/(IDENTIFIER)

For what it’s worth, this works to copy ISO images that aren’t boot volumes and installers too. For example, if you made an ISO yourself of a volume, you could use the above command sequence to copy that ISO to another volume as well.

We’ve covered a similar dd trick, but the modifications outlined here make the above process faster and more reliable for some users. This method should work fine in all versions of OS X, regardless of what’s running on the Mac.

If you know of another method to quickly turn ISO images into bootable install volumes, do let us know in the comments!

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS X, Tips & Tricks

66 Comments

» Comments RSS Feed

  1. Theo Douglas says:

    This is good I used to use dd all the time and still do in some occasions, but, I have found two better solutions which are easier for the average Mac Joe too.

    WINDOWS: For making a bootable Windows installer from OS X I’ve found the absolute easiest method is to use Boot Camp Assistant, works every time and you can feed it an ISO and you’re good to go. It even works with the Preview versions too

    http://windows.microsoft.com/en-us/windows/preview-iso

    LINUX: For making Linux installers from ISO files, I like unetbootin, which can streamline the process of downloading the ISO of your choosing and burning it to the destination of choice for an installer.

    http://unetbootin.sourceforge.net/

    STORAGE & MULTI-BOOT: You can triple boot OS X, Windows, Linux, just be sure you have a big hard drive. Windows 10 is very storage hungry I wouldn’t attempt less than 50GB for Windows, you can get away with less for Linux. Best used on a 512GB+ SSD, overall.

    • Pablo says:

      Great information, thanks! Trying out unetbootin now.

    • PJSF says:

      Is there a link with addtional detail on using Boot Camp Assistant to create the bootable USB for Windows?

      • Paul says:

        It’s quite easy, you’ll need a Windows 8 or newer ISO (windows 10 works fine), and a large enough USB key to support the file size, I’ve used a 16GB for Windows 10 and it was fine. Then open “Boot Camp Assistant” in OS X (/Applications/Utilities/ folder) and go through the steps, Apple makes it very automated and it works quite well. We’ll cover it in detail perhaps in a future walkthrough.

    • xDisruptor says:

      > For making a bootable Windows installer from OS X I’ve found the absolute easiest method is to use Boot Camp Assistant, *works every time*

      Yeah right … unless it doesn’t even show the option to create a bootable usb thumbdrive EVEN AFTER ONE MANAGES TO MANUALLY EDIT THE .PLIST FILE. Stupid utility.

      • Steve says:

        Agreed – Boot Camp Assistant is way too inflexible, wants a very rigid workflow, and gives no diagnostics, logging, progress indicators or debug options. It has a bunch of platform-specific capabilities that are hidden but strictly enforced, requiring PRAM resets to fix and .plist edits to workaround.

        It also has virtually no built-in Help or tutorial, instead shuttling you off to articles on Apple’s site that may or may not apply to the version you’re using.

    • Jonathan says:

      bs=1m is the block size, if you get an error you can use bs=1M. with a capital M, you are able to see the progress by hitting ctrl+t, this will show how many blocks have passed, blocks being 1mb in size it’s easy to see.

      Regards.

    • Maurice says:

      Theo – you saved me here! Great tip about Bootcamp Assistant

  2. Barton says:

    > The ‘bs=1m’ at the end is for bitesize
    I would suggest “block size”. It is the size of the chunks of data that are written, in bytes.

  3. HenryAZ says:

    Can you explain the significance of the ‘r’ in front of the disk identifier?

    • Paul says:

      The ‘r’ is for ‘raw’, basically it’s faster and more direct than just using the disk identifier. You can use either, or one or the other, as far as I know there’s no benefit other than speed.

      Cholingo details this quite a bit below, referencing the man page for hdiutil, thanks for that!

  4. Cholingo says:

    The ‘r’ prefixing the identifier signifies the raw data under the visible file system, which is necessary to make the output volume bootable. It’s also faster because it’s block aligned IO. Basically, rdisk goes directly to the disk, disk goes through the fileystem.

    man hdiutil has more details if you’re curious which has this

    ” Since any /dev entry can be treated as a raw disk image, it is worth noting which devices can be accessed when and how. /dev/rdisk nodes are character-special devices, but are “raw” in the BSD sense and force block-aligned I/O. They are closer to the physical disk than the buffer cache. /dev/disk nodes, on the other hand, are buffered block-special devices and are used primarily by the kernel’s filesystem code.

    It is not possible to read from a /dev/disk node while a filesystem is mounted from it, but anyone with read access to the appropriate /dev/rdisk node can use hdiutil verbs such as fsid or pmap with it.Beware that information read from a raw device while a filesystem is mounted may not be consistent because the consistent data is stored in memory or in the filesystem’s journal.”

  5. Justin says:

    THis is great. Seems so simple that I am suprised there isnt a simple GUI app for mac to do this behind the scenes. Wouldnt this implementation be trivial?

  6. brandito says:

    how do i know when it is finished? It has been a few hours, but the flash drive is still blinking and after entering the password, i never received a complete message. .iso is about 4.8GB SUSE Linux.
    thanks,

  7. Ehsan says:

    It is a really feasible solution. Thanks a lot.

  8. superfuji says:

    I have followed the above procedure but I always fail.

    What I have done is create a partition first on the usb using “free space” then execute the sudo dd command (same as the above instruction) on the usb primary drive (disk2 in my case).

    • Mark says:

      Yes, I found that using the disk name + partition in the dd command (eg, disk2s2) is not creating a bootable drive that will work on the intended PC-The dd does complete ok though. Tonight I am going to try just referencing the primary disk identifier (eg disk2) to see what happens.

  9. Just a suggestion using dd; you can send a SIGINFO to dd, to find out the progress; the best way is to press “ctrl + t” and dd will display the current progress.

  10. Starting Grid says:

    Have done all of that but than I can not enter my password.
    thx for help.

  11. Mike says:

    This did not work for me on 10.10.5 (2012 Mac mini). I tried every variation I could think of:

    – Partitioning the USB drive as GUID, MBR
    – Formatting as “Free Space,” HFS+, ExFAT, FAT
    – dd to diskn, rdiskn, disknsm, rdisknsm

    Nothing worked. Some combinations produced a drive that contained the files from the iso, but it wouldn’t boot (did not show up in EFI when holding down Option, nor in System Preferences / Startup Disk). Others were unreadable altogether.

    Good thing I have an external Blu-ray drive. I managed to dig up an old blank CD and burn it. Booted just fine. Who says optical media is dead??

    • Dave says:

      Here is the correct way to burn a usb with diskutil. This article left out that the .iso needs to be converted to an .img an apple puts on at the end a .dmg (it’s an apple thingy). OS X 10.11.2

      http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx

      hdiutil convert -format UDRW -o filename.iso (backspace and change to .img) filename.iso

      Here is how it looks, (copy and paste filename)
      hdutil convert -format UDRW -o ubuntu-15.10-desktop-amd64.img ubuntu-15.10-desktop-amd64.iso

      Instead of typing in ~/home/usr/ an so on when in the terminal cd to working directory or where you downloaded the iso file then the command for dd if=filename.iso of=/dev/rdiskn (where n is the number) bs=1m.

      In apple’s dd if=filename.img.dmg of=/dev/rdiskn bs=1m

      Hope this helps

      • Paul says:

        Now THIS was helpful! Totally the missing info from the article. Brain-racking, hours-Googling problem, grumble mood thanks!

        • Jeff says:

          I also needed this step. My commands were:
          diskutil unmountDisk /dev/disk2s1
          sudo dd if=~/Desktop/lubuntu-16.04-desktop-i386.img.dmg of=/dev/rdisk2 bs=1m

  12. flux says:

    didn’t work usb was not bootable

    • wrong says:

      You burned the ISO wrong, try again

      • rob says:

        Doesn’t work for me either. I tried 3 different thumb drives, and downloaded both the official Windows 10 ISO direct from Microsoft, and tried a pirated ISO. I also tried converting both of the ISO’s to images as well. Neither will boot in my PC, in any of the 3 thumb drives, using the ISO or the IMG.

        I also used the same drives and the same method to create two different bootable Linux drives, which both work fine. So the process is obviously correct, but there has to some other variable here.

        For the purposes of thoroughness, I tried 1 Sandisk, 2 PNY, and 1 ADATA drives.

  13. Alex says:

    Didn’t work for me ether. The thumb drive after that is empty and not formatted even though it says the transfer was successful.

    3830+1 records in
    3830+1 records out
    4017000448 bytes transferred in 1102.431775 secs (3643763 bytes/sec)

    But then when you reinsert the usb thumb drive OS says “The disk you inserted was not readable by this computer.” and offers to initialize it.

  14. Alex says:

    Looks like you have to convert the iso into img first.

  15. Ely says:

    Something else to add that makes the process easier; dragging the source .iso file to your terminal window will input the file path for you.

  16. efe says:

    Hi,
    I have a PC and a Mac. As always, my windows has crashed. So, I bought a lower version of windows and downloaded it on my Mac but the problem is I can’t create bootable USB from my PC because windows won’t start. Can I create a bootable USB from my Mac for my PC using this method?

  17. Wes Fok says:

    seems working
    MACs-iMac:~ mac$ sudo dd if=/Users/mac/Downloads/CentOS-7-x86_64-Everything-1503-01.iso of=/dev/rdisk1s1 bs=1m
    7240+0 records in
    7240+0 records out
    7591690240 bytes transferred in 474.486823 secs (15999792 bytes/sec)
    MACs-iMac:~ mac$

  18. Sur Max says:

    Thanks for the wonderful tip.

  19. Florian says:

    Thanks! The best tutorial that I found…100% working for me

  20. Wonder says:

    I am trying out using an external Harddisk to install Win8 on Mac, all the steps above appeared to work during the process, however Mac cannot detect the bootable drive.

    can the bootable disk be mounted again? Seems like it doesn’t work for me and is it required to reformat before trying again?

    thanks!

  21. Tom Hallam says:

    Could not get this to work. I suspect that your use of a partition device (/dev/rdisk1s1) instead of the disk device (/dev/rdisk1) is the issue, as you are using disk images not partition images.

    The instructions at http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx do work

    • tres perros says:

      hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso

      diskutil list

      (determine the device node assigned to your flash media (e.g. /dev/disk2))

      diskutil unmountDisk /dev/diskN

      sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m

      diskutil eject /dev/diskN

  22. Gosh says:

    I try “sudo umount /dev/…”, but get only “Resource busy — try ‘diskutil unmount'”. How fix this?

  23. Mr. Peabody says:

    please keep this discussion alive… I have tried everything several times over, double checked, triple checked, quadruple checked all of my work and my USB drive still comes up as unreadable. I am using a Mac mini late 2011, OS 10.11.x. i’m assuming that the disk should be readable after it’s formatted and before I reboot, is that correct?

  24. Mr. Peabody says:

    i’m also assuming that, after I convert the iso to an .img.dmg file, that I am to then manually change the file name to delete the .dmg portion of the suffix, is that correct?

  25. Evan P says:

    I think I may have screwed this up I used the sudo dd but totally forgot to direct it to my USB is there anyway I may have screwed up something on my drive?

  26. Ziga says:

    There is progress with dd. You should use signal USR1 and kill the procecss with it. Then it will should you stats in terminal where dd runs. Ex: kill -USR1 12345
    12345 is process id from Ex: ps aux | grep dd

  27. Nico says:

    Hi There, thank’s for the tutorial
    I got a problem after it
    I finished it and when i tried to reboot I got the white screen of the death and the circle with the diagonal bar.
    Even if I try to boot the recovery mode or anything
    In the single user mode it’s tell me that he can’t find a bootable partition but when I check my drive it’s telling me that it’s fine.

    I remove my Drive from it’s case and try to plug to another computer and it’s correct, everything is in it
    I have a Time Machine Backup on my other hard drive.

    Macbookpro unibody Late2011, Elcapitan, intel i5,Samsung SSD840 evo, HDD Seagate 500go

    I run out of Ideas if you guys could help me

  28. RobertG says:

    I followed the directions. When I tried to boot the computer from the external device, it says “Missing operating system”

  29. Laura says:

    I couldn’t get umount to work, but the alternative worked. (diskutil unmount /dev/IDENTIFIER)

    Lauras-MBP:~ laura$ sudo umount /dev/disk2s1

    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type “man sudo” for more information.

    To proceed, enter your password, or type Ctrl-C to abort.

    Password:
    umount(/Volumes/USB): Resource busy — try ‘diskutil unmount’
    Lauras-MBP:~ laura$ diskutil unmount /dev/disk2s1
    Volume USB on disk2s1 unmounted

  30. Stanley says:

    So… I messed up big time

  31. junebeetle says:

    Thanks, I haven’t seen a detailed tutorial like this.

    I think sometimes disk images can be compressed or have headers, which is why this doesn’t always work. I usually mount the disk image and then “diskutil list” to find the mounted disk image and the target disk, then I “sudo dd if=/dev/DISKIMAGE of=/dev/TARGET bs=1m” and it 90% works.

  32. Chubbs 215 says:

    I’m a PC guy and had the problem of downloading .iso files to my MAC and unable to xfer them to my USB drive for load in my PC. HERE’S YOUR QUICK FIX!!!

    Upload the .iso to dropbox, save it onto the drive from you MAC, xfer. Peace. No TERMINAL needed.

    • Justin says:

      This is not even the topic at hand. Glad your issue got solved but didn’t have anything to do with this subject.

  33. Pedro says:

    I use DCFLDD (DC Forensic Lab dd) , I like it because it shows you the progress percentage and dd does not which drives me nuts

  34. Larry Rosenman says:

    ctrl-t during the dd will give you how much it’s done (it sends SIGINFO)

  35. David says:

    This was so simple I wonder why installers exist

    • Chris Tattersall says:

      I tried this procedure as I can not upgrade my Snow Leopard to Yosemite using a DMG file downloaded from the appstore a while back (no longer available for re-download). Says it cannot be verified or my have been corrupted during download. I also have an ISO file but, after the burn to USB stick is completed (normally) using either the DMG or ISO files, I get “The disk you inserted was not readable by this computer.” Diskutil Verfy tells me that it has “Invalid B-treenode size” and Repair fails. I have tried this several times with different USB sticks and a DL CD RW and two different Macbooks (both with Snow Leopard)with same result. I eventually gave up (it’s very time consuming) and ordered a Bootable USV install Upgrade from eBay. I would like to know, however why the procedure failed in case I may need to try it again.
      Thanks

  36. Cicero says:

    First off thank you for the tips.

    I was not able to unmount with “sudo umount”

    instead I used “sudo diskutil unmount /dev/disk4s1” in my case.

    Also much thanks to the commenter for the “control+t” command for checking the progress!

    The transfer is complete now so I’m going to check if the usb will boot.

  37. Robby robby robby bobby. ROBERT says:

    There’s a unix command to pipe dd into a progress checker but I don’t remember what it is.

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates