LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 07-12-2012, 03:51 PM   #1
sirius57
Member
 
Registered: Jun 2004
Distribution: Fedora core 1, puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora
Posts: 462

Rep: Reputation: 30
how to clone a hard drive


I have a dell pc with an old maxtor hard drive that I want to image to another drive. I was thinking of installing a blank drive and running a live linux cd to copy the old drive contents to the new drive. Is there imaging software that would make the job easier than using the command line copy method? Would there be problems if the new drive was larger than the original source drive? And can the image created be used in virtual box?
 
Old 07-12-2012, 03:55 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,565

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
Is there imaging software that would make the job easier than using the command line copy method?
The dd utility is the best as far as I know for cloning, unless you want to implement a software solution like ghost: http://linux.softpedia.com/get/Syste...Linux-53.shtml

Would there be problems if the new drive was larger than the original source drive?
Your partitions would be equal to what they are currently set to. So you would miss out on that free space.

And can the image created be used in virtual box?
I would not recommend attempting to clone to a virtual box image, I have never attempted it and am not 100% on this so maybe someone else can post a follow up with some more details.


On a side not, cloning your entire drive is usually not the best solution for cut-over as it keeps you on the old OS etc..

I usually recommend refreshing your OS to the most recent version and then copy your content over. But this is just an opinion and not a fact.
 
1 members found this post helpful.
Old 07-12-2012, 03:57 PM   #3
derek990
LQ Newbie
 
Registered: Apr 2009
Location: Canada
Distribution: Gentoo, CentOS, Fedora
Posts: 4

Rep: Reputation: 1
try this

its based on Debian

http://www.clonezilla.org/downloads.php
 
1 members found this post helpful.
Old 07-12-2012, 04:01 PM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,565

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
Clonezilla is another good software cloning solution, similar to ghost and the like. Should've put that in there, thanks derek990.
 
Old 07-12-2012, 05:36 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,199

Rep: Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014
Personally I generally just use cp/rsync from a liveCD (avoids issues with pseudo filesystem like /proc). Requires (at least) that the bootloader be re-installed, but that is usually trivial.
Gives the opportunity to resize/change filesystem and partition. Also provides some comfort that the source filesystem is usable - which "dd" doesn't. Clonezilla is a much better option than "dd" if you decide on that route.
 
Old 07-12-2012, 06:22 PM   #6
jefro
Guru
 
Registered: Mar 2008
Posts: 11,317

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
I get by with G4U. It is a poor man's dd > gzip.
 
Old 07-17-2012, 05:43 PM   #7
sirius57
Member
 
Registered: Jun 2004
Distribution: Fedora core 1, puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora
Posts: 462

Original Poster
Rep: Reputation: 30
Thanks for the replies. I have booted clonezilla and read the docs. However, I have a question in regard to a menu selection. The menu item 'device-image' I am assuming is backing up from a physical hard drive to an image file. The menu item 'device-device' is backing up from a physical hard drive to another physical hard drive. Is that a correct assumption? If I plan to copy from hard drive to usb thumb drive, would I select 'device-device'? Also, I plan to use clonezilla to back up windows drives. Does clonezilla leave the source drive intact (i.e. no change to master boot record) ?
 
Old 07-17-2012, 06:08 PM   #8
etech3
Senior Member
 
Registered: Jul 2009
Location: Virginia
Distribution: Debian Stable Testing Sid Slackware CentOS
Posts: 1,055
Blog Entries: 2

Rep: Reputation: 44
Take look at mondo

http://www.mondorescue.org

You can resize to your new hard drive.
 
Old 07-17-2012, 09:53 PM   #9
jefro
Guru
 
Registered: Mar 2008
Posts: 11,317

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
Yes, d-i is image d-d is drive to drive. There ought to be many web pages on clonezilla and examples.

If you have windows vista or 7 then use it's backup program. Faster and safer and can be restored by a windows dvd. Clonezilla if used correctly can backup the boot files and partitions.

I would not use the d-d option for the flash drive. A flash drive is a poor choice but it may not or almost will not create a clone that is bootable so it is useless.

All backup and clone operations may have some issues. Some distro's need to have some things checked before you clone them. Opensuse tends to use grub with device by id I believe and that would not work on new drive.
 
Old 07-17-2012, 11:56 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,199

Rep: Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014Reputation: 1014
Quote:
Originally Posted by sirius57 View Post
Also, I plan to use clonezilla to back up windows drives. Does clonezilla leave the source drive intact (i.e. no change to master boot record) ?
Clonezilla should use ntfsclone, which is fine for backups of the non-system NTFS partitions. Messing with Windoze C:\ drive is just asking for trouble.
The source is never modified - my comment re recreating the boot-loader was for the target. And only because of the way I choose to do things.
Quote:
Originally Posted by jefro
Opensuse tends to use grub with device by id I believe and that would not work on new drive.
Excellent point.
 
Old 07-18-2012, 07:17 AM   #11
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,242

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
I have never had problems with clonezilla, whether it be fat32, ntfs or ext fs. All oi the device images & cloned drives just work.
 
Old 07-18-2012, 11:16 AM   #12
jefro
Guru
 
Registered: Mar 2008
Posts: 11,317

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
It works until it fails.
 
  


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
Clone Hard Drive lindylex Linux - General 8 03-05-2009 01:58 PM
clone hard drive to smaller hard drive digity Linux - Newbie 8 01-11-2009 06:29 PM
Clone a dual booting IDE hard drive to a SATA hard drive namida12 Linux - Distributions 1 07-14-2008 10:01 AM
Using dd to clone my hard drive Tommo Linux - Hardware 15 05-20-2007 03:49 PM
Clone a hard drive twantrd Solaris / OpenSolaris 10 02-05-2005 02:15 AM


All times are GMT -5. The time now is 05:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration