The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Disk cloning with Acronis True Image
3 September 2004
|
Have you ever needed to clone a disk? Your 5GB drive is just too small? Time to move it all to a new 160GB drive? Then you're in the right place. I'll show you how I tried to do this in Windows XP Pro (using Acronis True Image) and under FreeBSD (using dd). Why? Because I can! Actually, it's not quite just because I can. Last Sunday, my Windows XP Pro workstation died. It was a hardware failure. Nothing happened at power on. Sure, the fans spun, and the disks turned, but nothing else. I tried another monitor, another video card, and then another PSU. It's dead Jim. I'll show you how I tried to use dd to clone an XP disk, and I'll introduce you to a wonderful product, Acronis True Image 8.0 by Acronis. Actually, this articles turns to be more of an endorsement for Acronis True Image than anything else. What can I say? It did what I needed it to do. In the next article, I'll show how I set up a RAID-5 array and populated that via dd. |
Hardware is not the answer (but it is a start)
|
So where did I go? OEM Express right here in Ottawa. They have been my main source of hardware since 2001. After getting a new main board, Windows XP would boot, but only so far, then it would reboot. That was very frustrating. Fortunately, Google is my friend. By booting XP in safe mode, I noticed it was rebooting at the same place. I took the string, and searched for it via Google. The recommendation was to repair the install using this URL: http://www.michaelstevenstech.com/XPrepairinstall.htm. BEFORE YOU FOLLOW THOSE INSTRUCTIONS, be aware that I had to get a new product key from Microsoft after doing the repair. The repair was eventful. Eventually, I got this message:
And again, Google to the rescue! The solution involves ignoring the error message, waiting a half hour or so, and then and pressing ENTER many time. Eventually, I got my system back. But then Windows had to be activated. I entered my product key, but that was rejected. So I called Microsoft, who gave me a new product key! That allowed me to get back up and running |
Why go to RAID?
|
The simple answer is: because I can. RAID (Redundant Arrays of
Independent Disks) can provide redundancy should a hard drive fail.
There are different types of RAID, some allowing mirroring of disks,
others allowing for striped disks. Pick the one that suits you best.
For most applications, RAID-1 (mirroring) or RAID-5 (striped array with
rotating parity) make the most sense. I already use RAID-1 for on two
machines, and I'm about to introduce RAID-5.
Traditionally, RAID is usually made up of SCSI disks. Not any more. IDE RAID is becoming more and more popular. And why not! IDE is cheaper than SCSI and the speed differences are acceptable for many people. RAID can be implemented in either hardware or software. I've heard people claim they'd never trust software RAID because it's software and it'll have bugs. They'd rather trust the hardware. I don't buy that. Hardware RAID has software on the card. It's called firmware. I guess such people think firmware won't have bugs. I found the following resources helpful: One point about hardware RAID, as put to me by David Maxwell (of the NetBSD project), if your HDD fails, you just put in another disk. If your controller fails, you need another controller. I have two 3Ware 7006-2 cards. I think I'll start looking around for another Adaptec 2400A.
|
Acronis True Image to the rescue
|
I was chatting to people on IRC about my hardware failure. I mentioned I planned to ghost the disk ("ghost" being a synonym for clone, derived, I expect from Norton Ghost, a well respected disk cloning application). Cloning an XP disk is not as simple as it sounds. During my googling, I found a few references to id generation. That is, XP keeps an ID somewhere on the drive and this ID has to be reset when cloning the disk. The references indicated that commercial products such as Norton Ghost and Acronis True Image can reset this ID appropriately. A straight dd won't do that. My experience supports that idea, but I have no proof. I may be encountering some other problem. I found that Acronis True Image did what I wanted. Using dd failed. Mind you, I'm now unable to boot from the original system drive. I don't know why. Perhaps it has been corrupted during the process. I suspect that is why I didn't get dd to work. Read on! |
Disk Cloning with Acronis True Image
|
I expected that installing RAID under XP would be the most challenging. It was actually straight forward. I installed a 3Ware card, hooked up the drives, and pressed ALT-3 when presented with that option during the booting process. I configured the disks for RAID-1 (mirror). The difficult part was to clone the existing XP boot drive into the RAID array. A hardware RAID array looks exactly like a single drive to the operating system. That should simplify things. The cloning software I chose was recommended by someone in the Bacula IRC channel. They mentioned Acronis True Image 8.0 by Acronis. This product has a free trial version which lasts for 15 days. I tried it. It worked. I cannot tell the difference between the original drive and the RAID array. Acronis True Image has a nice little Wizard which guides you through the cloning process. I will not go into detail. WARNING! As with all such operations, proceed slowly, read everything being presented to you, and exercise caution. You have the potential to do the wrong thing and destroy your original disk. After Acronis True Image did its stuff, I was up and running XP off the RAID array. It was simple. A no-brainer. |
Preparing for the dd
|
After getting XP running by cloning the drive with Acronis True Image, I powered off the system and removed the two drives to another location for safe storage. At this point, an interesting question arose: Do I have to remember what drive is which? That is, does drive A always have to be attached to cable A, or can I attach the drives to the controller in any order? With no answer, I decided to mark the drives and cables so I knew what drive went with which cable. I think caution is a good virtue when dealing with data. |
Disk Cloning with dd (this failed)
|
The key to disk cloning under Unix is dd:
To do this on my Windows XP system, I booted from a FreeSBIE CD, then issued this command (NOTE: DO NOT DO THIS. read further on):
You will need to change SOURCE and DEST to your actual drive devices. I did not supply the values I used so that you cannot just copy and paste, perhaps with disastrous results. Yes, I'm protecting you from yourself. *grin* Again, please read further on for what happened next.
For what it's worth, my SOURCE was Now I'm going to reboot the Windows box and see if I can boot from the RAID array. It fails. The message I get, which is from the BIOS from what I can tell:
If I boot into XP using the original drive, I can see the drive (G:). Exploring it shows a "System Volume Information" directory. Attempts to explore that directory yield:
This isn't a permissions issue from what I can tell. I am running as Admin. Several discussions on IRC didn't get very far. Then I started reviewing the output of demsg. I saw this
I noticed the JBOD (Just a Bunch of Ddisks).
That's not right. It shouldn't be that. DOH! I didn't create the raid
array! When I replaced the two disks used with Acronis True Image, I didn't create
an array. This is a vital step. The controller needs to know how to treat
the drives. As you can see above, I have two devices,
I rebooted the box, popped in the 3Ware configuration screen, created the disk array, and continued with the reboot. This time, I saw this in dmesg:
That's much better! Good. That's what I want. For what it's worth, if I was to try my orignal dd now, I'd get this:
My interpretation of this is I am not allowed to access the individual drives.
I no longer have Now that I have the RAID array created, and the right devices appearing in dmesg, I can try this command:
where SOURCE is But this did not work either. Booting went into XP, but froze at the login screen just before the login prompt would appear. Bugger. I tried a repair, as shown in a URL higher up, but that failed too. After the first stage of the repair, the reboot process would error out. I suspect that's because the CD was built for XP Pro, but it was repairing XP Pro SP2. I tried this process a second time. That also failed. At this point, I gave up and went back to my original XP disk and tried Acronis True Image again. That also failed. It boots up, but after booting, it stops at this point (this image is very fuzzy, sorry about that): This should work. Others have told me it would work. Google shows examples of it working. I have no explanation. |
Not much else to say
|
I was quite sure that dd would work. I hope others can contribute their comments. I have great words to say about Acronis True Image 8.0. I looked at using Norton Ghost. Actually, I bought Norton Ghost, but will be returning it unopened. The advantage I see in using Acronis True Image is price and download. Acronis True Image costs less than Norton Ghost and you can download it. |