PDA

View Full Version : cloning locally-- please help



xeoron
08-30-2004, 05:26 PM
To anyone whom may be able to help:

I just recieved my replacement Maxtor drive, which will be replacing one that is failing evey few days. Reading through the faq did not answer my question, so I am posting it here.

I have two drives installed on my system. One is brand-new and has not been used (not even formatted) while the other is my old Debian Linux drive. Both drives are of the same make and where produced by the same company. With my Knoppix v3.4 live cd running, how do I copy the old drive's image onto the new drive? My goal is to have an exact copy of the old drive, before it becomes un-usable.

Please note that so far I have only found instructions on how to do this over a network, which is problematic, because I need to do this locally.

Thank you for your time,
-Xeoron

xeoron
08-30-2004, 05:43 PM
I found a solution so I thought I would share it. A friend suggested that I use this:

cp /dev/hda /dev/hdb

And to adjust for the correct device name.

Hug It
08-30-2004, 07:43 PM
You may want to try this instead. From a root shell type:

dd if=/dev/hda of=/dev/hdb

If you just use "cp" it will only copy over the data(I'm pretty sure anyway), if you use "dd" you will get an exact bit for bit copy of it, including your partition tables and everything.

OErjan
09-02-2004, 07:16 PM
dd will only work well if the disks are same size, and i would use cp -a /dev... that would preserve permisions... better.

user unknown
09-02-2004, 10:23 PM
I would mark all directories with mc, and copy (preserving attributes).
Then I would modify lilo.conf, and rerun lilo for booting from the new drive.

Assuming you have only one partition and use the lilo - bootloader.

OErjan
09-03-2004, 10:31 AM
that would work. MC uses cp -a for that...