How to recover files from a CD-ROM or DVD that seems unreadable.

How to recover files from a CD-ROM or DVD that seems unreadable

Miguel Menéndez

The disk (carefully cleaned) is not mounted automatically, nor is it possible to mount it by hand. The disk spins in aeternum in the drive and the kernel spits out ugly things…

Things like:

sr 3:0:0:0: [sr0] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=3s
sr 3:0:0:0: [sr0] tag#0 Sense Key : Medium Error [current]
sr 3:0:0:0: [sr0] tag#0 Add. Sense: Unrecovered read error
sr 3:0:0:0: [sr0] tag#0 CDB: Read(10) 28 00 00 04 25 e2 00 00 01 00
blk_update_request: critical medium error, dev sr0, sector 1087368 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Buffer I/O error on dev sr0, logical block 271842, async page read

I thought it was lost until GNU came to the rescue…

gddrescue

GNU ddrescue is a data recovery tool. Copies data from one file or block device (hard disk, CD-ROM, DVD…) to another, trying to rescue the good parts first in case of read errors.

I ran the command:

$ ddrescue -d -b2048 /dev/sr0 cdimage mapfile

And after just under 20 minutes it had recovered 99.95% of the contents of the CD-ROM.

GNU ddrescue 1.23

Press Ctrl-C to interrupt

ipos:  566210 kB, non-trimmed:        0 B,  current rate:       0 B/s
ipos:  566210 kB, non-trimmed:        0 B,  current rate:       0 B/s
opos:  566210 kB, non-scraped:   221696 B,  average rate:    353 kB/s
non-tried:        0 B,  bad-sector:    58880 B,    error rate:       0 B/s
rescued:  568123 kB,   bad areas:       10,        run time:     26m 46s
pct rescued:   99.95%, read errors:      126,  remaining time:         n/a
time since last successful read:      8m 38s
Scraping failed blocks... (forwards)
Interrupted by user

A second run of the same command for 10 minutes failed to improve that more than decent result of 99.95% recovered.

The resulting image can be opened and extracted with Ark.

Reference: https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html

Header image: freeimages.com/pseudoxx

Comments

Found a bug? Do you think something could be improved? Feel free to let me know and I will be happy to take a look.