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

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.

Attach the target USB drive to the Mac if you haven’t done so yet, then launch Terminal

Type the following command to print a list of attached volumes on the Mac:

diskutil list
This may look something like the following, it will be different on every Mac:

Locate the USB volume name of the target drive (in this example, “THE_DESTINATION”) and make note of the identifier (in this example, “disk3s2”)

Unmount the target volume using the following command, replacing the identifier as appropriate:

sudo umount /dev/(IDENTIFIER)

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

sudo umount /dev/disk3s2

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:

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.

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!

87 Comments

The instructions appear to be incorrect, at least on macOS Mojave 10.14. My USB key was /dev/disk4 with /dev/disk4s1 being the FAT partition. The .iso file needs to overwrite the raw disk, not the FAT partition, so the commands I used were:

OK once more for clarity.
I have found that as with most things in UNIX/BSD/Mac
Write a script to do the work – get everything right for nearly all situations – and then you should be able to repeat it without errors.

So using The “Disk Utility” seems to have stopped working ever since Sierra came out. That is on Apple or Microsoft Lawyers.
Using ‘diskutil’ is not always possible if you have an fairly old MacOSX version, because it did not exist until more recent MacOSX versions.

What should work all the time is ‘dd’ to a raw disk.
However a USB stick has to be inspected by the Mac as it tries to mount it for consumption by the Mac.
The issue here is the USB stick needs to be formatted at the level of a disk, ie. Some sort of format header – that tells the Mac things like
Media type, Capacity and the TYPE of data formatting.

Media type would be – its a USB SAN disk that looks like a normal SSD (it is writeable) or it looks like a NON-erasable disk (Some USB sticks have a slider that disables writing or at least tries to inform the OS that it should not be written to).

Capacity is subtle – the main issue is the way that the USB data area is addressed. Given that there are a few names that apply: GUID is the latest name and there are others, so you have to get this right.
Capacity is rated as XX MBytes. The type of Data formatting – is quiet the important bit.
Shoving a USB stick into a Mac and running any version of ‘Disk Utility’ provides info such as exFat, HFS+, etc.

In the following 3 could be any drive letter from 2 up to 9 for instance.

So addressing the drive /dev/disk3 with a terminal command like this
ls -al /dev/rdisk3*
you will maybe see /dev/rdisk3s1 and /dev/rdisk3s2
* means anything that looks like a device that could be your USB stick. You need to copy stuff to /dev/rdisk3.

So when you see a USB stick complain about things – do nothing.
Just ignore that problem – it is an artefact of the MacOSX and what types of disks it likes to mount. You do not want to mount stuff that is supposed to be plugged into another machine with another OS – installed or about to be installed. Ignore it. It will not get mounted but the Operating system still knows it is there and you can address/access it using the ‘dd’ command.

If the ISO image is indeed correct – it will have all the above information at the beginning of that file – it wants to make itself presentable to another machine and OS.

I believe that you need only use DD ‘dd’ to copy it.
It is possible to use HDUTIL to fiddle it but I do not think it is required.
You need to ‘dd’ it to the raw drive : eg. /dev/rdisk3

What are those s1 and s2 things – – – they are slices ‘s’ for short.
Sections of the disk. Each section has a purpose and you do not need to know much about them if all you want to do is clone an ISO file to a USB disk.

If you want to see all the raw disks on the system, type into terminal
ls -al /dev/rdisk*
Assuming you need to clone a file to rdisk3
PREFIX:
sudo
COMMAND:
dd if=/Users/Admin/myWin10.iso of=/dev/rdisk3 bs=1m

Now I could write a script called clone2USB which could contain
#! /bin/bash
# clone2USB
sudo dd if=/Users/Admin/myWin10.iso of=/dev/rdisk3 bs=1m

OF COURSE you need to create this script in a users directory commonly located /Users/USERNAME/bin/clone2USB
which can be created using the following terminal commands
mkdir -p /Users/USERNAME/bin
vi /Users/USERNAME/bin/clone2USB
or use TextEdit to create it and save it to that directory

AND OF COURSE you need to make the script runnable/executable
using
chmod u+x /Users/USERNAME/bin/clone2USB

AND FINALLY OF COURSE you need to try it out in the terminal session.
/Users/USERNAME/bin/clone2USB
or perhaps just a plain
clone3USB

