Sep 032004

Disk cloning with Acronis True Image

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: 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:
The procedure entry point GetIUMS could not be located in the dynamic link library msdart.dll
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.

Acronis True Image 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:
dd if=/dev/SOURCE of=/dev/DEST bs=8192
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):
root@FreeSBIE:~/cloning# dd if=/dev/SOURCE of=/dev/DEST bs=8192
4886112+0 records in
4886112+0 records out
40027029504 bytes transferred in 2360.354502 secs (16958058 bytes/sec)
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 ad0, and my DEST was twed1. The actual copying took about 30-40 minutes. 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:
Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key
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:
"G:\System Volume Information" is not accessible.
Access is denied.
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
twed0: <Unit 0, JBOD, Normal> on twe0
twed0: 76319MB (156301488 sectors)
GEOM: create disk twed0 dp=0xc491f68c
twed1: <Unit 1, JBOD, Normal> on twe0
twed1: 76319MB (156301488 sectors)
GEOM: create disk twed1 dp=0xc491fd8c
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, twed0 and twed1. I had two drives. I needed one. 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:
twed0: <Unit 0, TwinStor, Normal> on twe0
twed0: 76318MB (156299440 sectors)
GEOM: create disk twed0 dp=0xc491f68c
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:
# dd if=/dev/SOURCE of=/dev/DEST bs=8192
dd: /dev/DEST: Operation not supported
My interpretation of this is I am not allowed to access the individual drives. I no longer have twed1. All I have now is twed0. Now that I have the RAID array created, and the right devices appearing in dmesg, I can try this command:
# dd if=/dev/SOURCE of=/dev/DEST bs=8192
4886112+0 records in
4886112+0 records out
40027029504 bytes transferred in 2673.464013 secs (14971972 bytes/sec)
where SOURCE is ad0, and DEST is twed0 (note: I had used twed1 in my first attempt). 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.

  16 Responses to “Disk cloning with Acronis True Image”

  1. The only thing that I have actually seen work in this scenario, as I have come across it many times before. You have to boot the original XP disk using a seperate boot device, such as a PCI IDE Controller. Make sure the system works, then clone that drive. Replace the original drive with the cloned drive on the same IDE controller and reboot, all should be fine, then install all the drivers for the raid controller, and any new chipset drivers that came with the mainboard. After that finishes with hopefully no errors, remove the IDE controller and connect the drive as you would normally, then reboot.

    Edward Appel


    • If I understand you correctly, you mean that I should clone from the RAID controller to an IDE controller, get everything running, then move the cloned drive into the RAID controller, and rebuild the RAID from that. I wonder if that would work.

      The Man Behind The Curtain

    • Partimage is a more user friendly option than dd.

    • The reason for the boot failure is that XP is tied to the original boot driver. You changed boot controllers.

      As stated in an earlier comment, dd will work if you are just cloning disks that will run on the same controller.

      If you have a working OS, you can also attempt to get Windows to load the drivers for your new controller, then do the DD and swap the cables to the new controller. I’ve seen mixed results, I think that the OS has to mark the new boot controller as a service of type "boot", and I can’t tell you exactly how to force it.

      This is the problem with straight disk images. If you change motherboards, you may also get a new boot controller that requires drivers that aren’t on the boot disk. No bootie.

      • I concur with Bill. Windows has to see the driver for the boot device controller at startup or it will crash. If you use an integrated motherboard controller and swap motherboards with anything other than the exact model you had, Windows will stop with a 0x0000007B Inaccessible Boot Device. If you do not disable automatic reboots, the system will reboot at this point and you may or may not get a glimpse of the stop error.

        You can usually solve this error with an "in-place upgrade", that is to say booting to the original installation CD and selecting a repair installation.

        I suspect this may have been the root of the problem as I have used DD in Linux to clone hard drives running XP Pro and Home editions with no problems with IDE to SATA, SCSI to SCSI, and SCSI to SATA.

  2. RAID….



  3. backup/clone any partition (unix, linux, window$…) or whole HDD for FREE!!!


  4. Not being able to access that folder is "normal" in the MS world.
    Check out

    • If you enable system restore points, they are stored in this directory.

      It is also possible for virus infections to be backed up to this location leaving you open for future re-infection. (personal experience)

    • What? You figure dd will do what I need?

      The Man Behind The Curtain

    • I have used DD successfully to image and clone several hard drives running Windows XP Pro and Windows XP Home with no ill effects. I just specify source and target drives and no other parms.

      dd if=/dev/source_drive of=/dev/target_drive

      I have done this with IDE to SATA, SCSI to SCSI, and SCSI to SATA with no problems at all. Is it possible there was some data corruption when the syste, crashed?