253

Both command-line and screen-oriented pointers appreciated!

update:

I verified the disk utility, hdiutil, and dd methods. dd seems the fastest, 30 minutes on my macbook pro vs. 40 minutes for hdiutil. I was able to simplify dd to use just if= and of=

For the DVD, I used /dev/disk2. I verified this with diskutil list and unmounted it first.

$ sudo umount /dev/disk2
$ dd if=/dev/disk2 of=mydisk.iso
6
  • Yeah dd is the fastest, it is the disk druid, after all! :)
    – msanford
    Nov 30, 2010 at 21:46
  • why did you unmount disk2? I thought you need to leave the DVD drive mounted, so you can read the data from it?
    – Pure.Krome
    Jan 11, 2011 at 22:55
  • 4
    @Pure.Krome, for this purpose, /dev/disk2 is a file of several GB length. The directory structure is embedded in those bytes. IIRC, I had to umount in order to read /dev/disk2. Jan 12, 2011 at 21:15
  • 1
    I had to use sudo diskutil unmount /dev/disk2 not sudo umount /dev/disk2
    – nikans
    Sep 11, 2014 at 21:44
  • 1
    In my case I had to do the following (OSX 10.9.5): sudo umount /dev/disk3s0 ; sudo dd if=/dev/disk3s0 of=mydisk.iso
    – Oisin
    Oct 18, 2014 at 18:12

10 Answers 10

233

There are generally four ways to create a disk image on an OS X box:

  1. Disk Utility - The on-screen prompts will guide you, but it will by default create a .dmg, which is an OS X-specific file format. Disk Utility will also create an ISO (.cdr extension) if you select the "CD/DVD Master" option before creating the image. You can rename the extension (to .iso) after creation if desired.

  2. Roxio Toast - The de facto third-party standard in creating optical media on Mac OS for over a decade, it will create almost any CD or DVD format you want.

  3. The hdiutil command-line utility, which will, in fact, create every format that Toast supports, for free, though it is far less pretty. If you want to create an ISO with this tool, use hdiutil makehybrid -iso -joliet -o Image.iso /input_path

  4. There is a fourth, extremely direct command-line way using dd that sysadmins might know: dd if=/dev/disk1 of=Image.iso

6
  • 10
    For audio CD, hdiutil works. Disk Utility and dd don't work (.iso file can be created, but can't be mounted later).
    – Ngoc Dao
    Feb 4, 2015 at 5:43
  • using dd, I get an ISO file that is slightly larger (about 500kb) than the ISO ripped by using Disk Utility... and I tried again on the PC, and got the same size that dd got... so I suppose dd does a better job at ripping it May 1, 2015 at 9:04
  • 2
    dd is a direct copy where the hdiutil probably uses the iso format to compress a little... I don't think anything is actually lost...
    – gabeio
    Apr 5, 2016 at 1:05
  • I am (was) interested in disk errors. dd with the conv=noerror,sync helps. I did not try the others to see if they report disk errors, if they quit on the first error, or what. The man page for hdiutil talks a bit about errors but the error of interest, EIO, is not mentioned.
    – pedz
    Aug 7, 2018 at 13:05
  • 1
    if you rename the .cdr in .iso you still get errors with vbox for instance. Best to convert the cdr with "hdiutil makehybrid -iso -joliet -o xxx.iso xxx.cdr"
    – Alberto M
    Jan 29, 2020 at 11:04
86

Open /Application/Utilities/Terminal.app/

sudo diskutil unmount /dev/disk1
dd if=/dev/disk1 of=~/myCD.iso bs=2048 conv=sync,notrunc

That should do it!

