Posted on April 17, 2014 · Posted in Windows 7

Booting Windows 7 from a GPT Disk Using BIOS (non-UEFI)

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.

GPT Advantages

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

  1. Support of the hard disks over 2.2TB (maximum available GPT disk size is 9.4 ZettaBytes (9.4 x 1021 bytes))
  2. Support of up to 128 partitions on the disk (only 4 partitions in MBR)
  3. 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.
  4. No need to use logical partitions prone to different errors.

Windows Boot from the GPT Partition

According to the official Microsoft documentation, 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.

Tip. There are several hacks that allow to boot Windows 7/8 x64 in BIOS firmware from a GPT disk. To do it, you have to use a boot disk containing DUET (Developer’s UEFI Environment) simulating EFI or convert your disk into hybrid MBR mode (hybrid mbr) with the Linux tool gdisk. However, in both cases the procedure is quite complicated and requires good knowledge of Linux.

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.

Important! Your system should support boot from a USB flash drive or an SD-card in BIOS

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

Windows cannot be installed to this disk the selected disk is of the GPT Partition Style

Tip. You can convert a disk from MBR to GPT with all data loss by pressing Shift+F10 on the Windows installation screen. And execute the following commands:
select disk 0 if there is one hard disk in the system
clean clear disk contents
convert gpt convert the partition table to GPT

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).

Important! Before conversion we strongly recommend to copy all critical data to the external drive. Though I have never seen a failure of this tool that results in the total crash of the file system, I do recommend all users to save important data before conversion not to claim the author of the article afterwards.

Download gptgen and unpack it to any directory (e. g., c:\tools\gptgen-1.1).

  1. Run the command line with the Administrator privileges.
  2. Run the command: diskpart
  3. Under diskpart, display all disks in the system: list disk  diskpart check gpt disk status In this example, there is one 40 GB disk with 0 index (Disk 0) in the system. As you can see, this disk has a standard MBR partition table (GPT column is empty)
  4. 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. 

  Note. 0 at the end of the physicaldrive shows that disk 0 should be converted. 

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…

gptgen online convert disk from mbr to gpt
Thus, the conversion of partition table into GPT has been successful!

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: diskpart
  • 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.list disk with diskpart
  • Let’s dwell on the disks and their letters. Select a hard disk: select disk 0 and display the list of volumes on it: list volume list volumes According 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 1 select a USB flash drive
    clean clear disk contents
    create partition primary size=1000 create a main partition on the USB flash drive, 1 GB in our case
    format format it
    select partition 1 select the first partition on the USB flash drive
    active mark it as active
    list volume display the list of volumes again. In this example, you can see that the volume that we have created is No. 3
    select volume 3 select it
    assign letter=G assign any free letter to it, e.g., G
    prepare usb flash drive for boot
    list volume make sure that letter G has been assigned to the partition on the flash drivelist volume again
    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
  • Restart

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)

windows 7 boot from gpt volume

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

Related Articles