LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hard drive clonning i (https://www.linuxquestions.org/questions/linux-newbie-8/hard-drive-clonning-i-640560/)

ceantuco 05-07-2008 11:14 AM

Hard drive clonning i
 
Hello,

I would like to know if there is a program to copy hard drives like Norton Ghost.
Please if anyone knows, let me know.
thanks

IsaacKuo 05-07-2008 01:45 PM

One very option is to use "dd". It's very low level, but extremely powerful. You can clone any hard drive, including weird multi-boot setups with Windows, Linux, BSD, and anything else. Here are how-tos for cloning and migrating to a bigger drive.

paragkalra 05-07-2008 02:11 PM

I agree with IsaacKuo ... the easiest way of using "dd" to clone is:
# dd if=/dev/sda of=/dev/sdb

Installed & working Operating Systems present on /dev/sda will also get cloned on /dev/sdb and which can be used to boot the system...Amazing

However make sure you are aware that which one is "sda" & which one is "sdb". A slight mistake might burn the disk drive empty :-)

ceantuco 05-07-2008 03:23 PM

Thank you guys, I will def try that dd

ceantuco 05-08-2008 10:40 AM

hey Guys,

I tried copying Hard Drives, when it finished it seemed to be ok but when I tried to access either drive (source or destination) i get error messages like the hard drive is corrupt.
any advice?

I tried the following command:

dd if=/dev/[source] of=/dev/[destination] bs=32256

of course before clonning the real HD I tried it with another HD that I have.

please advice me!

b0uncer 05-08-2008 10:49 AM

Hopefully you made sure neither disk was mounted during the operation..and what's that bs value, why wasn't the default all right?

ceantuco 05-08-2008 11:19 AM

no, the drives were not mounted. bs (buffer size) = 61 sectors x 512 = 32256. first I tried copying the hd without the bs value but it finished way to quick and it copied about 114 bytes.

saikee 05-08-2008 12:25 PM

ceantuco,

You have to come clean on this one.

If dd copies only part of the hard disk when it has been instructed to clone the whole disk then it must report the error message.

So what was it?

If the hard disk is defective and cannot be read then dd will fail too.

dd will operate regardless if the drives/partitions are mounted or not as it operates at the hard level.

It is bomb proof if the target disk is bigger than the source disk.

ceantuco 05-08-2008 12:35 PM

Hi,

The HDDs are perfectly fine. The target disk is double the size of the source disk and I did not get any error messages.

farslayer 05-08-2008 01:09 PM

there is also:

Partimage A partition imaging program

G4L - Ghost for Linux

G4U - Ghost for Unix

Commercial Offering
Acronis True Image

just fyi...

saikee 05-08-2008 01:22 PM

ceantuco,

dd can take a long time if the bs parameter is missing.

Also dd has no output until everything is finished and the hard disk flickering light goes out. If a USB hard disk is involved the speed may drop down to as low as 10Mb/s even with bs=32256. Thus a 100Gb disk can take 10,000 seconds or 2.76 hours.

So how big is your hard disk and how long did you try it?

ceantuco 05-08-2008 02:56 PM

I was copying a 20gb hard drive to a 40gb hard drive. Both drives are good and it took more than 20 minutes to copy. (I don't exactly how long because I left it copying) when it finished it gave the results and it seemed to be ok until I tried to access it.

saikee 05-08-2008 03:25 PM

20 min is about right for cloning between two internal hard disks.

It is important to know which is the source and which is the target.

Can you repeat the exercise again, as it takes only 20 min, and post the complete bash command history as follow assuming you are in root
Code:

fdisk -l
dd if=/dev/[source] of=/dev/[destination] bs=32256
fdisk -l


ceantuco 05-09-2008 09:33 PM

I will! Im going on vacation tonight and I won't be back for 3 weeks so when I go back to work I will def try to execute the command and again! Thanx for ur help


All times are GMT -5. The time now is 12:56 PM.