Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to image damaged CDs, some of which have bad sectors in important areas. I know there are tons of software out there that will create a disk image even if they run into bad sectors. My problem is that those bad sectors are just skipped (copied as zeros). Is there any way at all to instruct or force the drive to return what it managed to read in a damaged sector, regardless of whether the sector's CRC was OK - pretty much force it to behave as if it is reading an audio CD? I did not find any information on this, so I'll be very thankful if anyone has any information on this. I'm not afraid to write some assembly code or do some soldering either, so any tips are welcome.

Here are some things I've already tried:

  • Use different imaging/copying software, including ddrescue, imgburn, and winhex. CD is read as a data disk and bad sectors are not returned by the drive.
  • Read CD in raw access mode.

Some ideas (please post if you know that any of these will/will not work):

  • Issue some low-level ATA command to disable CRC / force drive into audio CD mode?
  • Custom firmware?
  • Insert audio CD then swap to the needed data CD without opening tray?

Any other ideas are welcome, no matter how crazy :)

share|improve this question
Short answer: I'm sure it is possible. I thought that happened when you took a bin/cue image or read in "raw" mode, but even if it doesn't, I'm still sure it's possible, but have no clue how. – Daniel H Jun 14 '13 at 1:20
I have tried using raw mode - in good sectors, I get back everything - the frame counters, the sector data itself, and the error correction related data. But in bad sectors - nothing, just an error. – Duke Nukem Jun 14 '13 at 1:28

I don't have the current spec, but an older ATA document mentions no capability of obtaining unreadable sectors.

Note that your experience of not able to unconditionally retrieve disk data refutes a widespread misconception that disk data is transferred directly from the read head to the drive interface and on to the host PC. If this misconception were actually true, then the PC memory buffer would have the "raw" data before any error detection and correction could be applied.

This misconception is often used to "prove" that the "slow" bit rate of the read head will slowdown the data bit rate on the SATA bus, and then erroneous conclude that fast SATA transfer rates have little benefit (unless the sector data comes from the drive cache).

However the sector data is always read from the head into a sector buffer.
Once the entire sector is read in, then the sector data is validated.
Only if the sector data is deemed "good" (or correctable) will transfer to the PC host commence.
Detection of an uncorrectable read error will trigger a retry if the command allows it.
Otherwise the host PC will receive a command abort status.

Note that an "unreadable sector" also includes the situation of the controller unable to "find" the sector (actually its ID record).

share|improve this answer
Thanks for the info! This at least proves that there's no standard ATA command that can disable hardware CRC. However, I have come across drives that read audio CDs without performing hardware CRC. What I want to try later is to initialize a drive with an audio CD, then swap it with the data CD I want to recover, without ejecting the tray. Might this work or would I be wasting my time? I'm afraid that swapping the media type like this will simply cause subsequent seeking to fail. – Duke Nukem Aug 18 '13 at 16:19
ATAPI (e.g. SATA packets) uses CRC. Disk sectors use ECC, Error Correction Code. HDDs used to use a 11-byte ECC based on Hamming code. CD-ROMs use a 276-byte ECC based on Reed-Solomom code. Look at line 294+ in CD-ROM sector information. I don't know if you can fool the read logic/processing of the drive/controller. The format or mode of the CD-ROM is encoded in the sector header. You would have to ensure that the drive always ignores that specifier after the sector is read in to avoid/skip error detection/processing. – sawdust Aug 20 '13 at 2:01
Just a quick update - a while ago, I actually got a CD drive to read a data CD as audio by doing the disk swap trick. I'll look into reversing the data encoding when I have more time. – Duke Nukem Jun 21 at 4:53

ddrescue is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying hard to rescue data in case of read errors.

AFAIK it is for Linux only

share|improve this answer
I tried using ddrescue some time ago, and pretty much had the same result. The CD was read normally as a data disk and any bad sectors were not returned at all by the drive. Thanks for the answer though :) – Duke Nukem Jun 14 '13 at 2:28

You must log in to answer this question.

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