Mac OS X: Best Way to Make an ISO from a CD or DVD

224

96

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

Mark Harrison

Posted 2009-06-29T00:00:23.510

Reputation: 892

1I had to use sudo diskutil unmount /dev/disk2 not sudo umount /dev/disk2 – nikans – 2014-09-11T21:44:53.860

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 – 2014-10-18T18:12:00.333

Actually, when running dd if=/dev/disk2 of=mydisk.iso on Yosemite I got dd: /dev/disk2: No such file or directory. But dd if=/dev/disk1 of=mydisk.iso worked, it's creating the image now. Why is that? The DVD is a bootable Linux DVD. Also, the first command gave disk1 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead. Is this normal? – Revetahw says Reinstate Monica – 2016-10-16T07:28:40.987

Yeah dd is the fastest, it is the disk druid, after all! :) – msanford – 2010-11-30T21:46:09.420

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 – 2011-01-11T22:55:45.407

3@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. – Mark Harrison – 2011-01-12T21:15:36.167

Answers

204

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

msanford

Posted 2009-06-29T00:00:23.510

Reputation: 682

4For audio CD, hdiutil works. Disk Utility and dd don't work (.iso file can be created, but can't be mounted later). – Ngoc Dao – 2015-02-04T05:43:16.643

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 – nonopolarity – 2015-05-01T09:04:16.303

1dd 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 – 2016-04-05T01:05:07.060

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 – 2018-08-07T13:05:13.000

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 – 2020-01-29T11:04:44.943

78

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!

marcwan

Posted 2009-06-29T00:00:23.510

Reputation:

I couldn't run diskutil unmount on (OS X 10.11.3) as I got disk4 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead message. So the latter did the work. Funny that I'd made a typo in command umountDisk but it also worked. – Vlad T. – 2016-02-06T04:07:13.027

@boehj in theory, yes. But dd has some advantages. e.g. you can give it a 1 meg buffer, you can ask it to continue if it hits an error, and it tells you how many disk blocks it copied. In days of old, cat would be much slower. Today, that may not be true because they keep adding features / smarts to things. – pedz – 2018-08-07T13:26:45.120

4Why is conv=sync,notrunc necessary? – kizzx2 – 2011-05-03T13:50:58.043

1@kizzx2: I think notrunc is in there so that you'll also get any 0's at the end of the DVD too. – boehj – 2011-05-31T22:50:02.413

4BTW, does cat /dev/disk2 > ~/dvd.iso work here? – boehj – 2011-05-31T22:50:29.713

1This gives me a resource busy error, although no finder window is open to the DVD and no disk utility or any other app that I can find is using the DVD? – Ali – 2013-01-25T16:53:30.950

5for 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 – 2013-07-24T17:44:19.190

1To fix the "Resource busy" error, please use Disk Utility to "Unmount" the disk and everything below it. – Ketan – 2013-12-07T20:55:57.947

1Way to beat me to it ;) This is the most elegant, lowest-overhead solution. See my others below. – msanford – 2009-06-29T05:10:21.440

1Now 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 – 2009-06-29T05:17:57.413

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.

Jose Cardoso

Posted 2009-06-29T00:00:23.510

Reputation:

1I 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 – 2014-08-30T09:00:05.950

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 – 2018-12-28T00:18:51.303

16

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.

mark4o

Posted 2009-06-29T00:00:23.510

Reputation: 4 729

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?

CT.

Posted 2009-06-29T00:00:23.510

Reputation: 2 549

Assuming that the Disk Utility is just using dd, it's no different - the iso is a bit for bit copy of the disk. – Rich Bradshaw – 2009-08-30T15:49:43.403

Rich is right, the iso is an identical copy of the DVD. – alex – 2009-09-01T07:40:37.150

2Not if it is copy protected. See my answer for details. – mark4o – 2009-09-01T17:50:32.737

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.

John T

Posted 2009-06-29T00:00:23.510

Reputation: 149 037

4It's not /dev/dvd! Go to Disk Utility, find the disk you want and open the info dialog, it says the proper /dev/* there – Isaac Waller – 2009-08-30T16:59:31.453

1its an example, you would obviously replace it with your DVD drive which would be something like /dev/hdb1 or /dev/scd0. – John T – 2009-08-30T17:07:56.410

1Most likely /dev/disk1 or disk2 on Mac OS X. – mark4o – 2009-08-30T22:06:43.343

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. – John T – 2009-08-31T01:50:15.173

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.

Charles Stewart

Posted 2009-06-29T00:00:23.510

Reputation: 2 624

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

bmaupin

Posted 2009-06-29T00:00:23.510

Reputation: 228

Wow. I already had burn, but I didn't know it could do this! It works very well. +1 – Cullub – 2014-12-19T17:32:46.140

+1 for Burn. Easier than system tools – Rich Homolka – 2015-05-23T15:21:41.963

4

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.

nonopolarity

Posted 2009-06-29T00:00:23.510

Reputation: 7 932

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 – 2019-01-21T02:36:47.847