Subject: Re: reading directly from an ATAPI cd-rom device
To: None <netbsd-users@netbsd.org>
From: None <kpneal@pobox.com>
List: netbsd-users
Date: 10/20/2001 12:19:38
On Sat, Oct 20, 2001 at 10:48:04AM +0000, Jim Breton wrote:
> On Sat, Oct 20, 2001 at 11:54:40AM +0200, Wojciech Puchar wrote:
> > dd if=/dev/rcd0d bs=2k|md5sum -
> 
> Thanks, but did you see the rest of my message?
> 
> "On NetBSD however, the disc spins and it appears to be working, but it
> takes forever (about 33 minutes with a 48X drive); and when it finally
> stops, it gives me the following error:   
> 
> md5: /dev/cd0a: Invalid argument
> 
> I have tried cd0a, cd0d, rcd0a, and rcd0c [sic]; the only difference is
> that if I use the "raw" device, it returns the error almost immediately,
> as opposed to first reading for a long while."
> 
> Sending the output to md5 doesn't work if there is no output....

Did you verify that dd doesn't give any output?

There's an irritating bug where dd'ing a cd-rom works until the end of
the disk is reached. Then an error message is returned instead of
a normal EOF. The error message varies between different CD-ROM drives.
-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/

"It sounded pretty good, but it's hard to tell how it will work out
in practice." -- Dennis Ritchie, ~1977, "Summary of a DEC 32-bit machine"