LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Backup a bootable CD to another CD, thats bootable (https://www.linuxquestions.org/questions/linux-software-2/backup-a-bootable-cd-to-another-cd-thats-bootable-222810/)

fr0zen 08-26-2004 04:26 PM

Backup a bootable CD to another CD, thats bootable
 
I have a CD that is bootable. I'd like to back it up, make another bootable copy. Every thing I read always instructs me to use a floppy boot image, only, I don't have that. The boot information is on the CD that I wish to backup, already.

To generate the boot image, I tried this:

dd if=/dev/cdrom of=boot.img bs=10k count=144

And it created the file, whether its good or not, I have no idea.

PenguinPwrdBox 08-26-2004 04:30 PM

Dude, you are making this entirely too hard.
CD's aren't like HDD's, you can just copy them outright.
Simply mount it, copy it somewhere, and then, burn a new one with the same files.
It's just that easy.
There is no need for dd - dd is entirely too powerful for something as simple as copying a CD. That's like starting your BBQ with a flamethrower.....

fr0zen 08-26-2004 06:00 PM

Sorry for making it hard. But, the method you describe does not work.

I've tried that. I've mounted the CD, 'mkisofs' to produce an ISO, and then burned the resulting ISO. The new disk is not bootable. The new disk does not contain the boot information that the original disk contained. This is because the boot information does not exist under the directory file structure of a mounted cd. The mkisofs command does not create an ISO with that information.

PenguinPwrdBox 08-26-2004 06:04 PM

I can tell you with confidence that I have done this several times to reproduce ISO CD's for friends and relatives, and yes, it will boot.
What is on this CD?

fr0zen 08-26-2004 06:19 PM

Suffice to say, the issue is resolved. The following accomplished what I required:

Code:

dd if=/dev/cdrom of=cdrom.bin
cdrecord [various options] cdrom.bin

Which is less than:

Code:

mount /mnt/cdrom
mkisofs [options] -o cdrom.iso
umount /mnt/cdrom
cdrecord [options] cdrom.iso

...whether it really works or not.

As for what is on the CD itself, that is hardly relevant to the question. The original CD boots, and 'backup disks' (using the mount, mkiso, etc method) would not. Now they do.

But, just to satisfy your curiosity, I am in the process of creating an installation program for my linux distro, Frozix.

idaho 08-26-2004 11:33 PM

You can check whether the image of your CD that you created with dd is valid before burning the image to a new CD by mounting it with the loopback option. For example

mount -o loop cdrom.bin /your/mnt/point

fr0zen 08-26-2004 11:41 PM

Oh wow that's awesome. I have done loop mounts for ISO's before, but I never knew you could loop mount a bin.

idaho 08-27-2004 12:36 AM

What you did with dd was copy an iso file from your CD onto your HDD.

deoren 11-04-2004 08:42 AM

You can also use md5sum
 
Here is another method of determining whether an iso of the cd was created properly:

Insert the cd you want to copy in your cdrom (we'll say it's /dev/cdrom)
Code:

md5sum /dev/cdrom
Make note of the md5sum.

Create the iso file (issue this command from the directory you want the iso file to be created in, or specify where you want it dumped after the "="):
Code:

dd if=/dev/cdrom of=my-iso.iso
Note: You don't have to use the .iso extension, but it is suggested to help you recognize it.
Tip: A neat utility is called file.

Try this:
Code:

file my-iso.iso
Once you have your iso file created, use md5sum on the iso file
Code:

md5sum my-iso.iso
This should match the md5sum of /dev/cdrom.

I'm not sure if you have to be root or not when you do a md5sum of the cdrom device file or not. Testing will tell you.

deoren 11-04-2004 08:45 AM

Quote:

I never knew you could loop mount a bin
I believe you can loop mount any valid file system. The iso file (in your case you named it with a .bin extension) has an iso9660 file system and is recognizeable by the kernel and mount utility.


All times are GMT -5. The time now is 02:11 AM.