7

Let's say I created a image like this:

    ddrescue /dev/disk1 MY_CDROM_IMAGE.img (/dev/disk1 is my CDROM drive)

How can I mount this on my Mac?


Note: The image created is not a IMG file - it is just a raw dump of the CDROM. I can now replicate the disk by using dd.

5
  • 1
    ... That is like saying, can I open a picture in paint that is in my own format that I will not tell you the specification of... Take another copy, save it as something standard such as .img or .iso and it should work easily and you should have no problems creating another copy from the image... (well almost... I know not that accurate, but hopefully you understand where I am coming from!) Commented Aug 22, 2009 at 20:39
  • I need to use ddrescue. It is not my own format, it is raw CDFS file system. Commented Aug 22, 2009 at 20:42
  • I have amended my answer based on the additional information. Commented Aug 22, 2009 at 20:54
  • Ugh, first off: CDs do not normally have partition tables. Second, a raw dump of the bytes on a CD-ROM is what most people call an ISO file.
    – derobert
    Commented Aug 23, 2009 at 9:25
  • @derobert - sorry, I am not that familiar with CD-ROM's. I'll fix my question. Commented Aug 23, 2009 at 22:55

6 Answers 6

6

When reading a CD, /dev/disk1 will access the entire 2352 bytes of each block. This is useful for reading an audio CD. It is sometimes called a raw image, or a CloneCD image.

On a MODE 1 CD-ROM, 2048 bytes of each 2352-byte block is used for data and most of the rest is used for error correction codes, because the integrity of the data is so important. With file system data, it is not possible to just ignore an erroneous sample like on an audio CD. Use /dev/disk1s0 to read the 2048-byte blocks, using the error correction codes to detect and correct any errors within each block. An ISO 9660 file system image is made up of these 2048-byte blocks, and you will be able to mount the resulting image directly.

Wikipedia has more information on the different formats.

If the CD-ROM contains a file system then there is not much point in capturing it in the raw format, since the error correction codes are redundant and will be recreated when you record the ISO image to another CD-ROM. However, if you already have the raw image and want to strip off the extra information, there is a program called ccd2iso which will do that.

1
  • And I thought about using /dev/disk1s0, but I am not really experienced so I thought I would use /dev/disk1 to be safe. Commented Aug 24, 2009 at 20:11
2

IMG and ISO's mount natively in OSX. Alternatively use the Disk Utility in Leopard.

OSX cannot read RAW or CSFS images and mount them. You will therefore need to use dd and create an ISO of the raw image which can then be mounted.

To create an ISO using DD:

dd if=[filename.img] of=file.iso bs=2048
8
  • It's not a IMG file - I just gave it that extension. Commented Aug 22, 2009 at 20:25
  • so what extention is it! that is quite important :S Commented Aug 22, 2009 at 20:27
  • 1
    I agree that would be extremely useful information, as disk mounting is natively support on the Mac and therefore creating an image in an unsupported format would be a reason it won't mount? Commented Aug 22, 2009 at 20:32
  • On your Mac OS X command line type: file <name of file here> and get back to us!
    – X-Istence
    Commented Aug 22, 2009 at 20:51
  • 1
    @Diago: Your dd line does the exact same thing as cp filename.img file.iso, except is maybe a little slower due to the weird block size.
    – derobert
    Commented Aug 23, 2009 at 9:23
1

Double-clicking didn't work?

It works for .iso files, maybe you should try to create an iso and mount it that way. I think you can create iso files with Disk Utility.app

1
  • I need to use ddrescue to recover some lost data. Commented Aug 22, 2009 at 20:25
1

Try this -

go to the directory of the image and type -

hdiutil mount MY_CDROM_IMAGE.img

The guide I read this from uses ISO, but I would assume it also works for IMG files

1
  • Tried this, doesn't work. Commented Aug 22, 2009 at 20:24
1

I know it is late. But I saw this question and got the answer from your comments. kinokijuf said its a raw image. Then derobert mentioned that a raw image is what is usually called an iso image. So then change the name or extension of the file to something like > image.iso

The command would be something like:

  mv image.img image.iso

The just double-click the iso file, and you got your image :).

Hope it helps someone.

-1

The answer I think should really be:

Mount 'raw' images

sudo  hdiutil attach MYCOPYIED.ISO -imagekey diskimage-class=CRawDiskImage

create real iso from that

sudo hdiutil makehybrid /Volumes/NAMEOFISOFS -iso -joliet -o namefornewdisk

You must log in to answer this question.

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