11
  • 1
    Way to beat me to it ;) This is the most elegant, lowest-overhead solution. See my others below.
    – msanford
    Jun 29, 2009 at 5:10
  • 1
    Now that I think about it, the solution I cited below with hdutil is somewhat simpler, as you can use the literal path without having to know the /dev assignment of the device, which is useful if you want to reuse this for only a folder, or an external hard drive, or multiple optical devices.
    – msanford
    Jun 29, 2009 at 5:17
  • 8
    Why is conv=sync,notrunc necessary?
    – kizzx2
    May 3, 2011 at 13:50
  • 4
    BTW, does cat /dev/disk2 > ~/dvd.iso work here?
    – boehj
    May 31, 2011 at 22:50
  • 5
    for this solution to work, you need to know the name of the device, which you can find out by typing "df" in a terminal, and looking for your CD/DVD in the list. Then choose the device name that shows on the far left. Then unmount the device using "sudo umount /dev/YOUR_DEVICE_NAME", then use the dd copy approach detailed above to do the copy.
    – Brad Parks
    Jul 24, 2013 at 17:44
24

Actually Disk Utility will create an ISO (.cdr extension). Just ensure you select the "CD/DVD Master" option before creation the image.

That file can then be used like any other ISO file only requiring a rename for certain dumb Windows apps that baulk at the .cdr extension.

Been using this method for ages with no problems.

2
  • 1
    I have created a .cdr, it has been automatically mounted to Mac OS. I copied there all files from bootable USB flash drive. Dismounted. Trying to mount to Virtual Box: Could not get the storage format of the medium '/Users/nakilon/_/mrddr_flash_diskutil_dvdmaster.iso' (VERR_NOT_SUPPORTED).
    – Nakilon
    Aug 30, 2014 at 9:00
  • I got the same error - wondering if it will work in windows (not virtual windows.) Also, it was windows 10 on the virtual box.
    – nycynik
    Dec 28, 2018 at 0:18
17

As mentioned in other answers you can use Disk Utility or dd to create an ISO image of the original disc. But if the disc is copy protected, it contains decryption keys in the lead-in area of the disc which cannot be read directly, and are not part of the ISO image. So if you burn a new disc with this image it will not play on a standard DVD player. Nevertheless, you can play it using a program like VLC which doesn't need the keys, since it is able to circumvent the encryption.

If you want a program that will copy the disc to the hard drive and also remove the copy protection so that you can burn it to a new unprotected disc, MacTheRipper will do that, but it looks like it hasn't been updated in a while. (Only a PowerPC version is listed.)

For storing on your hard drive you might find it more useful to transcode the content to unencrypted H.264 using Handbrake. This will save you a lot of disk space compared to storing the MPEG-2 content that is used on DVD-Video discs. However, it will not preserve the DVD menus, and if you want to burn a DVD that you can play on a standard DVD player then you would have to convert it back to MPEG-2.

11

After looking into dd command line tool...

I found you can also create a disk image using disk utility.

Just create a new image and select “DVD/CD Master”. - Apple adds the extension .cdr but you can rename the file to end in .iso and it will work as a standard ISO.

Anyone know how this effects any drm protection on disks?

3
  • Assuming that the Disk Utility is just using dd, it's no different - the iso is a bit for bit copy of the disk. Aug 30, 2009 at 15:49
  • Rich is right, the iso is an identical copy of the DVD.
    – alex
    Sep 1, 2009 at 7:40
  • 2
    Not if it is copy protected. See my answer for details.
    – mark4o
    Sep 1, 2009 at 17:50
10

You can use the dd command line tool. Make sure you unmount the drive first though.

dd if=/dev/dvd of=dvd.iso

This will make a bit-for-bit copy of the DVD.

Note: substitute /dev/dvd with the name of the device as it shows up in Disk Utility in OS X, for example if Disk Utility's BSD device node shows 'disk2' then use /dev/disk2.

4
  • 5
    It's not /dev/dvd! Go to Disk Utility, find the disk you want and open the info dialog, it says the proper /dev/* there Aug 30, 2009 at 16:59
  • 1
    its an example, you would obviously replace it with your DVD drive which would be something like /dev/hdb1 or /dev/scd0.
    – user1931
    Aug 30, 2009 at 17:07
  • 1
    Most likely /dev/disk1 or disk2 on Mac OS X.
    – mark4o
    Aug 30, 2009 at 22:06
  • mark4o is probably correct. I'm a UNIX guy if you couldn't tell, Mac just shares the majority of command-line tools with UNIX which helps me answer more Mac questions.
    – user1931
    Aug 31, 2009 at 1:50
