[[GLLUG] reading a goofy CD-ROM]

Matt Graham danceswithcrows at usa.net
Mon Oct 27 15:21:40 EST 2003


Nathan Thern <nthern at yahoo.com> wrote:
> I have an important (to me) CD-ROM filled with pdf files and 
> executables that I burned a couple of
> weeks ago. The first few times I accessed it, the files were fine. Now, 
> however, the files in the root directory show up just fine in a 
> directory listing and the file sizes appear to be right, but most of 
> the files are corrupted. 

> In summary, it appears that the info for the root directory of the CD 
> somehow has an offset error causing it to point to the wrong spot for 
> the beginning of each file. (BTW, the several flavors of windows that I 
> tried had the same problem with the CD, and solaris was completely 
> unable to mount it)

Look at the output of dmesg and see if there are any I/O errors reported on
the device.  If so, the CD-R you burned may be disintegrating.

> 2) dump the entire CD as an image and pick out the bits for each file 
> by hand  Is there a way to do this with dd or cpio? 

dd if=/dev/cdrom of=/somewhere/cdrom.iso bs=32k

...will make an ISO image of the first session on a data CD.  You can use
cdrdao to read and/or burn CDs at the lowest level possible, but you don't
want to do that for this particular case.  If you used multisession, dd will
only get the first session.  If you used UDF, I don't know whether dd would
work.

> AND will the data for each file be contiguous?

Maybe.  I don't know the details of ISO9660 filesystems, but IIRC they try to
keep files together.

> 3) mount the CD with options to correct the offset error

Probably not.  If the data structures of the iso9660 filesystem are mangled,
then you'd need fsck.iso9660 , but there *is* no fsck for iso9660 AFAIK. 
freshmeat.net may have something; search it for "iso9660" and eyeball-grep for
interesting results?


-- 
Matt G / Dances With Crows
There is no Darkness in Eternity/But only Light too dim for us to see
"I backed up my brain to tape, but tar says the tape contains no data...."





More information about the linux-user mailing list