Manage EFI Partition with Diskpart in Windows 11

Managing the EFI System Partition (ESP) on Windows 11 is essential for troubleshooting boot issues, resizing drive space, or maintaining multi-boot configurations. This guide outlines how to use the Windows built-in Diskpart utility to locate, assign drive letters to, format, and safely modify or delete EFI system partitions on a UEFI-based drive.

1. Launch Diskpart as Administrator

  1. Press Win + S, type cmd, right-click on Command Prompt, and select Run as administrator.
  2. Type diskpart and press Enter to open the disk partitioning utility.

2. Locate the EFI System Partition

  1. Identify the primary drive by typing:

    list disk
  2. Select the disk containing Windows 11 (usually Disk 0):

    select disk 0
  3. List the partitions on the selected drive:

    list partition
  4. Look for the partition labeled System (typically formatted as FAT32 and sized between 100 MB and 500 MB).

3. Assign a Drive Letter to the EFI Partition

To access, modify, or repair boot files inside the EFI partition, you must assign it a temporary drive letter.

  1. Select the EFI partition (replace X with the partition number identified previously):

    select partition X
  2. Assign an unused drive letter (such as S):

    assign letter=S
  3. The EFI volume is now mounted and accessible via command-line tools under S:.

4. Format or Rebuild the EFI Partition (Optional)

If your bootloader is corrupted, you can format the partition and recreate the BCD store:

  1. Format the partition as FAT32:

    format quick fs=fat32
  2. Exit Diskpart:

    exit
  3. Generate fresh UEFI boot files using the bcdboot command:

    bcdboot C:\Windows /s S: /f UEFI

5. Remove the Assigned Drive Letter

After completing maintenance, unmount the EFI partition to prevent accidental file modification or security risks:

  1. Return to Diskpart and select the disk and partition:

    select disk 0
    select partition X
  2. Remove the assigned mount point:

    remove letter=S

6. Delete an EFI Partition (Clean Installation or Disk Wipe)

Warning: Deleting the EFI partition will make the current Windows installation unbootable.

If you are repurposing a secondary drive containing an old EFI partition:

  1. Select the disk and partition to delete:

    select disk 1
    select partition X
  2. Force deletion of the protected system partition:

    delete partition override

7. Exit Diskpart

To close the utility, type:

exit