-   Linux - General (
-   -   Problem to boot with grub into windows7 after ntfs partition clone (

froff 10-11-2012 04:34 AM

Problem to boot with grub into windows7 after ntfs partition clone
I had W7 installed on primary partition of second hdd and I was (and still I am) able to boot W7 with grub located in mbr of first hdd.
Now I decided to move W7 to first hdd (those with grub in mbr and linux installed). Due to lack of place in primary partition table I put it to extended partition (I don't know if it matters).
I made ntfs partition copy just with dd and after that I resized file system a bit with gparted to fit new partition size.
Then I updated grub and modified uuid of new ntfs copy (I can't remember in what order).
After that I marked new partition as "boot"
New partition is accessible with ntfs3g and everything looks ok.
But when I'm choosing in grub menu after reset to boot "new" windows it still boots from second hdd (old W7 installation). System disk is "C:" and all system paths has "C:" in them. New ntfs copy appears as "D:"

In grub.cfg I have entries as follows:


menuentry "Windows 7 (loader) (on /dev/sda5)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root F6E8D3BCE8D37977
        chainloader +1

menuentry "Windows 7 (loader) (on /dev/sdb1)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd1,msdos1)'
        search --no-floppy --fs-uuid --set=root F6E8D3BCE8D37977
        chainloader +1

/dev/sda5 is new one /dev/sdb1 is old one;
the same root uuid looks strange but maybe I updated grub before modified uuid on new copy.
So I decided to replace uuid on first entry with proper uuid of new partition.
After that windows does not boot when first entry choosen.
I have blank screen with cursor in left upper corner.

What can be the reason and how to repair it?
I'm not sure if problem lays on grub configuration or on moved windows boot sector. Or maybe on fact that new partition is not primary?

Wim Sturkenboom 10-11-2012 06:49 AM

Parts of windows require a primary partition :D

Maybe can be of help.

this was my search: windows logical partition; there might be other useful links in there.

TobiSGD 10-11-2012 06:49 AM

The Windows bootloader knows of UUIDs and serial numbers of disks to determine which is the disk to boot from.
Start the recovery console from your Windows 7 disk and launch the command

bootrec.exe /fixboot
This should fix the problem.

froff 10-12-2012 05:43 AM

Unfortunately no effects.
Windows recovery console cannot be started because installer can't see new windows partition.
So I "converted" it manually with fdisk to be primary. Partition is still OK, mountable under linux and gparted shows no warnings.
After that, windows installer in "repair" mode shows it but says that it has zero length :)
However now it is possible to start recovery console.

bootrec.exe /fixboot
does it's job and announces success.
But nothing changes on boot. Blank screen.
Updating grub does not change anything.
Giving it last chance I copied original windows

I know that this is problem ;) rather than here, so I don't ask for further help.
Finally I decided to leave windows as it was - on second hdd.
Windows7 sucks! Some time ago I duplicated Windows XP installation without such problems.

All times are GMT -5. The time now is 05:21 AM.