Jun 14

How to copy a mixed-mode CD ROM to disk

Category: Linux,multimedia   — Published by tengo on June 14, 2011 at 11:42 am

Sometimes, for example when you've got games from the 90s on CD-ROM lying around, you might want to back them up to preserve the data before the CDROM becomes unreadable - especially when the only copy you've got left is a backup itself 😉
Many games in during the nineties where so-called Mixed-Mode CD-ROMs, which means they've usually got data in track 1 (index) and track 2 (data), and normal audio on the subsequent tracks.

Normally, in order to make a 1:1 backup of a CDROM to disk, to really clone it, you would use some software, like GnomeBaker, to create an ISO of this CD. But on mixed-mode CDs you would end up losing the audio part of the CD as ISOs only are copies of track 1 on the disk. Same applies for creating a backup with Linux's dd utility. So in order to backup a mixed-mode CD you make what's called a cue/bin! (via)

ISO images only store a single data track. If you want to create an image of a mixed-mode disk (data track with multiple audio tracks) then you need to make a TOC/BIN pair:

$ cdrdao read-cd --read-raw --datafile IMAGE.bin --driver generic-mmc:0x20000 --device /dev/cdrom IMAGE.toc

Some software only likes CUE/BIN pair, you can make a CUE sheet with toc2cue (part of cdrdao):

$ toc2cue IMAGE.toc IMAGE.cue

On Ubuntu, you sometimes don't have the /dev/cdrom dir, use /dev/sr0 instead, for example. If you've get the device busy error, try sudo umount /dev/sr0.

Some software only likes a CUE/BIN pair. In this case you can derrive a CUE sheet with toc2cue (which is part of cdrdao):

$ toc2cue IMAGE.toc IMAGE.cue

Mounting a bin/cue pair

Mounting what you've extracted above back to use it just like a normal drive can be done by using CDemu (untested):

$ cdemu 0 pro.cue
$ mount -t iso9660 /dev/cdemu/0 /mnt/temp

or by converting it to an ISO:

$ apt-get install bchunk
$ bchunk IMAGE.bin IMAGE.cue image.iso

The latter produces an .iso file and some .cdr file, but I am not sure if doing something like below takes the audio part into account:

$ sudo mount -o loop -t iso9660 as_ISO/image.iso01.iso /mnt/image

Burning clones of these extracts back to CDROM

Should work like this (untested):

cdrdao write --driver generic-mmc-raw --device ATA:0,0,0 --datafile file.bin file.cue

or with wodim

wodim -vv -sao --eject --cuefile=image.cue