I did this successfully for XP, but with 7, it results in an error which I'd quote at best "An unknown Windows error occurred"

I'm doing this on VirtualBox, this is what I did --

1) Remove all entries in HKEY_LOCAL_MACHINE\SYSTEM\MountedDevice
2) Run the batch file in mergeide so Windows forgets about the hard disk controller on which it was installed.
3) ntfsclone Windows partition.
4) make a new partition which's second in number (/dev/sda2, /dev/sda1 will be the boot partition where grub will be installed); restore using ntfsclone.
5) Run Windows 7 installation DVD and execute command bootrec /restorebcd to make the bcd (equivalent of grub.cfg/menu.1st/boot.ini) point to the new partition (Whatever it be A, B, C, D, E, F....Z).

Now, after booting Windows (via super grub disk), I get --

A disk read error occurred
Press alt+cntrl+del to restart

In Windows proprietary font. This error message gave me a lot of Windows 8 related results.

Naturally, the only thing that could've gone wrong are the BCD entries, I tried modifying the osdevice/device entries in it using bcdedit, but then again, it results in an error which I'd quote at best "An unknown Windows error occurred"; to be specific --

BCDEDIT - an error has occurred setting the element data

Even after running bootrec, the BCD file still has osdevice and device entries set at partition=c:

IIRC boot.ini used to have a path for the drive/partition. Also, IIRC, it would be a different error if the partition weren't the active boot partition.

Ah, seems they've yet again made unnecessary changes and have replaced that file.

Oh, wait. Second partition? In a past life, wasn't Windows limited to booting from the first partition? I recall needing to configure Windows to hand off booting to Linux, but Windows had to be first. Was that fixed?_________________The whole system has to go. The modern criminal justice system is incompatible with Neuroscience. --Sapolsky

In my quest of migrating Windows (one of the the world's oldest and most popular Desktop OS, owned by the world's largest and most wealthy technology (=Windows) company) I encountered a verity of errors belonging to the family "Unknown Windows error" which manifested itself in very of ways.

Cause of Windows (one of the the world's oldest and most popular Desktop OS, owned by the world's largest and most wealthy technology (=Windows) company) lacking the logging capabilities, I've decided to compensate by logging errors prominently belonging to the "Unknown Windows error" category.

As stated, the backed up Windows 7 install will only work if installed on the first primary partition only, but this time even that failed to work on a box on which I'd previous migrated the same Windows install, giving an "Unknown Windows error" occurred and suddenly rebooting; however, starting from the last known good configuration worked.

On another old PC having an Nvidia chipset, "Unknown Windows error" occurred happens way too early while the 'glasses' of the window start to appears; it reboots with "Unknown Windows error" occurred.

But lets investigate what happens when I'm try to rebuild the BCD entries of the freshly migrated Windows install using the Windows 7 recovery disk (downloaded), cause the installation disk is incapable of doing that.

I've 2 hard drives in this old PC, and it's a well known bug since Windows 95 days and till Windows 8 days that Window installer fails to install with "Unknown Windows error" in case a user has more than 1 HDD installed; to fix this Windows error (one of the the world's oldest and most popular Desktop OS, owned by the world's largest and most wealthy technology (=Windows) company) which has lasted for more than 1 1/2 decades, I remove hard drive with 2 Linux installs none of whom give errors belong to the family "Unknown Windows error" or in that case "Unknown unix error" (this family of errors doesn't exist) regardless of the uncountable number of times I've migrated a Linux install (product of non-profit organization having a very limited budget and used in the rarest of the rare Desktop).

Since I was not installing, but restoring the Window install using ntfsclone, I was attempting to fix Windows boot by rebuilding the BCD entries using the bootrec.exe /rebuildbcd command where I encountered "Unknown Windows error" penetrating to the incapability of Windows (one of the the world's oldest and most popular Desktop OS, owned by the world's largest and most wealthy technology (=Windows) company) to detect a Windows install in case of multiple hard drives.

But the Windows Enterprise installation disk, (one of the the world's oldest and most popular Desktop OS, owned by the world's largest and most wealthy technology (=Windows) company) at one time, the most expensive and best Windows product did not appear to have the 'bootrec.exe' binary, or atleast I could not find it probably cause Windows (one of the the world's oldest and most popular Desktop OS, owned by the world's largest and most wealthy technology (=Windows) company) does not have anything resembling the PATH variable.

As a result, I tried to rebuild the BCD entries using the fanboy (aka Bill Gates dog) built Windows 7 rescue CD after removing the HDD with 2 Debian OSs installs; in case I did not remove the HDD, neither the Windows 7 (one of the the world's oldest and most popular Desktop OS, owned by the world's largest and most wealthy technology (=Windows) company) installation or rescue CD did not detect any Windows installation, and running bootrec.exe /rebuildbcd did detect the OS, but when typing a 'Y' to accomplish the task resulted in "Unknown Windows error".

Strangely, after removing the HDD, the Windows 7 installation/rescue disks did detect the OS, but after detection a window popped up saying it was 'searching for os', but I could see it had already detected the OS, but was still searching for it. Yet more strangely, it did not show a 'searching' window when a search WAS required, i.e. the OS was not detected.

There was an option to 'fix startup' (or replace any other bootloader with Windows bootloader to ensure only Window starts), but cause I didn't want the GRUB MBR to be overwritten, I just did a rebuildbcd, but in case I do a 'fix startup' by clicking one of those grey buttons, bootrec.exe encounters an "Unknown Windows error" and is not able to detect an OS every again.

Finally, after rebuildbcd, Windows BOOTLOADER stopped showing "Unknown Windows error" and starting it via grub, the Windows logo started to appears, but soon after "Unknown Windows error" occured, and the machine reboots just as the 'glasses' of the Window appear.

I posted about this on one of the many Windows 7 forums around filled with Bill Gates Labradors and their caretaker (MS MVP) but they just gave me generic instructions and did not ask for any error codes (maybe cause they assume all Windows errors to be of the class "Unknown Windows error") and had a hard time believing that the installation was virus-free.

But finally I myself fixed the problem without requiring any help from Bill Gates Labradors cause all they were giving were copy-paste generic advice (re* -> re-install, re-boot, re-format).

The thing had to be moved across different hardware and I succeeded. Actually I made a generic Windows 7 install and I think I deserve a Noble prize for it._________________Buy from companies supporting opensource -- IBM, Dell, HP, Hitachi, Google etc...
Disfavor companies supporting only Win -- Logitech, Epson, Pioneer, Kingston, WD, Yahoo, MSI, XFX, Huawei
My blog

1) Remove all entries in HKEY_LOCAL_MACHINE\SYSTEM\MountedDevice
2) Run the batch file in mergeide so Windows forgets about the hard disk controller on which it was installed.
3) ntfsclone Windows partition.
4) make a new partition which's second in number (/dev/sda2, /dev/sda1 will be the boot partition where grub will be installed); restore using ntfsclone.
5) Run Windows 7 installation DVD and execute command bootrec /restorebcd to make the bcd (equivalent of grub.cfg/menu.1st/boot.ini) point to the new partition (Whatever it be A, B, C, D, E, F....Z).

Can this be done with the m$$ partitions on linux?

If step ONE, the machine don't crash for step TWO?

Can you give more details about step THREE? ntfsclone seems to be a linux utility.

What if the cloned install needs to be on a different machine? Could you provide the steps?

When installing into o new machine, does the hard drive need to be without any type of formating?