Re: How to check *CDROM* correctness?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05 Apr 2003 07:38:57 -0500, David Krider wrote:

> On Sat, 2003-04-05 at 02:47, jdow wrote:
> > Use MD5SUM on the /dev/cdrom device.
> > {^_^}
> > 
> > > I am looking for a *generic* way to verify
> > > on *linux* if a generic CD I got, already burned, matches the ISO
> > > checksum which I found online.
> 
> Just using md5sum on /dev/cdrom WILL NOT WORK. The actual burned CD
> image is different from the iso file, but I don't know why. Even using
> md5sum on the SAME CD between 2 different drives will give you different
> answers. I know these things because I just tried this yesterday because
> I wanted to do the same thing Marco wants to do. I *know* I saw the
> proper way to do this online somewhere, but I can't find that
> information now. It was something about doing a dd out to a loopback and
> using md5sum on that???
> 
> Unless someone can post the definitive way to do this, the best thing
> you can do, unfortunately, is indeed, like others have said, boot the
> image and perform the tests.

What is written above is misinformation. At least partly. An ISO
image is what is found on the CD. ISO 9660 is the file format used
on the CD itself. You can burn an ISO image to CD, then read out the
CD to create the ISO image. Burning an ISO image is merely a digital
one-to-one data copy operation. The data are not rearranged or
altered.

If you don't refer to rare times when "cat /dev/cdrom > image.iso"
ends too early, you probably refer to run-out sectors at the end of
a disc. This can happen if the disc was burnt in TAO (track-at-once)
mode. Many CD-writers still default to TAO mode or don't support DAO
(disk-at-once) mode. Discs burnt in TAO mode give I/O errors at the
end which in turn results in a different MD5 fingerprint. One way to
avoid getting run-out sectors is to add "padding" when burning the
CD in TAO mode or to limit the number of read sectors when creating
an ISO image from the CD. This is done best with either "dd" or
"readcd" (from the cdrecord package). readcd has the advantage that
it determines the size of the ISO image automatically, provided that
the CD was burnt correctly.

My recommended way to burn a CD would be in DAO mode which doesn't
need any padding:

  cdrecord -v -dao image.iso

(This example assumes /etc/cdrecord.conf has been set up with
defaults.) A disc burnt like that would not suffer from run-out
sectors at the end. You could always create an ISO image from the CD
again and the MD5 fingerprint would be the same as prior to burning
it.

We've discussed this earlier and several times on some lists
@redhat.com. Some subscribers have done additional tests with TAO
mode CD-writers and found out that cdrecord's option "-pad" adds a
different amount of padding for different types of CD-writers. In
all cases, -pad made it possible to avoid the run-out sectors at the
end of a CD burnt in TAO mode. It became possible to read the ISO
image with "readcd" or "dd" by speciyfing the correct number of
sectors.

- -- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+jt5X0iMVcrivHFQRArp9AJ9tGMGZjlzA3gBtWFZAyKNpvkMNWACgg+U6
2aLLNA5k2PQdO/h/h6UfwkI=
=Ojy3
-----END PGP SIGNATURE-----





[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux