Re: Problems with readcd and Aopen CDROM drive

2002-11-04 Thread Joerg Schilling
>From: [EMAIL PROTECTED] (Tom Crane)

>Dear All,
>   I have the following problem with readcd: Using the command,

>$ readcd  -vv dev=0,0,0 -f /tmp/test2.raw
>scsidev: '0,0,0'
>scsibus: 0 target: 0 lun: 0
>Linux sg driver version: 3.1.24
>readcd: Warning: controller returns wrong size for CD capabilities page.
>readcd: Warning: controller returns wrong size for CD capabilities page.
>Capacity: 181489 Blocks = 416857 kBytes = 407 MBytes = 426 prMB
>Sectorsize: 2352 Bytes
>Copy from SCSI (0,0,0) disk to file '/tmp/test2.raw'
>end:181489
>addr:   181489 cnt: 411
>Time total: 593.027sec
>Read 416857.55 kB at 702.9 kB/sec.

>generates the file,
>-rw-r--r--   1 root users426862128 Oct 30 20:10 test2.raw

>However, the image is corrupt. The source CD (actually a CDR) is OK and
>repeated applications of readcd give the same written image. However, using dd
>to dump the source CD completes without error and gives,
>-rw-r--r--   1 root root 371689472 Oct 30 19:51 test.raw

Reading your report again gives the following results:

-   Your CD drive returns an invalid sector size of 2352 bytes.

-   As Linux does not support DMA residual counts in the kernel, readcd 
cannot detect the problem and is most likely writing a file that
is made of many chunks with the following layout:

| n * 2048 bytes of data|  ->  n * (2352 - 2048) bytes of nulls |

