Re: testing files for read errors by copying to /dev/null
Charles Russell wrote:
>> The best way to check burned CDs is to calculate a hash on the medium and
>> compare it with the hash of the original .iso file.
>
> My understanding is that the .iso file lacks the error correcting code
> included when a CD is burned, so I would not expect hashes to match
> unless the operating system handles this transparently. Just out of
> curiosity (or not purely from curiosity; I could boot Puppy Linux from
> CD and still have access to the CD drive) what would be the approach if
> I did have direct access to the /dev ?
Well, this has always worked for me:
$ md5sum install-x86-minimal-2007.0-r1.iso
81f244b5978b682cf9f2a313410cdbdf install-x86-minimal-2007.0-r1.iso
Burn the .iso to the CD, and then:
$ md5sum /dev/cdrom
81f244b5978b682cf9f2a313410cdbdf /dev/cdrom
(of course, you can use the hash tool of your choice, like sha1sum or
others, Also, the CD device might not be /dev/cdrom in your system, but
instead /dev/hd<something>, or even something else).
In any case, if the burned CD has errors in it (not just physical read
errors - even single-bit errors), the hashes will be different.
--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.
|