PDA

View Full Version : Cloning drives for new installation


anw
18th January 2009, 17:34
I just recently had a hard disk go out and went and got a brand new IDE drive to replace it. In the process of doing this, I discovered that my motherboard has a built-in SATA interface, so now, a couple of months later, I've about decided to go get a SATA drive and move my almost-new IDE drive to a secondary drive. My question:

My installation is up and running perfectly. Is doing this simply a matter of booting off the IDE drive, then executing a command like:

dd if=/dev/hda bs=1M of=/dev/sda

then booting off the SATA drive? Do I have to worry about drive geometries and such (I know I used to, but I'm laboring under the impression modern drives have made all that obsolete)?

Of course, I feel almost bad asking the question! After all, this is getting pretty close to violating the first rule of computer technology: "if it works, don't fix it"; however, after I'm done, I may want to rearrange some partitions and such, but with two cloned disks that ought to be straightforward.

Is it that simple?

TIA!

falko
19th January 2009, 13:26
My installation is up and running perfectly. Is doing this simply a matter of booting off the IDE drive, then executing a command like:

dd if=/dev/hda bs=1M of=/dev/sda

then booting off the SATA drive?
Yes. This article has more details: http://www.rajeevnet.com/hacks_hints/os_clone/os_cloning.html

chipsafts
19th January 2009, 16:59
Yes. This article has more details: http://www.rajeevnet.com/hacks_hints/os_clone/os_cloning.html

Really ? I would think that the drastically different disk geomatries and drivers would not make it possible to clone via dd .

falko
20th January 2009, 20:22
Oh, he's using different drives - must have overread that... :o

Good question...

anw
20th January 2009, 21:56
I thought modern drives made the true, underlying geometry almost irrevelant?

chipsafts
21st January 2009, 01:24
I thought modern drives made the true, underlying geometry almost irrevelant?

:) Anyone willing to volunteer their hard drives and system to find out ? :)

sjau
21st January 2009, 08:20
Well, the other day I cloned some IDE drives to external USB drives. Not sure if the external ones were sata or ide... despite the external ones being also much larger it just worked perfectly.

anw
21st January 2009, 16:45
sjau-

Did you use dd like I suggested in my first post?

anw
21st January 2009, 16:56
Also, any ideas on the ramifications of using logical volumes? Would your of argument to dd just be /dev/mapper/<lv name>?

sjau
21st January 2009, 17:09
I did clone the drives


sudo dd if=/dev/sda of=/dev/sdb