I have a BIOS-based system running Windows 7 on a MBR partitioned 1TB HDD. This HDD is partitioned as following:
- P0: 60 GB NTFS for Windows and Program files
- P1: 940 GB NTFS for data
As this disk is going to be full, my purpose is to migrate the existing installation to a new 3TB HDD, with following partitions:
- P0: 60 GB NTFS the same as 1B/P0
- P1: 2940 GB NTFS with the content of 1TB/P1, plus more free space
As this partition is > 2TB, MBR cannot handle them and I switch the 3TB HDD partition table to GPT but:
- Windows 7 cannot boot from BIOS+GPT systems
So I investigated here and seems that GRUB is able to boot Windows 7 from GPT disks with a trick: a virtual HDD file (VHD) MBR formatted that contains the Windows boot files that, once loaded, load Windows from the GPT partition.
So I did the following:
- P0: special GRUB 1MiB partition for GPT systems (see here, installed by grub-install from a live Linux image)
- P1: 120MiB ext2 partition to host GRUB files (grub.cfg f.e.) and the bootmgr.vhd files
- P3: 60 GB NTFS partition where I copied all 1TB/Partition 0 files
- P4: 2940 GB (or a bit less) NTFS partition where I copied all 1TB/Partition 1 files
In the VHD there's an MBR NTFS partition with the Windows boot files generated with commands:
bootsect /nt60 b: /mbr
bcdboot c:\Windows /s b: (NOT with /mbr flag as it's a GPT disk)
where B is the VHD file and C is a Windows 7 x64 installation running on a VM. The VHD partition is set as primary and active.
To avoid also some other issues, I generated also in the new 3TB/P3 the boot files with:
bootsect /nt60 e:
bcdboot c:\Windows /s e:
Where E is the 3TB/P3 partition.
I tried booting with grub using this manually edited grub.cfg:
menuentry "Win7 root+chain" {
set root=(hd0,gpt3)
chainloader +1
}
menuentry "Win7 vhd+chain" {
loopback loop (hd0,gpt2)/boot/bootmgr.vhd
chainloader +1
}
The first give me a Windows Boot Manager message:
"Error 0xc000000e File:\Boot\BCD Message: An error occoured while attempting to read the boot configuration data"
The second seems a Grub message
"Invalid signature"
May you please help me? I'm doing something wrong with Grub?
As this partition is > 2TB, MBR cannot handle them
true and false. MBR can handle a limited number of addresses. With 512 byte sectors this means it maxes out at 2TiB. With 4K sectors (and any modern drive should have those) it maxes out at 16TiB.
Secondly:
But windows can happily boot from BIOS & MBR systems and it can access GPT partitioned disks. So you could use the 1TB disk as bootdisk (MBR partition scheme) and add the 3TB disk as data disk (either with MBR partition scheme or if it is a really old disk with the GPT scheme)
– Hennes Dec 12 '16 at 13:44loopbakcfor the second entry? – Seth Dec 12 '16 at 14:23