Mount raw CD-ROM image
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
.
Solution 1:
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.
Solution 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