11

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 Answers 5

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

6
  • 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

7
  • We expect answers (and questions) on this site to be complete and self-contained.  You seem to have provided such an answer (although (1) you could have said simply (Win)+(R) → diskpart, and (2) you might have mentioned the UAC dialog that will appear).  Links to sites that provide additional information are, of course, welcome (and are required when an answer is copied from another site), but it’s not clear to me how the link in your answer relates to your answer.  Please do not respond in comments; edit your answer to make it clearer and more complete. Commented Sep 4, 2019 at 18:55
  • 1
    I don't believe this is the case. On my running Windows 10 currently, I am booting without issue and both of my System EFI partitions (with id = c12a7328-f81f-11d2-ba4b-00a0c93ec93b) have their Required attribute set to no.
    – brandeded
    Commented Sep 8, 2019 at 17:18
  • ok that is interesting information, in my case it was. is there a chance any software changed the attribute? and are you sure you are booting in gpt from one of those efi partitions?
    – Kleajmp
    Commented Sep 8, 2019 at 20:15
  • 2
    I have two EFI partitions i.imgur.com/dKLTs05.png and both say they are not required so I wouldn't delete an EFI based on that
    – Aindriú
    Commented Feb 17, 2020 at 17:38
  • I also have two EFI partitions and both say Required: No so I don't think this is true.
    – Slbox
    Commented Jan 4, 2023 at 5:26
2

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.

0
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.

2
  • EFI partitions haven't been accessible from Windows for quite some time while booted to Windows or WinPE. Access to the EFI partition changed in Windows 10 and is meant to secure the EFI boot partition from external changes.by users or applications. DiskPart can mount the partition, but access to the partition's filesystem is denied, receiving the error "You have been denied permission to access this folder"; the Security tab has been disabled for the EFI partition, so changing permissions via the GUI or icacls ("No permissions are set. All users have full control.") is not possible.
    – JW0914
    Commented Sep 11, 2019 at 14:19
  • @JW0914: This is new block specific to to Windows Explorer, since Explorer never runs as Admin. Any other file manager that is run as Admin will happily access the EFI partition once it is assigned a drive-letter using diskpart. Or use Task Manager > File > Run New Task > Browse… to examine the partition. Or use the command mountvol.
    – harrymc
    Commented Sep 11, 2019 at 16:25
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

4
  • The fact a partition is 'Hidden', 'System' or 'Recovery' is set by a gpt parameter in Windows, so it is not always reliable to follow the Info column diskparts shows you. But it can be an indication sometimes, this information can be set by the partition ID... Take a look at this link for more details: defaultreasoning.com/2009/05/29/…
    – Kleajmp
    Commented Jan 8, 2023 at 23:20
  • @Kleajmp thanks for the info. I'm not clear on how that link is related though since it's about recovery partition, not EFI? Can you clarify what you mean? Can you give an example of when System would be set on an EFI partition but it would not be the one Windows uses?
    – Slbox
    Commented Jan 10, 2023 at 21:06
  • just wanted to give an example for how the Info column value can be set "manually" by setting the partition ID. With "it can be set" I mean you can set it to whatever you want by changing the partition ID. So when it is set manually to something it it not, it can confuse you, what i thought it was the case in your case. But now I probably confuse you more... So what I mean is: Don't let the Info column guide you to obtain the correct information as the information is just based on a partition ID or flag... So both could be marked as System or Hidden, it does not reveal "the true EFI".
    – Kleajmp
    Commented Jan 12, 2023 at 19:00
  • Can you demonstrate a scenario where multiple EFI are marked as "System" without manually setting the info? In other words, can you show that multiple "System" EFI partitions occur in the real world?
    – Slbox
    Commented Jan 12, 2023 at 20:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .