Today let’s dwell on how to install any modern Windows version (including Windows 7 and Windows 8) to a GPT hard disk on a PC using BIOS firmware (without UEFI support). The necessity to pull such trick arised when trying to install Windows Server 2008 R2 to HP DL380 G8 server (HP DL servers do not support EFI yet) with the size of the local array (RAID 5) over 4 TB. In a standard Windows installation to an MBR disk, only 2 TB are available, the rest space stays unallocated. The only way to use all the disk space is to convert the layout of the disk to GPT.
What advantages does GUID Partition Table (GPT), a new format of table partitioning on a hard drive, give? GPT allows to circumvent a number of restrictions of the classic MBR Partition Table. Let’s highlight the major points
- Support of the hard disks over 2.2TB (maximum available GPT disk size is 9.4 ZettaBytes (9.4 x 1021 bytes))
- Support of up to 128 partitions on the disk (only 4 partitions in MBR)
- High reliability achieved due to the duplication of the partition table with the cyclic redundancy check (CRC). Thus, the partition won’t fail if the first disk sectors are damaged.
- No need to use logical partitions prone to different errors.
Windows Boot from the GPT Partition
According to the official Microsoft documentation http://msdn.microsoft.com/en-us/windows/hardware/gg463525.aspx, all its OSs starting from Windows Server 2003 SP1 support GPT volumes as the data disks. However, only 64-bit Windows versions installed on the UEFI motherboards are able to boot from a GPT volume.
Let’s note an important fact that you always have to keep in mind: it is possible to boot Windows x64 from a GPT disk only in the UEFI-based system.
Thus, if your PC is BIOS-based and it’s necessary that it has a GPT disk, the simplest way is to add another MBR hard disk (standard or SSD), install Windows on it and then boot from this disk.
We’ll try to slightly modify this technique. To do it, we need a small sized MBR USB flash drive (64 MB at least) or an SD-card, on which Windows Boot Manager (bootmgr) is stored. The boot flash drive provides initial boot and transfer control to the loader of the main system stored in the GPT volume.
So, booting of any (both 32- and 64-bit!!!) Windows version in BIOS-based systems without EFI is supported.
Installation of Windows to a GPT Disk
Before transferring Windows Boot Manager to a separate MBR disk, we need a computer with Windows already installed on the GPT disk.
When trying to install Windows to a GPT disk in a PC without UEFI firmware, the Windows Installer returns an error:
Windows cannot be installed to this disk the selected disk is of the GPT Partition Style
In this case it is possible to install Windows 7/8 to a GPT disk only in the UEFI mode through UEFI emulation using DUET. But this mode can be used only to install 64-bit Windows versions, and the whole procedure is quite complicated as already mentioned.
Then, it is easier to install Windows to an MBR disk in the normal mode and after that convert it into GPT using gptgen.
Gptgen — Convert the Partition Table of a Disk from MBR into GPT without Deleting Partitions
The Disk Management console in Windows allows to convert an MBR disk into a GPT disk if it is unallocated or «clean». You can’t convert a disk with an OS installed.
To convert a hard disk from MBR into GPT online, you can use a small tool Gptgen that allows to convert the partition table format on the wire without disk repartitioning (with no data loss).
Download gptgen and unpack it to any directory (e. g., c:\tools\gptgen-1.1).
- Run the command line with the Administrator privileges.
- Run the command:
- Under diskpart, display all disks in the system:
- Convert the partition table of Disk 0 from MBR into GPT using the command
gptgen.exe -w \\.\\physicaldrive0. While running the command, there appears a warning that the developers do not guarantee that you are able to boot from this partition when the conversion to GPT is over.
gptgen.exe: Partition table converter v1.1
Boot: 1, Type: 0×7, Start: sector 2048, Length: 204860 sectors
Boot: 0, Type: 0×7, Start: sector 206858, Length: 83685636 sectors
WARNING: Boot partition(s) found. This tool cannot guarantee that
such partitions will remain bootable after conversion.
Do you want to continue? [Y/N] y
Writing primary GPT and protective MBR to LBA address 0…
Writing secondary GPT to LBA address 83786657…
Transfer of Windows Boot Manager to the USB Flash Drive
Restart the computer and make sure that the system doesn’t boot from the hard disk. Excellent! Connect a USB flash drive or an SD card. Boot from the installation CD/USB disk with Windows (Windows 7 in our case), and press Shift+F10 on the Windows installation screen for opening the console:
- Run the command:
- Display the list of the disks in the system:
list disk. Now there are two disks in the system: Disk 0 is a 40 GB hard disk with the OS installed (* the column gpt shows that this disk contains this type of partition table) and Disk 1 is a 1 GB USB flash drive.
- Let’s dwell on the disks and their letters. Select a hard disk:
select disk 0and display the list of volumes on it:
list volumeAccording to the size of volumes, you can see that the system is installed on the Volume 2, which has letter D assigned (it can differ from the letter of the system disk, displayed by Windows itself)
- Create the necessary partitions on the USB flash drive:
select disk 1select a USB flash drive
cleanclear disk contents
create partition primary size=1000create a main partition on the USB flash drive, 1 GB in our case
select partition 1select the first partition on the USB flash drive
activemark it as active
list volumedisplay the list of volumes again. In this example, you can see that the volume that we have created is No. 3
select volume 3select it
assign letter=Gassign any free letter to it, e.g., G
list volumemake sure that letter G has been assigned to the partition on the flash drive
exitExit from diskpart
- Copy the files of the boot environment to the USB flash drive:
bcdboot d:\Windows /l en-us /s g:
- Write the boot code to the USB flash drive to provide bootmgr (Windows Boot Manager) startup:
bootsect /nt60 G: /mbr /force
Go to BIOS and change the booting order so that our USB flash drive or SD card come first. Save the changes. If you have done it right, the system should boot correctly. You can make sure that Windows 7 is on the GPT partition in Disk Manager (diskmgmt.msc) by opening system disk properties. In the Volumes tab, you can see that the type of the partition table is GPT (Partition style – GUID Partition Table)
This method of Windows Boot Manager transfer to a separate flash drive allows to use all GPT advantages and make use of the whole size of your hard disk (over 2.2 TB) in BIOS-based systems (without UEFI). This trick can be performed in the following (even 32-bit) Windows versions:
- Windows 8, Windows 8.1, Windows Server 2012 / 2012 R2
- Windows 7, Vista, Windows Server 2008 / 2008 R2
- Windows Server 2003 SP1 / 2003 (64-bit)
- Windows XP x64