Previous in Forum: Asteroid/2005 yu55/Celestia   Next in Forum: RS232 cable + USB cable?
Close
Close
Close
11 comments
Rate Comments: Nested
Active Contributor

Join Date: May 2011
Posts: 15

How Do I Ghost a Hard Drive?

05/31/2011 1:37 PM

I have a Linux op sys on a hard drive and I want to copy the entire drive, op sys and all . Should the existing drive fail, I would like to insert the copy drive and continue to work asap. Is software available for this type of total disc copy? Thanks

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru

Join Date: Oct 2010
Posts: 1294
Good Answers: 35
#1

Re: How Do I Ghost a Hard Drive?

05/31/2011 3:10 PM

Yes, there are ways to do that. It's been a long time since I've done it. dd is one Linux command that will work.

At one time, a limitation of dd was that the disk you were going to use in place of the original disk had to be the same size and, iirc, the same layout in terms of heads and cylinders. That is not not a restriction anymore.

I also believe typical utitilies to do the similar thing for Windows will work for Linux, but if I tried that (I might have, maybe with Partition Commander (or a sister product made for cloning drives)). I'm pretty sure (what is now Norton's) ghost will do the same thing.

Register to Reply
Active Contributor

Join Date: May 2011
Posts: 15
#3
In reply to #1

Re: How Do I Ghost a Hard Drive?

05/31/2011 6:59 PM

rhkramer; Thanks for the info. I was under the impression when using the dd command,that only files were copied and the os was left behind so to speak. I want to be able to begin running immediately ,by swapping out the crashed hard drive with the ghost. There are many interactive programs on this drive that ,with my limited abilities, I could not repair/reload without great expense. Thanks

Register to Reply
Guru

Join Date: Oct 2010
Posts: 1294
Good Answers: 35
#5
In reply to #3

Re: How Do I Ghost a Hard Drive?

05/31/2011 8:09 PM

You might do some googling, but here's one example I found--pay attention to the caveat. Also, iirc, you want to do this on a "dead system"--that is, boot from something else and do the dd from that OS.

from: Re: Hard drive imaging:

Code:

sudo dd if=/dev/hda of=diskimage.img

That will take a complete, exact image of hda (ide disk 1) . if means input file, of means output file.

Do a man dd before using it, because it'll do what you tell it - including destroy your hard disk!

ddrescue and clonezilla are other choices that are more recent. To answer your question, dd can do a sector by sector copy, copying everything. But, it can be a little fiddley to use. I got some help back in the day when I used it. You're probably better off with something more user friendly like ddrescue or clonezilla.

Register to Reply
Guru

Join Date: Oct 2010
Posts: 1294
Good Answers: 35
#8
In reply to #5

Re: How Do I Ghost a Hard Drive?

06/01/2011 11:19 AM

re: I got some help back in the day when I used it.

This is a digression (i.e., OT, but I won't mark it as such) ;-)

I thought I'd mention why I don't do the "backing up the entire system with dd" at this point in time. (It may also be slightly relevant to mention why I started using dd in the first place... ;-)

I started using dd because I was involved in a "Computers for Kids" group (there are / were many, not all necessarily affiliated) that took old computers and rehabilitated them for (especially) families with children that could not afford them. We typically installed Linux and provided some minimal training (not really enough). To do the Linux installation, we made one good Linux installation, then made an image (using dd) and then installed that image on the hard drives for the re-used computers (again using dd). We had to do some configuration after the imaging to match differing hardware that might be installed.

Because I learned how to do that, using dd seemed like a way to also do backups of my own system.

Sometime after that, I achieved another small goal, switching from a number of Linux's which I had tried to standardize on Debian. Debian is nice because so much software is available in their packaging system, and aptitude (and even apt-get are easy very easy to use (especially with a fast network connection--not quite so nice without one). So, currently, my backup plan is to backup my "real user data" only (not as often as I should) with the intent of reinstalling Debian and the software I've added since installation as a new Debian install.

That's probably the only point at which I'd actually upgrade my system again--a hard disk failure leading to an install of a more up-to-date Debian system.

I'm fortunate that very little of the software I use is not available in the Debian package system, and most of the little bit that isn't is software I've written (or am trying to write) myself, thus I back it up with my "real user data" (but maybe I better do that again today or tomorrow ;-)

I'm probably overdue for a problem--without really checking, I'm probably well into my 4th year on this hard drive.

Now going to knock on wood (or wait--I can use my hard head, I think) in hopes of not having my comments here jinx me. ;-)

Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#10
In reply to #1

Re: How Do I Ghost a Hard Drive?

06/02/2011 7:17 AM

The free Windows program I mentioned recently on this blog will copy/clone any disk to any disk (as long as the target has enough space). It does not matter if the disk to be copied is Linux or Windows or whatever.....

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru

Join Date: Oct 2010
Posts: 1294
Good Answers: 35
#11
In reply to #10

Re: How Do I Ghost a Hard Drive?

06/02/2011 7:45 AM

Thanks for the reply!

Now that I've had time to "remember", I did use some non-Linux cloning utilities on Linux, including Partition Commander or its sister product made for cloning, another was ghost just before and around the time it was bought by Norton. Everything I tried worked fine.

(I didn't finish the one sentence in post #1, I was going to say if I tried some non-Linux cloning utilities on Linux, I didn't remember, but now I do ;-)

Register to Reply Off Topic (Score 5)
Guru
Hobbies - Fishing - Old Salt Hobbies - CNC - New Member United States - US - Statue of Liberty - New Member

Join Date: Mar 2007
Location: Rosedale, Maryland USA
Posts: 5197
Good Answers: 266
#2

Re: How Do I Ghost a Hard Drive?

05/31/2011 4:48 PM

There are many OS's based on Linux which one are you using? The reason I ask some like Puppy Linux can be stored on a flash drive and booted from it. The whole OS is then placed in the RAM.

__________________
Life is not a journey to the grave with the intention of arriving in a pretty, pristine body but rather to come sliding in sideways, all used up and exclaiming, "Wow, what a ride!"
Register to Reply
Active Contributor

Join Date: May 2011
Posts: 15
#4
In reply to #2

Re: How Do I Ghost a Hard Drive?

05/31/2011 7:02 PM

ozzb: My operating system is Centos 5.4..maybe 5.5 Thanks

Register to Reply
Guru
Hobbies - Fishing - Old Salt Hobbies - CNC - New Member United States - US - Statue of Liberty - New Member

Join Date: Mar 2007
Location: Rosedale, Maryland USA
Posts: 5197
Good Answers: 266
#6
In reply to #4

Re: How Do I Ghost a Hard Drive?

06/01/2011 7:29 AM

Centos was developed from Redhat there they offer imaging tools.

__________________
Life is not a journey to the grave with the intention of arriving in a pretty, pristine body but rather to come sliding in sideways, all used up and exclaiming, "Wow, what a ride!"
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#7

Re: How Do I Ghost a Hard Drive?

06/01/2011 8:49 AM

Easeus Todo Backup free will also do what you want to do on a Windows machine, even if the hard disk has a copy of Linux to be cloned......I have used it, its simple to use and works 100%.....It will even clone to a different make, type, size of hard disk.....

Look here for a download:-

http://www.todo-backup.com/products/home/free-backup-software.htm

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
Engineering Fields - Electrical Engineering - Analog and Digital Circuit Design Engineering Fields - Electromechanical Engineering - Transformers, Motors & Drives, EM Launchers Engineering Fields - Engineering Physics - Applied Electrical, Optical, and Mechanical

Join Date: Jan 2008
Location: NY
Posts: 1207
Good Answers: 119
#9

Re: How Do I Ghost a Hard Drive?

06/01/2011 10:14 PM

I'm also using Linux (Ubuntu Lucid). Every 3 months I boot from a "live" CD and perform a complete drive clone using the built-in dd command . I occasionally swap-in backup drives to make sure there was a true 1:1 copy and it always works fine. Takes about an hour each time for my drive size and I alternate 2 backup drives for redundancy.

I use...

sudo fdisk -l

...to list available hard drives.

then...

sudo dd if=/dev/sda of=/dev/sdb bs=32K conv=notrunc

...to make the clone.

MAKE CERTAIN you have the right if=input and of=output or you will erase your original drive! The switches are optional.

I wish I had this simple option when I had a Windows OS! After completely reloading Windows many times (mostly due to updates), I was paranoid about similar problems with Linux. I'm very pleased that my Linux installation (with all updates) has not needed any backup since I started using Ubuntu Hardy in 2008. Even with a nearly bullet-proof OS I'm going to continue the backups since there can always be a hardware failure.

Good Luck!

Register to Reply
Register to Reply 11 comments
Copy to Clipboard

Users who posted comments:

Andy Germany (2); Matt3477 (2); mjb1962853 (1); ozzb (2); rhkramer (4)

Previous in Forum: Asteroid/2005 yu55/Celestia   Next in Forum: RS232 cable + USB cable?

Advertisement