What exactly does dd do?
If you use dd to dump one hard drive to another, is the new hard drive a perfect clone of the old one? In what ways? What are the "gotchas" of cloning a hard drive with dd? Is a "dd-clone" truly a clone?
I have a Windows box that acts as a serial monitor/relay for some industrial equipment. The box was set up by an outside vendor and I don't have confidence in their ability to always be available for support. I was thinking it would be a good idea to clone the hard drive so that if anything happens I can always slap in the cloned hard drive and restore the box to a known working state. I was going to do this by using two SATA-USB adapters and my Linux laptop, and just dd the current 1TB drive to a new 1TB drive. If I do this, will Windows boot the clone drive? Will it even know anything happened? What if the new hard drive is a different model, or brand, or has a different amount of cache? I need to be confident the new hard drive will work, or there's no point to the exercise. I would like to actually clone the hard drive and then put the CLONED drive back in the computer when I'm done; then I know that the cloning is working as planned. But I don't want to mess anything up, and I know next to zero about Windows. |
dd is used to create an image of just about anything. It is commonly used to clone partitions. Note that as far as I know you can't clone a whole drive at a time, only partitions. So you can create identical partitions on the second hard drive, and then dd the partitions to the new hard drive. For instance:
Code:
dd if=/dev/sda2 of=/dev/sdb2 Code:
dd if=/dev/sda of=/dev/sdb |
Oh. I thought if you did dd if=/dev/sda of=/dev/sdb, then it would make a bit-for-bit copy of the whole drive, including partitions, file system, MBR, everything.
If I had to prepare the destination drive by partitioning it, I'm not sure how to do that. I'm not sure how to make identical partitions on the destination drive, or what that even means...identical sizes? Identical starting points? Would they need a filesystem too? What about the disklabel? Isn't there a way to just duplicate the hard drive, bit-for-bit? |
very good thread for dd command. You learn lot about dd command.
Quote:
|
Quote:
|
Now that I think about it, using USB-to-serial adapters, which are maybe 30MB/s, this is going to take 9.7 hours! That's longer than my working shift. I'd be better off using Sata, which at 3Gb/s, would be 45 min. Although I imagine the real speed will be much less than 3Gb/s which is the max drive speed.
|
Quote:
|
All times are GMT -5. The time now is 09:04 PM. |