2

I have an audio CD (burnt a few years ago) that I want to rip (with K3B or other) to flac. K3B was unable to complete and I realized the CD was damaged.

I managed to recover the data with safecopy and the --stage-1-3 arguments. From the output (see below) it seems that the data was properly recovered.

However, I expected to be able to mount the file and take it from there. Unfortunately it doesn't seem to be the case:

$ sudo mount -o loop -t iso9660 diskimage /media/cdrom1/
mount: block device /mnt/data/Bureau/diskimage is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

dmesg doesn't show much useful output:

$ dmesg | tail
ISOFS: Unable to identify CD-ROM format.

Indeed it seems to be in an unrecognized format:

$ file diskimage 
diskimage: data

Unsurprisingly, renaming the file to .iso, .raw, .img or .bin made no difference.

Some people on the Internet recommend using ccd2iso but it fails as well (Unrecognized sector mode (0) at sector 0!).

How can I proceed to extract the audio from this raw data dump?

Here is the output from safecopy. The stage3.badblocks is empty.

$ safecopy /dev/sr0 diskimage --stage1
Low level device calls enabled mode: 2
Reported hw blocksize: 4096
CDROM audio - low level access: drive reset, raw read
CDROM low level disk size: 784954128
CDROM low level block size: 2352
Reported low level blocksize: 2352
File size: 784954128
Blocksize: 2352
Fault skip blocksize: 78493296
Resolution: 78493296
Min read attempts: 1
Head moves on read error: 0
Badblocks output: stage1.badblocks
Marker string: BaDbLoCk
Starting block: 0
Source: /dev/sr0
Destination: diskimage
......................................... [40961]    
......................................... [82945]    
......................................... [124929]    
......................................... [166913]    
......................................... [208897]    
......................................... [250881]    
................................[284577](+669325104){X [317950]    
}[317950](+78493296)
................[333739](+37135728){X}[367112](+78493296)

Done!
Recovered bad blocks: 0
Unrecoverable bad blocks (bytes): 2 (156986592)
Blocks (bytes) copied: 333739 (784954128)

xavier@marvin:~/Bureau$ safecopy /dev/sr0 diskimage --stage2
Low level device calls enabled mode: 2
Reported hw blocksize: 4096
CDROM audio - low level access: drive reset, raw read
CDROM low level disk size: 784954128
CDROM low level block size: 2352
Reported low level blocksize: 2352
File size: 784954128
Blocksize: 2352
Fault skip blocksize: 301056
Resolution: 2352
Min read attempts: 1
Head moves on read error: 0
Incremental mode file: stage1.badblocks
Incremental mode blocksize: 2352
Badblocks output: stage2.badblocks
Starting block: 0
Source: /dev/sr0
Destination: diskimage
Current destination size: 863447424
........................[309047](+726878544){X [309175]    
<<<<<<<}[309048](+2352)
.....[313338](+10090080){X<<<<<<<}[313339](+2352)
.....  8-( 95%
Done!
Recovered bad blocks: 0
Unrecoverable bad blocks (bytes): 2 (4704)
Blocks (bytes) copied: 317950 (747818400)

$ safecopy /dev/sr0 diskimage --stage3
Low level device calls enabled mode: 2
Reported hw blocksize: 4096
CDROM audio - low level access: drive reset, raw read
CDROM low level disk size: 784954128
CDROM low level block size: 2352
Reported low level blocksize: 2352
File size: 784954128
Blocksize: 2352
Fault skip blocksize: 2352
Resolution: 2352
Min read attempts: 4
Head moves on read error: 1
Incremental mode file: stage2.badblocks
Incremental mode blocksize: 2352
Badblocks output: stage3.badblocks
Starting block: 0
Source: /dev/sr0
Destination: diskimage
Current destination size: 863447424
.  8-( 93%
Done!
Recovered bad blocks: 0
Unrecoverable bad blocks (bytes): 0 (0)
Blocks (bytes) copied: 313339 (736973328)
  • Unfortunately, there isn't a file system on standard audio CD so you can't mount that image file. See en.wikipedia.org/wiki/Compact_Disc_Digital_Audio . I guess you can associate it to a /dev/loop entry using losetup, but I've never tried doing that with CDDA data myself. But why not just burn the image to a new disk? – PM 2Ring Jan 3 '15 at 8:39
  • @PM2Ring because it doesn't work. For instance K3B tells me "Seems not to be a usable image"... I'll try to losetup thing. – Calimo Jan 3 '15 at 10:13
  • I don't like your chances if KB3 says the image is faulty, but it might be worthwhile seeing if cdparanoia can do something with it. – PM 2Ring Jan 3 '15 at 10:29
  • To find the first unused loop device do (as root) losetup -f. If it returns /dev/loop1 then do losetup /dev/loop1 diskimage, assuming diskimage is the name of your image file. Then to tell cdparanoia to use that device instead of /dev/cdrom you do cdparanoia -d /dev/loop1. Of course you will also need to supply other parameters to cdparanoia. And I have no idea if this will actually work. :) – PM 2Ring Jan 3 '15 at 10:33
2

I had a similar problem I wished to recover a CD that started jumping in my CD player. I searched on line to find an answer but to no avail. But experimenting I found you can import the recovered file into Audacity as raw data. Then you can separate the tracks and re-encode as you wish.

  • Thanks, I used safecopy to get the image and used audacity to get the tracks – vimdude Jul 12 '17 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.