Copying CDs
Paul Iadonisi
pri.lugofnh at iadonisi.to
Tue Apr 27 03:23:00 EDT 2004
On Mon, 2004-04-26 at 13:56, bscott at ntisys.com wrote:
[snip]
> One of the things I still haven't figured out but am rather curious about
> is that if I download a Red Hat CD image, use "cdrecord" to burn it, and
> then boot and run a "mediacheck", it will pass just fine. But if I do
>
> diff -q /dev/cdrom /path/to/cdimage.iso
>
> then I get a mismatch (/dev/cdrom ends prematurely). I don't get how it can
> pass Red Hat's media check but not diff properly.
I believe it's a bug in either how the Linux kernel reads or writes CD
images to CD-R[W]s. If you use the -pad option on CD record, the
problem goes away. Well, sort of. Now you might find that the
cdimage.iso file ends prematurely :-/. Anyhow, if you write the image
with cdrecord using the -pad and then do a readcd to grab the image from
the CD, ignoring the size and instead specifying it:
ls -l /path/to/cdimage.iso | awk '{print $5 / 2048}'
should give you the size you can feed to readcd. You should then be
able to compare the two iso files successfully.
It's odd to me that this bug has existed in the Linux kernel for as
long as I can remember and still hasn't been fixed in 2.6.
--
-Paul Iadonisi
Senior System Administrator
Red Hat Certified Engineer / Local Linux Lobbyist
Ever see a penguin fly? -- Try Linux.
GPL all the way: Sell services, don't lease secrets
More information about the gnhlug-discuss
mailing list