I had been dual booting my laptop ( Sony Vaio-VGNCR26B ), with the two os's being Win7 and Ubuntu 12.04 LTS ( I think this is referred to 12.04.1 LTS now ). Previously, I had been able to boot the native windows using VBox. Out of curiosity, I decided to move to a bare-metal hypervisor, like Xen.
First, I cloned the whole 160 GB drive to make sure I did not lose anything. Then I separately cloned the Windows partition using Clonezilla. Wiped the hdd clean, and installed Ubuntu 12.04.2 LTS over LVM. ( Note: I gave Ubuntu 9 Gb of space ). After, logging into the the new system, I downloaded, built and installed Xen 4.2.0. Finally, I built a VM for Windows 7.
I then installed Win7 on the new 120 Gb logical volume created for windows. This created two partitions inside the logical volume. The 100MB or so System partition which stores the \Boot folder and the other partition is given to the Root filesystem. After a successful install, I restored the saved Windows image, using partclone, over the current root partition. During, the clone operation I saw that the source image ( the partition ) was 117 GB while the destination partition was 120 Gb.
After the clone operation was completed, I was left with a Windows virtual machine which gets to the starting windows screen and then stops with a BSOD ( STOP: 0x0000007b ). Advanced boot options donot help, as it simply states I must try System restore with a rescue disk. Booting into Win7 Rescue mode and executing Bootrec /fixboot ( or /fixmbr ) does not help. Interestingly, Bootrec /ScanOs shows 0 Windows installations. All of these errors point to an invalid partition table. Even though I can mount the partition under linux without any issue and Windows system rescue can see the partition. I have tried also switching on drivers from the registry by setting the Start value for all keys with "Scsi Miniport" reference to 0 ( 0h ). I have also checked if the drive signature was the issue but the signature in the registry and the disk uniqueid are equal.
So, does someone know of any techniques to fix the disk geometry ? Would it destroy the data on the VM ? How should I clone the 117 GB partition onto the 120 GB "drive" ?
I thank you in advance for your time answering my query!
Please note: All my data is backed up. So destructive techniques are fine, but any good practice tips will be much appreciated.