Subject: CD Backup summary
To: Leaplist <leaplist@lists.leap-cf.org>
From: Brian Rose <lists@brianrose.net>
List: netbsd-users
Date: 07/24/2003 12:07:22
I am trying to back up a copy protected CD so when my kids inadvertantly destroy it, I will be able to still play my game.
I found that I could read in the CD, but the image is imperfect. This stems from the fact that the manufacurer introduced intentional defects into the image. By default, dd fails at the first bad block. Even when instructed to continue upon an error, dd does not pass along bad blocks. If a I/O error occurs for a given block, dd inserts a complete, and valid block of NULLs. This has the effect of changing the image (and the size, checksum, etc) and rendering the disk unuseable, because the validation software is looking for the errors.
Anyway, here's all the stuff I tried.
Step 1
------
# dd if=cd0a of=filename.iso bs=2k
dies about 1.5 megabytes into the disc at the first bad block.
Step 2
------
# dd if=cd0a of=filename.iso bs=2k conv=noerror,sync
# cdrecord dev=15,1,0 speed=2 filename.iso
This read the disk and reported all bad blocks. However, since dd replaced bad blocks with empty valid blocks, the software didn't work. The startup program started and then asked me to insert the original disk after trying to access the CD for some time. It was probably looking for bad blocks, which weren't there.
Step 3
------
# dd if=cd0a of=filename.iso bs=2k conv=noerror
# cdrecord dev=15,1,0 speed=2 filename.iso
This read the disk and reported all bad blocks. However, since dd discarded bad blocks, the software didn't work.
Step 4
------
I tried using Steven Bellovin's program, but I got the same results as step 1 (it read about 1.5Meg and died on an I/O error.
Step 5
------
I tried using cd0d, but when the program got towards the end, it started reading bad blocks and apparantly got into an inifnite loop. I terminated the program when the output file exceeded 800 megabytes.
Step 6
------
In dd the read() function is returning -1. I'm looking through the CD driver read routine to find out where the "bad block" code is located. But it is a little convoluted and it will probably take me some time to figure things out.
In the end, I am unable to back up my game CD. Fortunately, it only costs about $10 now on the discount shelf, so this isn't a huge issue. It was valuable as a learning process, however.