Linux (any distro) HowTo: Clone disks via the command line with dd
LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
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.
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.
I know many people who post here on LQ may think that the GUI is the only way to clone a CD or DVD, but it isn't. If you happen to be running a dumb terminal, you can clone with dd.
This command not just allows you to clone CDs or DVDs, but also hard disks and USB flash drives, creating exact 1:1 copies of these disks. But be warned: When you clone one hard drive onto another, you erase the contents of one drive with the contents of another. You can also use dd to create an image file with the contents of a hard drive, CD, DVD, or USB flash drive for later cloning.
Nice. Hate when that happens.... well it doesn't happen to me, cause I don't use a laptop from google. LOL.... Speaking of which, how is that thing anyway? I am thinking about trying to get one.
So far, I have experienced very few bugs, but it's not like I have none together. In particular, there's one bug where the screen resolution seems to constantly rise to a level so high that some themes fail to render...
However, no worries. I was able to create my own theme, and I was able to (via the Chrome Theme Creator) set the New Tab Page background to be repetitive so I don't have that problem.
Apart from this discussion thread straying from it's intended purpose, in your text you listed "dd if=/mnt/cdbackup.iso of=/dev/cdrom" as a way to burn an ISO to CDROM. Did you actually test that command writing a valid CDFS to an empty CDROM? Didn't you get any errors? Could you read slash verify the result for real?
Apart from this discussion thread straying from it's intended purpose, in your text you listed "dd if=/mnt/cdbackup.iso of=/dev/cdrom" as a way to burn an ISO to CDROM. Did you actually test that command writing a valid CDFS to an empty CDROM? Didn't you get any errors? Could you read slash verify the result for real?
The command is provided that a CD is in the drive...
Have you tested that? I doubt that this will work.
I have tried it with a CD in the drive, and it does work. First, with the CD mounted, you run 'fdisk -l' and then, when the device file for the CD or DVD drive is determined, you dd the image to it. It works for me, at least from an external CD ROM drive.
And I didn't mention trying to dd "back" onto the CD it came from, I was referring to cloning one CD onto another via the use of an image so that you can copy the CD or DVD multiple times with just one CD or DVD drive.
I have tried it with a CD in the drive, and it does work. First, with the CD mounted, you run 'fdisk -l' and then, when the device file for the CD or DVD drive is determined, you dd the image to it. It works for me, at least from an external CD ROM drive.
I tried it. fdisk -l doesn't show my DVD drive, and I can't remember that it ever did, regardless of inserted media.
dd-ing to my drive also doesn't work, it gives me this:
Code:
root@monster:/home/tobi# dd if=SimplyMEPIS-DVD-TEST_10.9.90_32.iso of=/dev/sr0
dd: opening `/dev/sr0': Read-only file system
I tried this with merely recordable media, and you're right. It doesn't work. However, this is with Arch, not Ubuntu. And sorry about 'fdisk -l'. I meant to say this:
Code:
ls /dev/disk/by-id | less
This will list *all* media, even optical media. And I did test it. I also, when using Ubuntu, only tested dd with DVDs, not CDs. And all my DVDs are rewritable, so that could be why it says "Read-only file system" when you try to dd to a recordable CD or DVD.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.