Subject: dd on CDROM
To: None <netbsd-users@netbsd.org>
From: Peter Fairbrother <peter.fairbrother@ntlworld.com>
List: netbsd-users
Date: 10/31/2001 10:36:56
Is there some way to read blocks on a cdrom, eg using dd if=/dev/cd0a etc,
without unmounting the CD?

I want to read numbered blocks, but as the CD has dd (and root, no HDD) on
it I can't easily unmount it. Using dd if=/cdrom only reads the first 2k,
and if I use dd if=/dev/cd0a when mounted I get "device busy".

(It's to verify the contents of the CD by reading random blocks, hashing
them, and comparing with the result from a known-good CD. I could put dd on
a mfs, but I'd prefer another solution as this is hard (only a single
unionfs works, anyone know why?) and needs more memory)

Thanks

-- Peter Fairbrother