I tried lots of free disk imaging tools - they all do not work with Windows Vista and 7 because the NTFS filesystem got new functions that these tools do not fully support.
Therefore I bought Norton Ghost 15, which works better.
My Notebook has a pre-installed Windows Vista. I created a backup of it and then tested the recovery procedure on another completely wiped harddisk. The recovered Windows was not able to boot, with no helpful error message. After hours of playing with different settings I found the simple Solution:
Before you recover a Windows Vista or 7, you have to create a valid Windows MBR on the harddisk. This is required because after restoring the Windows partition, Ghost has to recover the GUID number which is stored in the MBR. If the harddisk has not a valid Windows MBR, then Ghost does not reciver that ID number, and then Windows will not boot.
How to create a valid MBR:
Boot from a Windows installation DVD. If you do not have such a DVD, then download a startup recovery CD for the correct Windows version from the website of your favorite computer magazine. This CD is a free gift of microsoft for people who bought a computer with a pre-installed windows without installation disks.
Open the recovery menu, and run a command window. In the command window, enter
bootrec /fixmbr
If you have created a valid MBR and recovered your Windows partition but the BIOS says "Operating system not found" or so, then you need to activate the C: partition as bootable. Ghost should do this automatically but sometimes, you must do it manually. You can use the related menu option of the bootable Ghost CD or execute the following commands in the command window of the Ghost CD or of the Vista installation DVD:
diskpart
select disk 0
show partition
select partition 1 (or whatever is your windows partition)
active
exit
More background info:
The GUID is checked by the boot menu which is located in the c:\boot directory opf your windows partition. If the GUID of the MBR does not match the GUID of the boot configuration (which is stored in the hidden binary file c:\boot\BCD), the system simply does not boot, usually without any error message.
When you create an MBR the first time on a new or wiped harddisk, a random GUID gets written into the MBR. However, if you update the MBR later, for example by entering "bootrec /fixmbr" the existing number will not be changed.
Ghost modifies this number when recovering a Windows system partition so that it matches the number that was present at the time when the backup was made.
Some websites say that you can also use the tool bcdedit to modify or re-create the boot menu configuration, so that it accepts a new (wrong) GUID number from the MBR. But be warned: changing the GUID destroys the Windows license and also the license of some other installed programs. Windows will only run a few days and then refuse to work until you call the Microsoft hotline to fix that issue for you. In case of pre-installed Windows, your license does not include Support, so they will not help you!
Another issue that may happen with pre-installed WIndows is that it looses some files and settings when you change the GUID. On my computers, Windows behaved as if I switched the computer on for the very first time. It started with an empty desktop and told me that it is preparing for the firt start. But then a write error message appeared and the initialisation stopped. I reproduced that several times.
So be warned: Do not modify the GUID of your Windows installation.
If you are using Linux or any other software that replaces the MBR of Windows by some other boot loader, then please be prepared that you have to overwrite that boot loader by a windows MBR before you can recover a windows partition using Ghost. You will need to recover the overwritten boot loader later. Before you simply overwrite your existing boot loader, check if you have a working procedure at hand how to restore it.
Some people make simple binary backups of their MBR (boot loader). In linux, the related command is:
Backup: dd if=/dev/sda of=/any/path/mbr.bak bs=512 count=1
Restore: dd if=/any/path/mbr.bak of=/dev/sda bs=512 count=1
But that restore will also overwrite the partition table and the GUID. Such a backup/restore of the MBR is only useable, if it contains already the correct GUID and if you did not change the disk or partitions between backup and restore.
Linux users typically use the bool loader Grub2. The website of Grub2 describes how to recover the booloader. This procedure does not touch the GUID number (luckily), even if that is not specially highlighted in the Grub2 manual.
So, to summarize all that, do the following to ensure you can properly recover Windows:
1) If you need a non-windows boot loader and still need it, prepare to re-install it later.
2) Boot from a Windows installation CD and enter "bootrec /fixmbr".
3) Recover the Windows partition using Ghost
4) If required, reinstall the non-windows boot loader, but make sure not to modify the GUID inside the MBR.
If you still want to modify the GUID in the windows bootloader to let it accept a modified MBR, then read this article:
http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD
But let me warn you again: This procedure breaks the license making your Windows unuseable, except if you have a special license that allows GUID changes (some large companies have such a license).