How do I find out which EFI system partition is in use by Windows 10?

I was running a dual boot Windows 10 / Linux system for some time, but I have recently decided to remove the Linux partition.

Currently, I'm successfully booting and running Windows 10, however when I check my partitions, I see I have 2 EFI System partitions.

My question is this - how do I find out which EFI system partition is being used by Windows, so I can remove the unused one?


I'm attempting to configure the same on a Surface Book Gen 1. It appears that the way to identify is to run the following invocation at cmd:

echo list volume | diskpart   

The bootable EFI partition will be listed with System in the Info column.

The other method is to use bcdedit /enum as follows:

bcdedit /enum active

I'd argue that is a better method.

I located this information in MSFT docs


  • open a command prompt with admin privileges (approve UAC if demanded)

  • start diskpart -> diskpart

  • select your disk with efi partions -> sel disk 1 (if disk 1 is the correct disk)

  • list your available partitions -> list part

  • if partition 2 that is the efi partition -> sel part 2

  • detail part

    Partition 2
    Type    : c12a7328-f81f-11d2-ba4b-00a0c93ec93b
    Hidden  : Yes
    Required: No
    Attrib  : 0X8000000000000000
    Offset in Bytes: 524288000
    

Now when the Required: property is set to No, you know that is the EFI partition you can delete. The other EFI partition will have the Required: property set to Yes. Do not delete that partition.

more info about the Required property, scroll to: gpt attributes on this page.

Edit:

to change the windows boot device (efi partition) use the following command:

bcdedit /set {bootmgr} device partition=a:

*where a: is the assigned drive letter for your new efi partition

Thanks to @mbrownnyc for looking up this information bcdedit Device Setting


If you go to an command prompt in Windows and enter mountvol S: /s this will mount the current ESP to volume S. You can change the S: to another drive letter if you are using S but don't change the /s switch.

Then create a directory mkdir S:\DONT_DELETE

Now you can tell which partition Windows uses and so you can delete the other.