LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2004, 04:26 PM   #1
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Rep: Reputation: 30
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.
 
Old 08-26-2004, 04:30 PM   #2
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
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.....
 
Old 08-26-2004, 06:00 PM   #3
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Original Poster
Rep: Reputation: 30
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.
 
Old 08-26-2004, 06:04 PM   #4
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
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?
 
Old 08-26-2004, 06:19 PM   #5
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Original Poster
Rep: Reputation: 30
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.
 
Old 08-26-2004, 11:33 PM   #6
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
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
 
Old 08-26-2004, 11:41 PM   #7
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Original Poster
Rep: Reputation: 30
Oh wow that's awesome. I have done loop mounts for ISO's before, but I never knew you could loop mount a bin.
 
Old 08-27-2004, 12:36 AM   #8
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
What you did with dd was copy an iso file from your CD onto your HDD.
 
Old 11-04-2004, 08:42 AM   #9
deoren
Member
 
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216

Rep: Reputation: 30
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.
 
Old 11-04-2004, 08:45 AM   #10
deoren
Member
 
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216

Rep: Reputation: 30
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to create bootable backup partition jeffbarish Debian 4 10-10-2005 02:05 PM
backup a kernel to a bootable CD? mipia Slackware 3 10-26-2004 01:17 PM
making a non bootable patrion bootable jason2 Linux - General 6 08-01-2004 10:25 AM
Easy/Good way to make bootable backup of partitions jimdaworm Slackware 3 03-28-2004 10:53 AM
Installing Slackware with non-bootable CD or bootable floppy (but not both) TiddlyPom Slackware 2 03-22-2004 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration