Re: IDE CDROM and dd...

From: Douglas Gilbert (dougg@torque.net)
Date: Thu Jun 08 2000 - 23:16:42 EST


With regard to the discussion about reading data from
CDROMs, in the case of CD-Rs, the last few sectors may be
unreadable.

Quoting from Joerg Schilling's cdrecord_1.8/README.copy :
"NOTE: All CD-R's written in Track At Once mode end in two unreadable
        run-out sectors. If the disk has been written with a Yamaha CD-R100
        or with a Yamaha CD-R102, there are even more run-out sectors."

Here is an example on a CD-R burnt with cdrecord:
------------------------------------------------------------
$ sg_readcap /dev/sr0
>>> Mapping /dev/sr0 to sg device: /dev/sg1
Read Capacity results:
   Last block address = 168475 (0x2921b), Number of blocks = 168476
   Block size = 2048 bytes

$ isosize /dev/sr0
345034752

# Now 345034752 / 2048 == 168474 sectors
# That is 2 sectors shorter than READ CAPACITY indicated.

$ sg_dd if=/dev/sg1 of=/dev/null bs=2048 count=168476
reading: Check Condition
Info fld=0x2921b, Current sense key: Medium Error
Additional sense indicates: Circ unrecovered error
Raw sense data (in hex):
  f0 00 03 00 02 92 1b 0a 00 00 00 00 11 06 00 00 00 00
plus...: Driver_status=0x28 (DRIVER_SENSE,SUGGEST_ABORT)

-------------------------------------------------------

The "Info fld" is significant as it is the sector the
medium error occurred on: 0x2921b == 168475 . It failed
on the last sector so only one sector seems to be unreadable
in this case. I have observed cases where 2 or more sectors
were unreadable.

The isosize utility calculates the length in bytes from
the TOC. Unfortunately this utility is not supplied
separately with recent versions of cdrecord. I got this
one from a 5 year old copy of cdwrite.

Doug Gilbert

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:17 EST