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
- Press Win + S, type
cmd, right-click on Command Prompt, and select Run as administrator. - Type
diskpartand press Enter to open the disk partitioning utility.
2. Locate the EFI System Partition
Identify the primary drive by typing:
list diskSelect the disk containing Windows 11 (usually Disk 0):
select disk 0List the partitions on the selected drive:
list partitionLook 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.
Select the EFI partition (replace
Xwith the partition number identified previously):select partition XAssign an unused drive letter (such as
S):assign letter=SThe 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:
Format the partition as FAT32:
format quick fs=fat32Exit Diskpart:
exitGenerate fresh UEFI boot files using the
bcdbootcommand: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:
Return to Diskpart and select the disk and partition:
select disk 0 select partition XRemove 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:
Select the disk and partition to delete:
select disk 1 select partition XForce deletion of the protected system partition:
delete partition override
7. Exit Diskpart
To close the utility, type:
exit