meta data for this page
  •  

UEFI boot

Convert Windows 10 installation to boot from UEFI partition.

  • Run Windows and start command prompt

OR

  • Boot from Windows 10 ISO
  • Select Repair PC
  • Select Command Prompt or press SHIFT+F10 to spawn command prompt.

With command prompt:

mbr2gpt /validate /allowFullOS
 
disk layout failed for disk 0

It means that there is no space for EFI parition or MBR disk contains already 4 partitions.

The common cause is that Windows creates more recovery partitions if default is too small (created as first and cannot be expanded later). So probably one used is the recovery partition just after system or data partition. In this combination Windows can expand recovery partition if needed by shrinking data partition. More info here: Windows 10 Version 20H1 brings an important change in Windows Setup

To detect which recovery is used:

diskpart
list disk
select disk 0
detail disk
  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 1         Zastrzeżone  NTFS   Partition    500 MB  Healthy    System
  Volume 2     C                NTFS   Partition     72 GB  Healthy    Boot
  Volume 3         Windows RE   NTFS   Partition    864 MB  Healthy    Hidden
  Volume 4                      NTFS   Partition    526 MB  Healthy    Hidden
 
select partition 4
delete partition override
diskpart
list disk
select disk # Note: Select the disk where you want to add the EFI System partition.
list partition
select partition # Note: Select the Windows OS partition (# number) or your data partition.
shrink desired=100
create partition efi size=100
format quick fs=fat32
assign letter=s
list partition
list volume Note: Note the volume letter where the Windows OS is installed.
exit
 
bcdboot X:\windows /s S:
bootrec /rebuildbcd