Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Like Tree7Likes
  • 3 Post By Preston
  • 1 Post By kilgoretrout
  • 3 Post By pally01
Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 01-29-2013, 11:18 AM   #1
Member (10 bit)
 
Join Date: Feb 2007
Location: Alberta, Canada
Posts: 717
Image a Linux drive?

Hello to all.

I'm wondering what the best (read: easiest and cheapest) software/methodology exists to clone a linux-based hard drive in its' entirety. At work, we have a linux hard drive that is failing and want to image it onto a new hard drive. I know zippo about linux. What I'm hoping for is to remove and slave the linux drive onto another pc and use something windows-based.

I've done some checking on this already, and numerous references to Clonezilla keep popping up. Is there anything else out there?

Many thanks.
__________________
Asus M4A785TD-V Evo, Phenom II X2 555 (unlocked quad), 4x4gb Corsair PC3 10700 Ram, EVGA GTX460, Corsair 750w PSU, Patriot 60gb SSD, 2x2TB, 1x1TB W.D Green's
pally01 is offline   Reply With Quote
Old 01-29-2013, 11:31 AM   #2
Techphile.
 
David M's Avatar
 
Join Date: Nov 2003
Location: San Francisco Bay
Posts: 6,293
Yes, Acronis. Click on free trial.
Backup software for data backup and recovery | Acronis

Interestingly, I found an Acronis version for Western Digital drives. I don't know if it only works with WD drives but it seems to be truly free and not limited to a 30 day trial. I could not find such a limitation in the User's Guide PDF.
http://support.wdc.com/product/downl...l.asp?swid=119
__________________
Asus P8P67 WS Revolution | Intel 2600K @ 4.7 GHz | Win 7 Pro 64 |8 gigs Corsair 1600 | Two Diamond 6990's in Crossfire| Corsair AX1200 | Thermalright Silver Arrow | Western Digital Black 2TB 64 meg cache | Lian-Li PC-A71B | Logitec Z-5500 | Three Asus 26" VW266H monitors running under Eyefinity |

Last edited by David M; 01-29-2013 at 11:38 AM.
David M is offline   Reply With Quote
Old 01-29-2013, 11:40 AM   #3
glc
Forum Administrator
Staff
Premium Member
 
glc's Avatar
 
Join Date: May 2000
Location: Joplin MO
Posts: 40,384
The only possible way to clone a Linux drive with an Acronis product might be with boot media - it ain't happening in Windows. You would be much better off using something designed for Linux. Clonezilla on a bootable CD or flash drive would probably be the best way.
glc is offline   Reply With Quote
Old 01-29-2013, 11:54 AM   #4
Techphile.
 
David M's Avatar
 
Join Date: Nov 2003
Location: San Francisco Bay
Posts: 6,293
That's what I was thinking. Boot disk or boot from flash drive only. Acronis not written for Linux that I know of. And to do a clone you have to do a boot disk or flash...right? There is no other choice?
David M is offline   Reply With Quote
Old 01-29-2013, 12:30 PM   #5
glc
Forum Administrator
Staff
Premium Member
 
glc's Avatar
 
Join Date: May 2000
Location: Joplin MO
Posts: 40,384
Correct. You cannot clone or image a Linux drive if it's mounted by the OS.
glc is offline   Reply With Quote
Old 01-29-2013, 02:32 PM   #6
Member (10 bit)
 
Join Date: Feb 2007
Location: Alberta, Canada
Posts: 717
Thanks guys.

Ya I slaved the linux drive yesterday and used Acronis. As GLC stated, the drive wasn't accessible/viewable. Too bad 'cause Acronis is my go-to software whenever I clone drives and it never lets me down

I'll build a linux usb stick and see if I can figure out Clonezilla.
pally01 is offline   Reply With Quote
Old 01-30-2013, 01:47 AM   #7
Member (9 bit)
 
Join Date: Dec 2002
Location: Kansas City, MO U.S.A.
Posts: 499
The command line is always an option to.

It might take a little reading up on the dd command, but it should do the trick. Just be sure you know what your source drive is and what your destination drive is.

Linux (any distro) HowTo: Clone disks via the command line with dd.


.
Tin, Detonate and jdeb like this.
__________________

Give Linux a try. There is a distro made just for you!

Last edited by Preston; 01-30-2013 at 02:01 AM.
Preston is offline   Reply With Quote
Old 01-30-2013, 09:54 AM   #8
Moderator
Staff
Premium Member
 
jdeb's Avatar
 
Join Date: Nov 2008
Location: Detroit, MI
Posts: 4,969
Preston is right on the mark. His link is the perfect and easiest solution.
jdeb is online now   Reply With Quote
Old 01-30-2013, 05:16 PM   #9
Member (10 bit)
 