8

I have found that dd produces the same ISO image as some tools on the PC, so I have been using dd, and below is a quick list of commands:

  1. diskutil list
  2. diskutil unmount /dev/disk1
  3. dd if=/dev/disk1 of=DiscImage01.iso
  4. diskutil eject /dev/disk1

The details:

  1. In Spotlight, type in Terminal and you will see the app for the UNIX console. (or go to Finder and use Applications -> Utilities -> Terminal).
  2. diskutil list is to see which drive the optical drive is. It might be /dev/disk1 or /dev/disk2, etc, depending on whether you have other drives, such as USB flash drive or SD card. The command will show the name, as well as the size of the disc, and it should be typically 4GB to 8.5GB.
  3. use diskutil unmount /dev/disk1 to unmount the drive, and this command doesn't require a sudo and therefore doesn't need the administrator's password.
  4. dd if=/dev/disk1 of=DiscImage01.iso is to create the ISO image in your current directory (which is your home directory if you just started the Terminal app without doing any cd command). It will take a while and you will see the optical drive's light blinking, if the drive has such a light.
  5. diskutil eject /dev/disk1 is to eject the disc for some optical drive that won't let you eject manually but requires OS X to eject the disc.

In addition, since dd can overwrite any existing file, so you might want to do chmod 444 *.iso so that all .iso files are only readable but not writeable, and if one month later you issue a dd command that might overwrite an existing file, it actually will come back with a "Permission denied" error so that you won't overwrite that existing file.

1
  • 1
    Very nice answer. I was trying to unmount an ISO that contains multiple partitions (it contains a Windows partition and a Mac partition). In that case diskutil informed me to use diskutil unmountDisk /dev/disk# instead. That might be a more universal suggestion for your line #2, above.
    – xmnboy
    Jan 21, 2019 at 2:36
6

Don't forget asr, the Apple Software Restore command-line utility: it can operate like a raw copy program like dd, but it has more bells and whistles. Not least, it will work directly with volume pathnames, as dd won't.

4

I'm normally a command-line person myself, and the built-in Disk Utility works pretty well also, but I recently stumbled across another good and free alternative called Burn. Among its many features is the ability to make disc images:

  1. Download Burn, then extract and open it
  2. Put your disc in
  3. Open the Copy tab
  4. Click Scan...
  5. Select the disc and click Choose
  6. Click Save..., choose a name and location, and click Save
2
  • Wow. I already had burn, but I didn't know it could do this! It works very well. +1
    – Cullub
    Dec 19, 2014 at 17:32
  • +1 for Burn. Easier than system tools May 23, 2015 at 15:21
2

dd gives a non-mountable image

On Catalina, when trying to copy an old RedHat 6.2 install CD I found that using

diskutil unmountDisk /dev/disk2
dd if=/dev/disk2 of=~/RHDisk.iso bs=2048

produced an ISO that was not, thereafter, mountable1. When double clicking the resultant ISO file, the DiskImageMounter utility gave the following error message:

No mountable file systems

Solution

Instead, I found that I had to specify the slice number, in addition to the disk number, i.e. disk2s0:

sudo umount /dev/disk2s0
sudo dd if=/dev/disk2s0 of=~/RHDisk.iso bs=2048

which then produced an ISO file that I could then just double click to mount.

Note the use of sudo dd, without which I got a permissions error. In the former attempt at using dd I had not required the need for sudo.

After following all of the answers above, only this method worked, which I found on Create an exact duplicate of a CD from the command line.


hdiutil segmentation fault

FWIW, when trying to use

hdiutil hybriddisk -iso -joliet -o ~/disk.iso /Volumes/RedHat_6_2

I found that it produced a segmentation fault

$ hdiutil makehybrid -iso -joliet -o ~/disk.iso /Volumes/RedHat_6_2
Creating hybrid image...
zsh: Segmentation fault hdiutil makehybrid -iso -joliet -o ~/disk.iso /Volumes/RedHat_6_2
$

Footnote

1 Even after trying the answers from I'm unable to mount a DMG, getting a "no mountable filesystems" error

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .