boot - Installing Windows 7 on GPT

  • fox

    I have an HP 566 with Windows 8 installed. I removed it, and I wanted to install Windows 7. I have problems installing Windows 7.

    In BIOS I can choose two boot modes:

    1. Legacy boot mode
    2. UEFI boot mode

    If I chose the Legacy boot mode for some strange reason all of my Windows CDs stop booting at a certain point.

    If I choose UEFI mode I enter the installation process, but cannot install Windows on the drives because they are GPT type. I tried converting them using diskpart, and I got an error that disks cannot be converted.

    How to proceed? I am really stuck here.

    If it makes things easier, Windows XP can also be installed.

  • Answers
  • Rod Smith

    Windows locks its boot mode to its partition table type:

    • BIOS boot or installation works if and only if the disk is MBR
    • UEFI boot or installation works if and only if the disk is GPT

    Therefore, if Windows complained that the disks were GPT, the installer was booted in BIOS mode, not in UEFI mode, no matter what boot mode you selected in the firmware. This can happen because some UEFIs use the boot mode you specify as more of a suggestion than a requirement; if you say "boot in UEFI mode," it'll try that, and if it can't, it will drop back to a BIOS-mode boot. My suspicion is that this is what's happened to you.

    You could look for other firmware options related to the boot mode. Since the computer originally held Windows 8, chances are it had Secure Boot enabled, and that might explain the problem -- the firmware would try a Secure Boot with UEFI, fail, and then drop back to a BIOS-mode boot. (Really it shouldn't drop back to BIOS mode in that case, but I've seen other UEFIs do this.) If this hypothesis is correct, you may be able to fix the problem by going into your firmware and disabling Secure Boot. Unfortunately, the user interfaces vary so much that I can't say precisely how to do this; you'll just have to dig around until you find the appropriate option.

    If that fails, you may need to tweak your installation medium, since they can be flaky on some computers. This can get a little tricky, but check the "Booting Windows Under DUET" section of this page. You can ignore the stuff on DUET (which is a way to run an EFI implementation as a sort of boot loader on a BIOS-based computer) and follow the numbered list for information on creating a bootable USB flash drive with the Windows installer. Copy the bootmgfw.efi file to EFI\BOOT\bootx64.efi to get it to boot automatically rather than manually selecting it, which DUET supports but your firmware might not.

  • Related Question

    How to install Windows 7 x64 on GPT?
  • Dani

    How can I install Windows 7 x64 on GUID partition table? My motherboard has UEFI. I tried using Ubuntu to create the GPT and NTFS partition on it, but Windows 7 just says

    Windows cannot be installed to this disk. The selected disk is of the GPT partition style

    I found this: Use the Diskpart.efi Utility to Create a GUID Partition Table Partition on a Raw Disk in Windows – but all diskpart commands in it don't work, it seems its a different version of diskpart.

    How can I make this work?

  • Related Answers
  • JdeBP

    Microsoft erroneously conflates has an EFI partitioned hard disc with has EFI firmware. This is, of course, clearly wrong. It's quite possible — and indeed is becoming ever more desirable these days — to have an EFI partitioned disc on a machine that has old non-EFI firmware.

    Moreover, as of revision 2.3.1 of the UEFI Specification, the EFI partition table has a "startable" attribute defined for partitions and it is possible to even bootstrap from EFI partitioned discs on a machine that has old non-EFI firmware. Old-style PC98 MBR bootstrap programs can look for partitions marked with the "startable" attribute in the EFI partition table and bootstrap the flagged partition's Volume Boot Record bootstrap program in the old PC98 way.

    There are only two sources of such EFI-partitioning-aware MBR bootstrap programs right now:

    • I've written and published one.
    • The so-called "GPT" MBR boostrap in SYSLINUX, written by H. Peter Anvin, is another.

    One of the several consequences of Microsoft's error is that if the Windows NT 6.1 install disc is bootstrapped in the old PC98 way, as you've done, the Windows NT 6.1 installer will think that there's old PC98 firmware, and so declare that it cannot be installed to EFI partitioned hard discs. The Windows NT 6.1 installer has to be invoked from an install medium that has in turn been bootstrapped from new EFI firmware, in order for it to accept the idea of installing Windows NT 6.1 to a disc partitioned with the new EFI partitioning scheme.

    As the Microsoft documentation explains, the installation CD-ROM is in fact dual-boot. A machine with old PC98 firmware will bootstrap one operating system image and installation program; and a machine with new EFI firmware will bootstrap another. A machine with a compatibility support module can bootstrap an installation medium either way. One has to instruct one's firmware to bootstrap the installation CD-ROM in the right way, the new EFI way.

    As Rod Smith explains, one can also, alternatively, manually construct a non-dual-boot Windows NT 6.1 install disc that only bootstraps in the new EFI way.

    Further reading