Join Date: Feb 2007
Location: Alberta, Canada
Posts: 717
Thanks Preston and Jdeb. I'm going to have a crack at the dd command stuff. I read over the two links provided, and the task seems relatively straightforward. One question I have is will hidden files and stuff be copied too?
pally01 is offline   Reply With Quote
Old 01-30-2013, 06:25 PM   #10
Member (9 bit)
 
Join Date: Dec 2002
Location: Kansas City, MO U.S.A.
Posts: 499
'dd' makes a bit for bit copy of the drive.

Here is a nice video: Copy One Drive to Another Using the dd Command in Linux.
Preston is offline   Reply With Quote
Old 01-30-2013, 06:34 PM   #11
Member (9 bit)
 
Join Date: Dec 2002
Location: Kansas City, MO U.S.A.
Posts: 499
I haven't used this one, but it may be another option for you: PING (Partimage Is Not Ghost).


Wilders Security Forum: PING (Have You Ever Used It?


I really don't know anything about it though...


(Now that you've read up on 'dd', I throw something new at you! )

Last edited by Preston; 01-30-2013 at 06:37 PM.
Preston is offline   Reply With Quote
Old 02-02-2013, 08:32 AM   #12
Member (11 bit)
 
Join Date: Apr 2003
Posts: 1,554
The dd command works fine if you don't encounter any bad blocks. If you do have any bad blocks, dd will stop and hang when it encounters them. Since you say your hard drive may be failing, dd might not work. For those situations you are better off using the ddrescue command:

ddrescue - Gentoo Wiki

You can find most, if not all of the utilities mentioned in this thread(dd, ddrescue, partimage, clonezilla) on a linux livecd/liveusb called Parted Magic:

programs ? Parted Magic

Both partimage and clonezilla use the dd command under the hood to do their work IIRC, so once again, you might get aborts or system hangs if they encounter bad blocks. Clonezilla is the most widely used application for cloning an entire hard drive. I'd try that first and if you run into problems, go to ddrescue.
Preston likes this.
kilgoretrout is offline   Reply With Quote
Old 02-03-2013, 08:39 PM   #13
Member (10 bit)
 
Join Date: Feb 2007
Location: Alberta, Canada
Posts: 717
Update: Done Succesfully!!!!!!!!

First off, thanks guys for all the info contained above. I used all of it at some point or another and the links were invaluable.

I spent much of today trying to get this task done. Ultimately, what worked was using the dd "clone disk" command. I was really apprehensive about doing command line stuff with linux, so I tried Clonezilla first.

Clonezilla seemed to work well for most of the cloning, but near the end where it tries to find/write the GRUB info, certain files weren't found. The cloned disk wouldn't boot. I tried to repair the GRUB data but that didn't work out too well. I went through it a few times and got the same errors/result, so I jumped into dd commands.

dd cloning took wayyyyy longer than Clonezilla did. When it finished I tried to boot with the cloned drive and it worked like a charm! I'm very pleased that all the time invested paid off.

I decided that I want to tinker more with Linux, and I happen to have a brand new pc just begging to be used. So I bought an SSD for it and set-up a dual-boot with Win8, though getting it to actually dual-boot was another fun Linux-learning lesson for me.

All-in-all, a great day of Linux dabbling and learning. Wouldn't trade it for anything.
Preston, Detonate and jdeb like this.
pally01 is offline   Reply With Quote
Old 02-04-2013, 06:56 AM   #14
Member (8 bit)
 
Detonate's Avatar
 
Join Date: May 2008
Location: Ault, Colorado, USA
Posts: 194
One little glitch I have run into using dd to clone a drive is, if both drives are to be used in the same computer they will both have the same UUID which causes problems with mounting.

You can fix this with the tune2fs command.
Code:
tune2fs -U random /dev/sdX
That will change the UUID of the disk to new randomly generated UUID.
__________________
If you think you are too old to learn, you probably always were.
http://www.thegeezergeek.net
http://www.bigredonecannoneers.org
Detonate is offline   Reply With Quote
Old 02-05-2013, 09:33 AM   #15
Member (8 bit)
 
Detonate's Avatar
 
Join Date: May 2008
Location: Ault, Colorado, USA
Posts: 194
Smile

Quote:
Originally Posted by Detonate View Post
One little glitch I have run into using dd to clone a drive is, if both drives are to be used in the same computer they will both have the same UUID which causes problems with mounting.

You can fix this with the tune2fs command.
Code:
tune2fs -U random /dev/sdXy
That will change the UUID of the disk to new randomly generated UUID.
I have edited the above code to indicate you would actually need to change the UUID of each partition on the drive where Xy is the drive and partition to change. Senior moment.
Detonate is offline   Reply With Quote
Old 02-08-2013, 08:22 AM   #16
Member (10 bit)
 
Join Date: Feb 2007
Location: Alberta, Canada
Posts: 717
Thx Detonate. The imaged drive has been removed from duty so the UUID conflict has been avoided.
pally01 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:26 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.1