Jörg

 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
   [EMAIL PROTECTED]   (uni)  If you don't have iso-8859-1
   [EMAIL PROTECTED]   (work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Problems with readcd and Aopen CDROM drive

2002-11-02 Thread Markus Plail
* Lourens Veen writes:
>On Friday 01 Nov 2002 10:42 pm, Tom Crane wrote:
>>
>>I followed up Jorg's suggestion of firmware updates for the Aopen
>>but there appear to be none for that drive. Any suggestions for a
>>workaround to force readcd to read only the true data/2048
>>sector-size?

>Failing that, perhaps you could create a small program based on libedc
>(be sure to take the libedc code from cdrdao, as the code distributed
>with cdrtools is _not_ GPL and may only be used as a part of cdrecord)

If I understood Jörg correctly all of cdrecord is GPL now, including
libedc.

regards
Markus


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Problems with readcd and Aopen CDROM drive

2002-11-01 Thread Lourens Veen
On Friday 01 Nov 2002 10:42 pm, Tom Crane wrote:
>
> I followed up Jorg's suggestion of firmware updates for the Aopen
> but there appear to be none for that drive. Any suggestions for a
> workaround to force readcd to read only the true data/2048
> sector-size?

Failing that, perhaps you could create a small program based on 
libedc (be sure to take the libedc code from cdrdao, as the code 
distributed with cdrtools is _not_ GPL and may only be used as a 
part of cdrecord) to manually get the data out and check the 
checksums? 

Ofcourse, if you're not interested in checking the checksums it may 
be even easier, all you need is a simple program that you can pipe 
the readcd output into and it will select the proper bytes. Put the 
whole thing in a shell script and there's your workaround.

Lourens
-- 
GPG public key: http://home.student.utwente.nl/l.e.veen/lourens.key


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Problems with readcd and Aopen CDROM drive

2002-11-01 Thread Tom Crane
In article <[EMAIL PROTECTED]>, Andy Polyakov <[EMAIL PROTECTED]> 
writes:
>> > However, the image is corrupt.
> 
> wait a sec...
> 
>> $ readcd  -vv dev=0,0,0 -f /tmp/test2.raw
>> ...
>> Capacity: 181489 Blocks = 416857 kBytes = 407 MBytes = 426 prMB
>> Sectorsize: 2352 Bytes
>> ...
>> -rw-r--r--   1 root users426862128 Oct 30 20:10 test2.raw
> 
> 181489*2352=426862128
> 
>> However, using dd
>> to dump the source CD completes without error and gives,
>> -rw-r--r--   1 root root 371689472 Oct 30 19:51 test.raw
> 
> 181489*2048=371689472
> 
> So that test2.raw is not necessarily currupt. It's just that readcd
> dumped not only data, but sync bytes and checksums surrounding every
> data block...

Hi,
Thanks for the feedback. I applied the patch in you previous post but
this makes no difference. I have had a second look at readcd reading the Aopen
CDROM and Plextor CDRW and can confirm your findings re; sector-size and CRC
stuff as follows;

$ readcd  dev=0,0,0 -f /dev/null -c2scan# This is the AOpen CDROM
readcd: Warning: controller returns wrong size for CD capabilities page.
readcd: Warning: controller returns wrong size for CD capabilities page.
Capacity: 274517 Blocks = 630531 kBytes = 615 MBytes = 645 prMB
Sectorsize: 2352 Bytes
readcd: Warning: controller returns wrong size for CD capabilities page.
readcd: Warning: controller returns wrong size for CD error recovery parameter page.
readcd: Warning: controller returns wrong size for CD error recovery parameter page.
Copy from SCSI (0,0,0) disk to file '/dev/null'
end:274517
addr:0 cnt: 99
C2 in sector:   0 first at byte:6 (0x02) total:  104 errors
C2 in sector:   1 first at byte:0 (0xFF) total: 2301 errors
C2 in sector:   2 first at byte:6 (0x02) total:   97 errors
C2 in sector:   3 first at byte:0 (0xFF) total: 2303 errors
C2 in sector:   4 first at byte:6 (0x02) total:   94 errors
C2 in sector:   5 first at byte:0 (0xFF) total: 2302 errors
C2 in sector:   6 first at byte:6 (0x02) total:   93 errors
C2 in sector:   7 first at byte:0 (0xFF) total: 2304 errors
C2 in sector:   8 first at byte:6 (0x02) total:   93 errors
C2 in sector:   9 first at byte:0 (0xFF) total: 2300 errors
C2 in sector:  10 first at byte:6 (0x02) total:   80 errors
C2 in sector:  11 first at byte:0 (0xFF) total: 2292 errors
C2 in sector:  12 first at byte:6 (0x02) total:   85 errors
C2 in sector:  13 first at byte:0 (0xFF) total: 2285 errors
C2 in sector:  14 first at byte:6 (0x02) total:   77 errors
C2 in sector:  15 first at byte:0 (0xFF) total: 2282 errors
C2 in sector:  16 first at byte:6 (0x02) total:   77 errors
C2 in sector:  17 first at byte:0 (0xFF) total: 2283 errors
C2 in sector:  18 first at byte:6 (0x02) total:   79 errors
C2 in sector:  19 first at byte:0 (0xFF) total: 2275 errors
C2 in sector:  20 first at byte:6 (0x02) total:   73 errors
C2 in sector:  21 first at byte:0 (0xFF) total: 2274 errors
C2 in sector:  22 first at byte:6 (0x02) total:   76 errors
C2 in sector:  23 first at byte:0 (0xFF) total: 2267 errors
C2 in sector:  24 first at byte:6 (0x02) total:   17 errors
C2 in sector:  25 first at byte:0 (0xFF) total: 2274 errors
C2 in sector:  26 first at byte:2 (0x2E) total:  929 errors
C2 in sector:  27 first at byte:0 (0xFF) total: 2069 errors
C2 in sector:  28 first at byte:6 (0x02) total:   63 errors
C2 in sector:  29 first at byte:0 (0xFF) total: 2267 errors
C2 in sector:  30 first at byte:6 (0x02) total:   59 errors
C2 in sector:  31 first at byte:0 (0xFF) total: 2261 errors
C2 in sector:  32 first at byte:6 (0x02) total:   56 errors
C2 in sector:  33 first at byte:0 (0xFF) total: 2259 errors
C2 in sector:  34 first at byte:   19 (0x10) total:   57 errors
C2 in sector:  35 first at byte:0 (0xFF) total: 2254 errors

$ readcd  dev=0,1,0 -f /dev/null -c2scan# This is the Plextor CDRW
Capacity: 274517 Blocks = 549034 kBytes = 536 MBytes = 562 prMB
Sectorsize: 2048 Bytes
Copy from SCSI (0,1,0) disk to file '/dev/null'
end:274517
addr:0 cnt: 99
addr:   99 cnt: 99
addr:  198 cnt: 99
addr:  297 cnt: 99
addr:  396 cnt: 99
---

Here is the result of an cdrecord verbose inquiry of both drives. Does this
stuff shed any light on what Aopen drive does wrong?

$ cdrecord dev=0,0 -inq -vvVV
Cdrecord 1.11a15 (i586-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
TOC Type: 1 = CD-ROM
scsidev: '0,0'
scsibus: 0 target: 0 lun: 0
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.5'
Using libscg transport code version 'schily-scsi-linux-sg.c-1.69'
atapi: 1

Executing 'test unit ready' command on Bus 0 Target 0, Lun 0 timeout 40s
CDB:  00 00 00 00 00 00
cdrecord: Input/output error. test unit ready: scsi sendcmd: no error
CDB:  00 00 00 00 00 00
status: 0x2 (CHECK CONDITI

Re: Problems with readcd and Aopen CDROM drive

2002-10-31 Thread Andy Polyakov
> > However, the image is corrupt.

wait a sec...

> $ readcd  -vv dev=0,0,0 -f /tmp/test2.raw
> ...
> Capacity: 181489 Blocks = 416857 kBytes = 407 MBytes = 426 prMB
> Sectorsize: 2352 Bytes
> ...
> -rw-r--r--   1 root users426862128 Oct 30 20:10 test2.raw

181489*2352=426862128

> However, using dd
> to dump the source CD completes without error and gives,
> -rw-r--r--   1 root root 371689472 Oct 30 19:51 test.raw

181489*2048=371689472

So that test2.raw is not necessarily currupt. It's just that readcd
dumped not only data, but sync bytes and checksums surrounding every
data block...

A.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Problems with readcd and Aopen CDROM drive

2002-10-31 Thread Andy Polyakov
> $ readcd  -vv dev=0,0,0 -f /tmp/test2.raw
> 
> However, the image is corrupt.
> 
> Ps. System is Linux-2.4.19.

Can you check if you suffer from
http://fy.chalmers.se/~appro/linux/DVD+RW/sg-2.4.19.patch. I mean can
you apply the patch and check if the image comes out right? A.

P.S. Speaking of typos. What's "Identifikation" anyway?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Problems with readcd and Aopen CDROM drive

2002-10-31 Thread Joerg Schilling
>From: [EMAIL PROTECTED] (Tom Crane)

>Dear All,
>   I have the following problem with readcd: Using the command,

>$ readcd  -vv dev=0,0,0 -f /tmp/test2.raw
>scsidev: '0,0,0'
>scsibus: 0 target: 0 lun: 0
>Linux sg driver version: 3.1.24
>readcd: Warning: controller returns wrong size for CD capabilities page.
>readcd: Warning: controller returns wrong size for CD capabilities page.
>Capacity: 181489 Blocks = 416857 kBytes = 407 MBytes = 426 prMB
>Sectorsize: 2352 Bytes
>Copy from SCSI (0,0,0) disk to file '/tmp/test2.raw'
>end:181489
>addr:   181489 cnt: 411
>Time total: 593.027sec
>Read 416857.55 kB at 702.9 kB/sec.

>generates the file,
>-rw-r--r--   1 root users426862128 Oct 30 20:10 test2.raw

>However, the image is corrupt. The source CD (actually a CDR) is OK and
>repeated applications of readcd give the same written image. However, using dd
>to dump the source CD completes without error and gives,
>-rw-r--r--   1 root root 371689472 Oct 30 19:51 test.raw

>This image is good, mounting it together with the source CD and doing 'diff -r'
>on the two FSs gives no difference.

>The CDROM drive is an AOPEN 56 speed device, as follows,

>Abstract File id: 
>Bibliographic File id: 
>Volume set size is: 1
>Volume set seqence number is: 1
>   ^^^ Note to Jorg: You have a trivial typo here

Thank you.

>Ps. System is Linux-2.4.19.

>Ps2. Since doing the above tests. I have tried a couple more tests:-
>(1) Reading another CD (a 'proper' factory pressed one this time). Again readcd
>gives a significantly larger file containing a corrupt image.

>(2) Using the machine's other drive (a Plextor CDwriter) gives identical and
>non corrupt images via both dd and readcd. Is the answer probably bad AOpen
>firmware? :-(. If so, is there a workaround? I'd rather not have to change the
>frontend my users use (KOnCD), to use dd. In any case this is nasty, if it
>were to be tried on a multi session CD...

So you found the reason: corrupt firmware in the drive. Try ti get fixed fw from
the manufacturer.

Jörg

 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
   [EMAIL PROTECTED]   (uni)  If you don't have iso-8859-1
   [EMAIL PROTECTED]   (work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]