PDA

View Full Version : Cloning drive


Rob Helmerichs
06-29-2006, 12:26 PM
I have an old TiVo drive that I want to copy to a new one. They are the same size (to the byte, according to Linux). I've tried the Hinsdale method...

mfsbackup -Tao - /dev/hdc | mfsrestore -s 127 -xzpi - /dev/hda

...but it says that the target drive is too small. How can I do this?

PortlandPaw
06-29-2006, 12:56 PM
dd it

...from another new grandfather

Rob Helmerichs
06-29-2006, 01:00 PM
dd it

...from another new grandfather
What exactly do I type?

JamieP
06-29-2006, 01:35 PM
What exactly do I type?dd if=/dev/hdc of=/dev/hda bs=1024kThis will copy using a buffer size of 1MB. Larger buffer sizes may yield better performance if you have plenty of memory. You'll also see the best performance if you have dma enabled. hdparm -d /dev/hda
hdparm -d /dev/hdc to check.hdparm -d1 /dev/hda
hdparm -d1 /dev/hdc to enable, if it's not enabled.

Rob Helmerichs
06-29-2006, 04:37 PM
dd if=/dev/hdc of=/dev/hda bs=1024k
OK, I typed this, and now I have a blinking cursor on the next line. Is that all I'll see until it's done? Or has something gone wrong?

JamieP
06-29-2006, 04:53 PM
OK, I typed this, and now I have a blinking cursor on the next line. Is that all I'll see until it's done? Or has something gone wrong?Yes, that's all you'll see. Progress feedback is for weenies :-) You should see your disk lite flashing away actively.

In my experience, with DMA enabled and source and target disk on different ide chanels, you should get ~ 1-2GB/min, so a 40 GB disk, for example, might take 40 minutes or so. If you are lucky, it might be done with a 40GB disk in 20 minutes. It can be much longer with dma disabled.

There's another variant/extension of dd called dd_rescue (http://www.garloff.de/kurt/linux/ddrescue/). ddrescue does provide progress feedback, IIRC. It also does a better job of recovering from a failing source disk, copying what it can, and skipping over bad blocks. dd will just crap out when it hits a bad block.

Rob Helmerichs
06-29-2006, 08:32 PM
Finally done! And the new drive works like a charm, with all my old stuff on it.

Thanks!