Subject: Re: Creating CDs with mkisofs/cdrecord: need help
To: None <netbsd-help@NetBSD.org>
From: Dieter <netbsd@sopwith.solgatos.com>
List: netbsd-help
Date: 09/03/2005 18:53:19
>> Then check with
>>
>>    dd if=/dev/rcd0d of=/var/tmp/some_filename bs=2k count=48
>
> Hmmm... Interesting behaviour. rcd0d becomes readable with bs=2k, but
> still produce errors when I do not pass count argument. Otherwise works
> just like a charm.
>
> nostromo# dd if=/dev/rcd0d of=/var/tmp/some_filename bs=2k count=48
> 48+0 records in
> 48+0 records out
> 98304 bytes transferred in 0.085 secs (1156517 bytes/sec)
> nostromo# cmp test.iso /var/tmp/some_filename
> nostromo#

Looks good, you can read back the data you wrote, and it matches
exactly.

If you don't supply dd with a count argument, dd will just keep
reading until it gets an error or smacks into the end of the disk.

I just tried putting a new, unwritten disk in and dd gets errors
attempting to read it.  So it isn't surprising that dd gets
errors once it gets past the portion of the disk that you wrote.

Solution: supply dd with blocksize and count arguments so that
it knows how much data it should read.