How to Create EFI System and MSR Partitions

SITUATION

The EFI partition (similar to the System Reserved partition on drives with the MBR partition table) stores the boot configuration store (BCD) and several files needed to boot Windows. When the computer boots, the UEFI environment loads the bootloader file (EFI\Microsoft\Boot\bootmgfw.efi) from the EFI System (ESP) partition and transfers control to it. The bootmgfw.efi executable launches the Windows Boot Manager, which loads configuration data from the BCD. Once the BCD is loaded, Windows starts booting via winload.efi.

windows boot manager

When a UEFI computer boots, it looks for the EFI system partition on all attached drives. If the EFI partition is deleted or corrupted, you won’t be able to boot Windows from that drive. A UEFI error will appear could not locate \efi\boot\bootx64.efi – not found or an empty UEFI Shell prompting you to select a boot device.

Also, you won't be able to boot Windows if the EFI partition is formatted with the NTFS file system. Even then performing a clean Windows installation, you will receive an error:
Windows detected that the EFI system partition was formatted as NTFS. Format the EFI system partition as FAT32, and restart the installation.

SOLUTION

Boot from the installation media and press the Shift + F10 key combination on the first installation screen. A command prompt window should open:

DISKPART> list disk
DISKPART> select disk 0
DISKPART> list partition

list disk
list partition

  • MSR partition — 16 MB
  • Windows system partition — 39 GB
  • Recovery partition – 541 MB

As you can see, the EFI partition (may be called System) is missing (has been deleted).

You can now manually create the EFI and MSR partitions to place the Windows bootloader files. To do it, run these commands in the diskpart context one by one.

Select the disk:
DISKPART> select disk 0

Create a 100 MB EFI partition:
DISKPART> create partition efi size=100

Make sure that the 100 MB partition is selected in diskpart (an asterisk before Partition 1). Format your EFI partition with FAT32 file system, and assign a drive letter to it:
DISKPART> list partition
DISKPART> select partition 1
DISKPART> format quick fs=fat32 label="System"
DISKPART> assign letter=G

Now you need to create a 16MB MSR partition (for Windows 10 or 11).
DISKPART> create partition msr size=16
DISKPART> list partition
DISKPART> list vol

In my case, the drive letter C: is already assigned to the main Windows partition. If it’s not, assign the drive letter to it as follows:
DISKPART> select vol 1
DISKPART> assign letter=C
DISKPART> exit

create partition

Now use the bcdboot.exe tool to copy the UEFI boot environment files from the Windows system directory to the EFI boot partition and recreate the BCD bootloader configuration. Run the command:

X:\Sources> bcdboot c:\windows /s G: /f UEFI
Boot files successfully created.

List the current Windows Boot Manager bootloader configuration. An entry should appear in the {bootmgr} section pointing to the partition containing the UEFI boot control file (\EFI\MICROSOFT\BOOT\bootmgfw.efi). In this example, it is partition=G , or partition=\Device\HarddiskVolume2 (if you haven’t assigned a drive letter for the EFI partition).

The UEFI bootloader must then pass the control to the Windows Boot Loader file \Windows\system32\winload.efi on partition=C:

bcdedit

Problems

An error may appear when creating an EFI or MSR partition using diskpart:

No usable free extent could be found. It may be that there is insufficient free space to create a partition at the specified size and offset. Specify different size and offset values or don't specify either to create the maximum sized partition. It may be that the disk is partitioned using the MBR disk partitioning format and the disk contains either 4 primary partitions, (no more partitions may be created), or 3 primary partitions and one extended partition, (only logical drives may be created).

This means that there is not enough unallocated (free) space on the disk for the new partition. In this case, you need to reduce the size of the main Windows partition (in our example, this is volume 1) by 128 MB:

DISKPART> select volume 1
DISKPART> shrink desired=128 minimum=128

shrink volume

Then create the EFI and MSR partitions as described above.