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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-26-2004, 04:26 PM
|
#1
|
Member
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217
Rep:
|
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.
|
|
|
08-26-2004, 04:30 PM
|
#2
|
Member
Registered: Oct 2003
Posts: 568
Rep:
|
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.....
|
|
|
08-26-2004, 06:00 PM
|
#3
|
Member
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217
Original Poster
Rep:
|
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.
|
|
|
08-26-2004, 06:04 PM
|
#4
|
Member
Registered: Oct 2003
Posts: 568
Rep:
|
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?
|
|
|
08-26-2004, 06:19 PM
|
#5
|
Member
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217
Original Poster
Rep:
|
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.
|
|
|
08-26-2004, 11:33 PM
|
#6
|
Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438
Rep:
|
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
|
|
|
08-26-2004, 11:41 PM
|
#7
|
Member
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217
Original Poster
Rep:
|
Oh wow that's awesome. I have done loop mounts for ISO's before, but I never knew you could loop mount a bin.
|
|
|
08-27-2004, 12:36 AM
|
#8
|
Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438
Rep:
|
What you did with dd was copy an iso file from your CD onto your HDD.
|
|
|
11-04-2004, 08:42 AM
|
#9
|
Member
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216
Rep:
|
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)
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:
Once you have your iso file created, use md5sum on the iso file
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.
|
|
|
11-04-2004, 08:45 AM
|
#10
|
Member
Registered: Oct 2003
Location: USA
Distribution: Ubuntu
Posts: 216
Rep:
|
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 08:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|