You do need to be familiar with the TERMINAL because the BASH shell is kinda tricky. I have tried to cover most situations.

I have also used scripts to build a set of external mirrored drives
which have 2 x 4 TB drives from ‘LaCie’ with a large partition setup as a mirrored array where there is a TimeMachine backup and a separate backup co-existing with that and a pair of Recovery partitions which can have different versions of the MacOSX recovery data installed. So I can boot off the drives in Recovery mode.

I know there will be comments – this group seems to have a lot of problems for this section to be so huge. My background is based on years of experience with many OS’s mainly LINUX and MacOSX with a bunch of other OS’s thrown in. I have the Pro version of VMware and I like to get various versions of OS’s up and running so that I can help with Disaster Recovery. As a Senior Linux Systems Admin I sometimes have to recover data – I hate it when companies push their need to save cash down to the bone and the flesh they peal away is related to ensuring backups.

I like to think about the advances being made in storage etc. but when push comes to shove, they do need to at least try to recover files for staff and customers. I know one staffer who asked for 2 files to be recovered – every work day for 60 working days – and never got them back. He lost faith and his data is probably off on his own disk where he controls the backup and recovery from birth to death.

That user has no faith in the big backup solution and so he will protect his data and not share it. His data might have given someone a clue about a disease cure – but without sharing it never can happen.

Hi!
This is really nice but unfortunately it did not work for me, both from the standard iso and using hdiutil to convert to img. I have a distant past in sysadmin so I tend to exclude errors and I tried a few times.
Consistently the usb is not bootable on the Dell Inspiron 14 but the crazy part if that if I follow this howto and unetbootin I almost get it to work:http://fgimian.github.io/blog/2016/03/12/installing-windows-10-on-a-mac-without-bootcamp/
The usb is bootable and the installation starts but then I get an error 0x8007000D “cannot open D:\sources\install.wim” and it turns out the file is bigger than 4GB so FAT32 can’t address it all.
TL;DR:
either I cannot see the USB stick from the Dell laptop or I cannot get it to open D:\sources\install.wim because the usb is formatted as FAT32
I also tried to format with exFAT using diskutil but again the usb cannot be seen at boot
any idea? thanks!

I tried doing a bootable usb on Mac with the terminal commands and after it copied and ejected, the usb disappeared completely. It does not appear as bootable device, it does not appear in the disk utility app. Also I am beginner at working with terminal, but from what I can see, the stick as I know it (16gb) does not appear either.
[IMG]http://i63.tinypic.com/2guxgrc.png[/IMG]
Any clues?

you should try using /dev/disk3 (or /dev/rdisk3) instead of the full volume path on the DD command – this will likely result in the volume being formatted correctly and readable under osx after its complete.

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

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.

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.

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

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?

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?

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.

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??

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.

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.

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,

When dd is complete you will be returned to the command prompt, if the disk is still blinking (writing) it has not finished yet. Depends on the speed of the drive, and other things really, but it can take a while to burn an ISO to a a usb flash disk.

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.”

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

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.

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.

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.

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.

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.

That ctrl+t tip tho! I have been struggling with dd for years waiting for huge images to burn. There was another trick which involved two terminals and a screen command or something. I cannot recall. This is so simple though! Thanks for that!

unetbootin doesn’t always work, and so I would say that dd can be easier since you don’t have to create multiple bootable USBs before you get one that works. Yesterday I was trying to use a bootable Ubuntu disk to remove partitions on drives in one of the servers that I work on for work, and unetbootin created bootable USBs wouldn’t work in the servers. However, the dd created bootable USBs worked just fine.

I used unebootin and found not all files loaded, does not work all the time, and created endless frustration and many hours. It seems for no issues dd is the only way to be certain of success. Would not load gnome through unebootin

Yes – this. I have an old Hackintosh that is almost useless now (still on Snow Leopard in 2019 useless) and I’ve been trying to flash Ubuntu onto a usb…no 3rd party solution worked but this article and good ol command line did the trick.

This website and third-party tools use cookies for functional, analytical, and advertising purposes. By continuing to browse the site, closing this banner, scrolling this webpage, or clicking a link, you agree to these cookies. You can review our privacy policy for additional information.I AcceptPrivacy Policy