On Sun, 11 Jul 1999, Douglas Gilbert wrote:

> If you wish to take a closer look at what is happening  then perhaps you
> could download the utilities tarball at: http://www.torque.net/sg
>
> You will need to have the sg device driver available (either built into
> the kernel or as a module). Then try: sg_readcap /dev/sr0  [or /dev/sr1]
> 
> to see what your block size is and the address of the last block. For
> example, if your block size is 2048 and the last block address is
> 332529 then try: sg_dd2048 if=/dev/sgc of=/dev/null skip=332529 count=1
> 
> This utility is just like "dd" but will report any SCSI error directly
> to you (and bypasses the cdrom code). This example assumes the sg device
> /dev/sgc is the same as the cdrom driver you wish to test. Sg devices
> are allocated in the same number and order seen in 'cat /proc/scsi/scsi'.
> 
> Such a test works ok for CDRs burnt on my Yamaha 4416S by cdrecord.
> However a friend who uses similar hardware and NT to burn CDRs always
> seems to get an error on the last block just as you seem to. However
> those CDRs give a "L-EC UNCORRECTABLE ERROR" error which is different
> from your report.
> 
> Also the position of the error you have reported is awfully close to
> the 650 MB limit for a CDR.

Hello !

Thanks for the answers.

I tried the sg utilities and attached some of your suggested outputs.
As your can see, it works perfectly on my CD-Writer. The Problem is, 
that the read with dd from the normal CD device (drivers) does not work.
Here it fails to read a whole 7 sectors, not only 2 (which seems to be
normal and would be taken care of the CD device driver!
This means a serious data loss.

The read with sg_dd2048 works perfectly.

When I try to access the last file on the CD normal with mounting the
CD all works perfectly. This seems really strange to me, because I
thought, that the file-system reads via the normal CD device drivers
which dd uses too.

Any further ideas ?!

Best regards
 Sven

-- 
>>> "I am the embodiment of modern medicine." <<<<<<< Der Dativ ist dem <<<<<<<
>>>>>> The holographic doctor, USS-Voyager <<<<<<<<<< Genitiv sein Tod. <<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
>> http://www.fmi.uni-passau.de/~anderss >< email: [EMAIL PROTECTED] <<

=========================================================================

On my DVD-ROM:
--------------

> dd if=/dev/scd0 of=test.iso count=308112 bs=2048

dd: /dev/scd0: Input/output error
308105+0 records in
308105+0 records out

> ll test.iso
-rw-rw-r--   1 anderss  users    630999040 Jul 13 00:04 test.iso

> mount -t iso9660 -o loop test.iso /mnt
> cat /mnt/mr_president-night-club/night-club.txt 
cat: /mnt/mr_president-night-club/night-club.txt: Input/output error

in /var/log/messages:
---------------------
Jul 13 00:44:11 skeeve vmunix: attempt to access beyond end of device
Jul 13 00:44:11 skeeve vmunix: 07:00: rw=0, want=616222, limit=616210
Jul 13 00:44:11 skeeve vmunix: dev 07:00 blksize=2048 blocknr=308110 sector=1232440 
size=2048 count=1

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

> sg_readcap /dev/sr0 
  >>> Mapping /dev/sr0 to sg device: /dev/sg1
Read Capacity results:
   Last block address = 308113 (0x4b391), Number of blocks = 308114
   Block size = 2048 bytes

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

> sg_dd2048 if=/dev/sg1 of=xxx skip=308113 count=1
reading: Check Condition 
Info fld=0x4b391, Current sense key: Medium Error
Additional sense indicates: Circ unrecovered error
Raw sense data: 0xf0 0x00 0x03 0x00 0x04 0xb3 0x91 0x0a 0x00 0x00 
  0x00 0x00 0x11 0x06 0x00 0x00 
plus...: Driver_status=0x28 (DRIVER_SENSE,SUGGEST_ABORT) 
sg_read failed, skip=308113
Some error occurred, count=1

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

> sg_dd2048 if=/dev/sg1 of=xxx skip=308112 count=1
reading: Check Condition 
[valid=0] Info fld=0x0, Current sense key: Illegal Request
Additional sense indicates: Illegal mode for this track
Raw sense data: 0x70 0x00 0x05 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 
  0x00 0x00 0x64 0x00 0x00 0x00 
plus...: Driver_status=0x28 (DRIVER_SENSE,SUGGEST_ABORT) 
sg_read failed, skip=308112
Some error occurred, count=1

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

> sg_dd2048 if=/dev/sg1 of=xxx skip=308111 count=1
1+0 records in
1+0 records out

=========================================================================

Second try with the sg utilities:
---------------------------------

> /public/sbin/sg_dd2048 if=/dev/sg1 of=test.img count=308112
308112+0 records in
308112+0 records out

> ll test.iso
-rw-rw-r--   1 anderss  users    631013376 Jul 13 00:39 test.iso

> mount -t iso9660 -o loop test.iso /mnt
> cat /mnt/mr_president-night-club/TRANS.TBL
F NIGHT-CL.000;1                        night-club.13.mp2
[here comes the full file]...

in /var/log/messages:
---------------------
[None]

=========================================================================

Normal mount on the DVD-ROM:
----------------------------

> mount -t iso9660 /dev/scd0 /mnt
mount: block device /dev/scd0 is write-protected, mounting read-only

> cat /mnt/mr_president-night-club/TRANS.TBL
F NIGHT-CL.000;1                        night-club.13.mp2
[here comes the full file]...

in /var/log/messages:
---------------------
Jul 13 01:05:36 skeeve vmunix: ISO 9660 Extensions: RRIP_1991A

=========================================================================

On my CD-ROM:
-------------

> dd if=/dev/scd1 of=test.iso count=308112 bs=2048
308112+0 records in
308112+0 records out

> ll test.iso
-rw-rw-r--   1 anderss  users    631013376 Jul 13 00:39 test.iso

> mount -t iso9660 -o loop test.iso /mnt
> cat /mnt/mr_president-night-club/TRANS.TBL
F NIGHT-CL.000;1                        night-club.13.mp2
[here comes the full file]...

in /var/log/messages:
---------------------
[None]

Reply via email to