On Sun, 17 Dec 2006, Grant wrote:
Does anyone know if there are any special options I should use with
mkisofs to create a perfect copy of an XP CD including making it
bootable?
If you're making copy of a CD-- if you're trying to *clone* it-- then you
shouldn't use mkisofs. (Recommendations for cloning are found below.)
In order for you to be able to use mkisofs this way, you'd have to mount
the CD somewhere, recursively copy its contents somewhere else, use
mkisofs to reconstitute those contents into a new iso9660 image, and then
burn that image.
Somewhere between the copy and mkisofs steps you'd lose whatever "magic"
it was that made that CD unique. If the original CD contained an El
Torito bootable image, then it would be gone (since the El Torito image
isn't accessible from the mounted iso9660 filesystem). If the iso9660
image contained bad sectors on purpose, then the sectors would be
recreated correctly during the mkisofs.
If you're just trying to clone an existing CD without changing any of its
contents, it's simpler and more reliable to do it the old fashioned way:
$ dd if=/dev/cdrom of=cd-image.iso
$ cdrecord dev=(whatever) -v cd-image.iso
If you really want to take a CD, change its contents, and then burn it so
that it's still bootable, you'd need to find a way to extract the El
Torito image from the original CD and restore it to the copy.
I rarely need to do this, so I can't offer much useful advice. If there
exist utilities in portage which are capable of extracting an El Torito
image from a CD, then I don't know about them. (Anyone?)
The following turns up on sourceforge; if it works for you, then you might
consider making an ebuild and filing a bug to have it added to the tree:
http://eltoritoextract.sourceforge.net/
Anyway, once you extract your El Torito image from the CD, you wind up
with (IIRC) a 1.44 or 2.88 MB file whose contents are a dump of a regular
bootable floppy disk.
When you make your new iso9660 filesystem, you can shove this El Torito
image back into the new CD by passing "-b eltorito_boot_image" to mkisofs.
(See mkisofs(1).) From there, you burn as usual.
Paul Thurrott discusses this practice from a Windows perspective. Even if
the execution is different, the concepts remain the same:
http://www.winsupersite.com/showcase/windowsxp_sp2_slipstream.asp
Joe
--
gentoo-user@gentoo.org mailing list