Today let’s dwell on how to install / boot any modern version of Windows (including Windows 7 and Windows 10) on an outdated computer with a BIOS firmware (that does not support the modern UEFI environment) with a hard disk that use a GPT partition table. The need to perform such a trick has arisen when I tried to install Windows Server 2008 R2 on HP DL380 G8 server (HP DL servers do not support EFI yet) with local disks with a total capacity of more than 4 TB in RAID 5. In a standard Windows installation on an MBR disk, only 2 TB are available in the system.. You cannot allocate or access the remaining 2 TB of the disk space for Windows. The only way to take advantage of all available disk space is to convert disk layout to GPT format.
This article describes how to configure Windows to boot from a hard disk that is marked in the GPT partition table on a computer with classic BIOS (non-UEFI) or in the Legacy BIOS mode. The Windows operating system can not boot from GPT disks on old BIOS systems. To work around this limitation, we will move the Windows bootloader (BCD) to a separate small USB flash drive (or HDD drive) with the MBR partition table. This flash drive will only be used to start the Windows bootloader, which then must transfer control to the main Windows image located on the disk with GPT partition table. The instruction is universal and should work both in Windows 7 and Windows 10 and in any other supported x86 and x64 Windows editions.
Advantages GPT over MBR
What advantages does GUID Partition Table (GPT), a new format of table partitioning on a hard drives, gives? GPT allows to bypass a number of limitations of the classic MBR Partition Table. Let’s highlight the major points:
- Support for hard drives over 2.2TB (maximum available GPT disk size is 9.4 ZettaBytes (9.4 x 1021 byte));
- Support for up to 128 partitions on the disk (only 4 partitions in MBR available);
- High reliability achieved by duplicating the partition table at multiple locations on the disk and verifying the partition table using cyclic redundancy check (CRC). Thus, the disk partition structure will not be lost if the first disk sectors are damaged;
- No need to use logical partitions subject to various errors.
Booting Windows from a GPT disk
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 volumes with GPT markup as the data disks. However, only 64-bit Windows versions installed on motherboards supporting the new UEFI specification (Unified Extensible Firmware Interface) are able to boot from a GPT volume. Thus, it will not be possible to install or boot Windows from a GPT disk on older computers with classic BIOS firmware.
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 on the UEFI-based system.
Thus, if your PC is BIOS-based and you need to have a disk containing a GPT partition table, the easiest 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 will need a small USB flash drive or an SD card (64 MB at least) with MBR markup, on which small Windows Boot Manager (bootmgr) is placed. This bootable USB flash drive provides initial boot and transfer control to the bootloader of the main system located on the GPT volume.
So, booting of any (both x86 and x64!!!) Windows version in BIOS-based systems (without EFI) is supported.
Installing Windows on a GPT disk on a BIOS PC
Suppose we have a computer with BIOS (not-UEFI firmware), which hard disk using a new GPT partition table. When you are trying to install Windows on a GPT drive of such a computer, the Windows Setup returns an error:
Windows cannot be installed to this disk the selected disk is of the GPT Partition Style
Diskpart
select disk 0
if there is one hard disk in the systemclean
clear disk contentsconvert gpt
convert the partition table to GPTIn this case, it is possible to install Windows 10 /8.1 / 7 to a GPT disk only in the UEFI mode through UEFI emulation using DUET. But this mode can be used to install only 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: Converting MBR to GPT without Deleting Partitions
The Windows Disk Management snap-in allows you to convert an MBR disk into a GPT 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 change the partition table format on the fly without having to delete all partitions of the disk (without data loss).
Download gptgen and unpack it to any directory (e. g., c:\tools\gptgen-1.1).
- Run the command prompt with the Administrator privileges;
- Run the command:
diskpart
- Under diskpart, display all drives in the system:
list disk
- Convert the partition table of Disk 0 from MBR into GPT using the command
gptgen.exe -w \\.\\physicaldrive0
While running the command, you will face a warning that the developers do not guarantee that you will be able to boot from this partition when the conversion to GPT will be finished.
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…
Success!
Thus, the conversion of partition table into GPT has been successful!
Moving the Windows Bootloader to the USB Flash Drive
Restart the computer and make sure that the BIOS can not boot from the hard disk with the GPT table. Excellent! Plug in a small USB flash drive or an SD card. Boot from the Windows installation (DVD/USB) media with (suitable Windows 10 or Windows 7 installation image), and press Shift+F10 on the Windows Setup screen to open the command prompt:
- 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 (* in the Gpt column shows that this disk contains the GPT partition table) and Disk 1 is a 1 GB USB flash drive. - Let’s dwell on the disks and assigned letters. Select your HDD:
select disk 0
and display the list of volumes on it:list volume
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 a partition 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 fs=fat32
(format the partition in the FAT32 file system. Do not use the NTFS file system for USB flash drive, because the system will not be able to boot from such partition)
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
list volume
make sure that the partition on the flash drive is assigned the letter G:
exit
Exit diskpart - Copy the Windows boot environment files from the system volume to the USB flash :
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 boot order so that your 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 your Windows is located on the GPT drive. Open Disk Manager (diskmgmt.msc) and select 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 USB 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 with the following (even x86) Windows versions:
- Windows 10 / Windows Server 2016
- Windows 8, Windows 8.1, Windows Server 2012 / 2012 R2
- Windows 7, Vista, Windows Server 2008 / 2008 R2
- Windows Server 2003 SP1 / 2003 (x64)
- Windows XP x64
You also need to understand that every time you turn on / reboot your device, your USB flash drive with the MBR table and the bootloader on it must be plugged into the computer, otherwise Windows will simply not boot.
According to the available information, some models of older computers with BIOS cannot work with GPT drives at all, such disks are simply not recognized during CMOS.