ello,
this is my first post to lkml, please excuse if my post is against the
guidelines of the mailing list in any way. Please also CC: any answers to
my e-mail address as I am not subscribed to the list.
I own a 40x ASUS CD-ROM drive CD-S400 (this is an IDE drive but it runs
under ide-scsi). Recently I noticed that more and more CD-Rs and CD-RWs
can't be read by the drive under linux. However, under windows (95) on the
same machine, most of those CDs can be read.
A more complete description of my system can be found at the end of this
post.
The drive's behavior under linux is somewhat strange. I made a test with
several different brands of CD-Rs and CD-RWs (further in this document I
will refer to them as CDs; I have not experienced any problems with
regular (not recordable) CD-ROMs yet), recorded with two different
recorders and here's what I noticed:
1. some of the CDs simply wouldn't mount; that's bad, but at least one
knows there's some kind of trouble
2. worse, some CD's would mount, but then the content of the files would
be corrupted. There were no I/O errors when reading the files, but the
file's content was not what it should have been. Archives would not unpack
etc. I had some BMP images on one of the disks and there I could easily
see random-colored horizontal lines in the image - some bytes were just
not read correctly, but instead of giving an error, the I/O subsystem just
read some garbage from the disks and returned that as the contents of the
file.
Note that while some of the lines were random-colored, some of them were
just black - this suggests there are two kinds of situations - in both of
them a buffer is returned although actually an I/O error should occur, but
in one case the buffer contains random data and in the other case it is
zeroed.
3. the strangest of all - I can perform the following experiment:
- take any of the CDs which behave like what is described in point 2.
- mount it
- md5sum any file larger than a few kB
- umount the disk
- mount it again
- md5sum the same file
- the md5sums differ ! The random bytes which are inserted are
different each time I mount the disk and they appear in different areas of
the file. I could see this with the BMP images: the funky random colored
lines appeared in different parts of the image each time the cd was
mounted. By mounting the CD several times and copying the parts of the
image which were not corrupted after that particular mount, and then
stitching them together with the GIMP, I would probably be able to
retrieve the whole image from the disk. By looking at the lines I could
find out how large areas of the disk could not be read - the length of the
lines varied greatly: from about a hundred pixels (meaning about 300 bytes
of data) to probably several thousand. Sometimes the lines seemed to be
located in a completely random fashin, but there were also groups of lines
which looked like this:
----------
----------
----------
This suggests, that there is a problematic area somewhere on the disk, so
that with each rotation of the disk, a "line of data bytes" going through
this area is read erronueously (the length of the lines in this patter was
uniform, and so was the vertical distance between the lines as well as the
horizontal shift between them).
4. Now, hadn't I accidentally tried to read one of the "broken" CDs under
windows, I would have thaught that e