LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2008, 12:14 PM   #1
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Kali
Posts: 588

Rep: Reputation: 37
Smile 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
 
Old 05-07-2008, 02:45 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 8 Jessie
Posts: 1,688
Blog Entries: 5

Rep: Reputation: 165Reputation: 165
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.
 
Old 05-07-2008, 03:11 PM   #3
paragkalra
Member
 
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Rep: Reputation: 31
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 :-)
 
Old 05-07-2008, 04:23 PM   #4
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Kali
Posts: 588

Original Poster
Rep: Reputation: 37
Thank you guys, I will def try that dd
 
Old 05-08-2008, 11:40 AM   #5
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Kali
Posts: 588

Original Poster
Rep: Reputation: 37
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!
 
Old 05-08-2008, 11:49 AM   #6
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Hopefully you made sure neither disk was mounted during the operation..and what's that bs value, why wasn't the default all right?
 
Old 05-08-2008, 12:19 PM   #7
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Kali
Posts: 588

Original Poster
Rep: Reputation: 37
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.
 
Old 05-08-2008, 01:25 PM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.
 
Old 05-08-2008, 01:35 PM   #9
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Kali
Posts: 588

Original Poster
Rep: Reputation: 37
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.
 
Old 05-08-2008, 02:09 PM   #10
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
there is also:

Partimage A partition imaging program

G4L - Ghost for Linux

G4U - Ghost for Unix

Commercial Offering
Acronis True Image

just fyi...
 
Old 05-08-2008, 02:22 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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?
 
Old 05-08-2008, 03:56 PM   #12
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Kali
Posts: 588

Original Poster
Rep: Reputation: 37
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.
 
Old 05-08-2008, 04:25 PM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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
 
Old 05-09-2008, 10:33 PM   #14
ceantuco
Member
 
Registered: Mar 2008
Location: New Jersey
Distribution: CentOS, Debian, Kali
Posts: 588

Original Poster
Rep: Reputation: 37
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 10:19 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-05-2007 12:28 AM
Copying files from internal Hard drive to USB 2.0 Hard Drive is NOT Behaving tubatodd Ubuntu 4 02-19-2007 05:32 PM
Clonning my Hard-Drive easuter General 8 01-23-2007 08:19 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM


All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration