UEFI vs BIOS Windows Boot Process

I have Windows 8.1 pro x64 installed. Using GPT partitioning with UEFI BIOS. Partitions are:

EFI System Partition FAT32 128 MB
Microsoft Reserved - 128 MB
Windows Boot/System NTFS 200 GB

Now, I sort of hacked this thing together with images from another installation (Did NOT use the installation disc). It boots, but is a little buggy. In an effort to streamline everything, I'm editing the boot files manually. My question is: What sort of files should be in the EFI partition, and what boot files should exist in the Windows partition, in order to allow for UEFI/GPT booting only. I do not wish to preserve legacy MBR booting.

I understand that the BOOTMGR file is/was used to boot in the MBR/BIOS system, but I'm not sure if it's needed anymore. I have been able to boot windows in the following two ways:

  1. Empty ESP partition. BOOTMGR and EFI folder with BCD file on windows partition.
  2. EFI folder and BCD file on ESP partition. Deleted BOOTMGR file on windows partition.

I know there are some .efi files needed in both the \EFI directory on the ESP partition and in the \Windows directory on the windows partition. Could anyone clarify exactly which files are required in each of [MBR/BIOS] and [GPT/UEFI] booting?

Here's my original question, in case you want to reference others' replies: http://answers.microsoft.com/en-us/windows/forum/windows8_1-system/uefi-vs-bios-windows-boot-files/45793040-bffc-49ef-8dcd-08e24a4ef8f5

Thanks.



March 21st, 2014 11:03pm

You can refer to the link below for the details about EFI partition:

http://blog.uncooperative.org/blog/2014/02/06/the-efi-system-partition/

Free Windows Admin Tool Kit Click here and download it now
March 25th, 2014 12:46pm

Right. I understand everything in that article. But is there a bootx64.efi file for each operating system on the disk, or is there only one bootx64 file, with other *.efi files for the OSs?

Back to my original question, what does the bootx64 instruct the system to do, in the case of Windows? Which files need to be on the disk in order to let Windows be bootable? From what I've experimented with so far, it seems all you need is bootx64.efi and a BCD file. What are the follow-on files that bootx64.efi calls?

By the way, that article is the one that spawned my question.
  • Edited by stormin_norman Thursday, March 27, 2014 12:18 AM more information
March 27th, 2014 3:17am

From my understanding, bootmgfw.efi (which is the same as bootx64.efi) isn't actually required on EFI hardware at all. It is a secondary boot loader which will go about and read the BCD. It is required, as I think the default (primary) EFI boot loader doesn't know anything about BCDs, but I may be wrong.

The whole process is documented here:

http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/windows-nt-6-boot-process.html

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2014 6:27pm

From that article: "For Windows NT 6, the EFI boot loader is \EFI\Microsoft\Boot\Bootmgfw.efi, which is the Microsoft Boot Manager another boot manager, which presents a second menu of boot options, read from a database file in a Microsoft-proprietary format, which in turn list boot loader programs to invoke and options to pass to them. "

So, that "database file" would be the BCD file I assume?

March 28th, 2014 7:32pm

If anybody wanders onto this site looking for the answer, here's what it is (using my best judgment and research):

First, you power on the machine. The machine loads the EFI/UEFI firmware.

The EFI firmware scans all connected drives/devices looking for an EFI System Partition (ESP). The ESP is defined by being FAT32 and having an EFI folder at the root. That's it. No GUID or other identification required. If it meets those two criteria, it will be automatically detected as an ESP.

The firmware then looks in that EFI folder for a *.efi file. If the OS has been previously booted/registered with the EFI firmware, then it will look for the *.efi file in a manufacturer's subdirectory of the EFI folder, ie "EFI\Microsoft". If the EFI firmware does not have any record of an OS, it will try to load "EFI\Boot\bootx64.efi". Not sure where it goes in the case that bootx64.efi is loaded.

However, if the firmware manages to load "EFI\Microsoft\boot\bootmgrfw.efi", the Windows bootloader, bootmgrfw.efi will look for a BCD file in its same directory. That BCD file will enumerate all the Windows installations on the disk. It will either present a menu, or load the default Windows OS.

When bootmgrfw.efi loads Windows, it looks in the root directory given by the BCD file. In this case, it'll be C:\Windows. Inside C:\Windows, we have "winload.exe" or maybe "winload.efi". One of those gets loaded and loads the kernel, etc. This is when the OS officially takes over.

So, to answer my original question, if you want to use GPT/UEFI, you need an ESP with the EFI folder and associated *.efi and BCD files. Don't need anything in C:\. If you want to use MBR/BIOS, you do not need an extra partition, but you need BOOTMGR and possibly a BCD file, located in C:\.

Free Windows Admin Tool Kit Click here and download it now
March 28th, 2014 10:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics