12

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?

5 Answers5

9

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

brandeded
  • 250
7
  • 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

Kleajmp
  • 461
  • 1
  • 7
  • 20
3

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.

lx07
  • 3,266
0

If you have two EFI partitions, one is superfluous, as the boot process will only use one of the two.

An EFI boot partition will always have a top-level directory named /EFI. Beneath that directory, each operating system will have its own sub-directory, with a name that (hopefully) indicates what OS it is used for, and which is (hopefully) unique to that OS.

I would recommend letting these two partitions coexist, since deleting the wrong one will make your computer unbootable.

You can look at the contents of these partition by assigning them drive-letters in Disk Management, if you wish to examine them more in depth, and you may also remove it when finished.

harrymc
  • 498,455
0

Note: This is for a Windows 11 system (presumably the same on Windows 10)

I was about to give up hope when suddenly I found what seems to be the real answer - based on echo list volume | diskpart from @brandeded.

First, run the command above, then the crucial part that wasn't included in the original answer: Look under the "Info" column for System. The used EFI will have it, but the unused one will only say Hidden

When I used bcdedit /enum active, it showed partition=\Device\HarddiskVolume4 - but none of the EFIs are on either disk or volume 4, nor are they the 4th partition on their drives; so I'm not sure what that's referencing.

enter image description here

Slbox
  • 111
  • 5