Skip to main content
  1. Posts/

Windows: move locked EFI partition

·436 words·3 mins· loading · loading ·
Table of Contents

Move EFI Partition
#

Problem: On a Windows system, a partition cannot be extended because the (locked for deletion) EFI partition is in the way.

EFI Partition

  1. Open Disk Management on the Windows system:
    a. Press Windows Key + R (This opens the “Run” dialog)
    b. Type diskmgmt.msc in the “Run” dialog and confirm with OK.
  2. Right-click the unallocated space and create a new volume.
  3. Subtract 100MB from the total available size:
    a. Example: 10140 available => assign only 10040. We need 100MB for the new EFI partition.
  4. Create the new partition. In this example, we will call the new partition E:.
  5. Shut down Windows and boot from a Windows installation media:
    a. Prepare Windows installation media: Microsoft - Create Windows Installation Media
    b. Boot from the installation media using the boot menu.
  6. After booting into the Windows setup:
    a. Go through the keyboard settings
    b. Select “Repair your computer” and continue
    c. Open the Command Prompt
  7. In the Command Prompt, create a new EFI partition:
# change to the drive you want to make bigger (usually C:)
C:
# open diskpart
diskpart
# show available disks
list disk
# select the desired disk (usually 0)
select disk 0
# create new EFI partition
create partition efi size=100
# list partitions to see the number of the new partition
list partition
# select the newly created partition (in this example, it is "3")
select partition 3
# format it for EFI and assign a letter (in this example "S")
format quick fs=fat32 assign letter=S
# exit diskpart
exit
  1. Then, move the Windows boot files to the new partition in the Command Prompt:
# use the correct main drive (usually C:) and the letter assigned to the new EFI partition (S:)
bcdboot C:\windows /s S:
  1. Now, delete the old EFI partition in the Command Prompt:
# open diskpart
diskpart
# select the correct disk (same as before)
select disk 0
# list partitions
list partition
# select the OLD EFI partition (in this example, it is "2")
select partition 2
# delete it
delete partition override
  1. Shut down the Windows system: a. Close the Command Prompt b. Choose Shutdown
  2. Remove the installation media and start Windows normally.
  3. Open Disk Management again (as shown in Step 1).
  4. The active EFI partition is now AFTER the placeholder partition (E:) created at the beginning, and the old one is gone.
  5. Delete the “placeholder” partition E: created in Step 4 to free up space.
  6. Finally, you can extend the first partition into the freed space, as the EFI partition is no longer in the way:
    EFI Partition 2
    a.Rightclick the first partition and chose “expand volume”.
torminal
Author
torminal
IT enthusiast

Related

Zabbix Template: Monitor Wordpress updates of multiple websites
251 words·2 mins· loading · loading
Monitoring of available Wordpress updates (Core, Plugins and Themens) with Zabbix.
Ansible Playbook: Update Wordpress installations
170 words·1 min· loading · loading
This playbook allows you to update multiple wordpress installations in /var/www
Zabbix Template: Monitor health of DRBD
101 words·1 min· loading · loading
Template to display a warning when the primary DRBD host becomes the secondary or the secondary goes offline.