Low Space on EFI (System) Partition – Clean up

Hey folks, this seems like a topic that keeps coming up, despite the fact I had assumed everyone was creating large EFI volumes (984MB) by now, but I keep finding folks who have 100MB and run into issues. Recent email from customer:

GitHub Code: garytown/CM_PowerShell_Snips/SystemVolumeBinFiles.ps1

Microsoft Method for Cleanup: “We couldn’t update system reserved partition” error installing Windows 10 – Microsoft Support

Related: OSD Partition Setup, Mike Terrill Edition (The Optimized Way).

So, MS says the minimum is 200MB. (they just updated their minimum in May 2024 from 100 to 200MB) Please don’t use minimums. Do you use minimum requirements to run Windows in general? NO YOU DON’T! You’d be crazy to! Your end users would revolt! So why do you use minimum for EFI size???

So you found yourself in a spot where someone made a poor decision in the past, and you’re left having to deal with it. Your options are very limited. First make sure you change your process to set your EFI to 986MB, then determine if you can reimage devices, or if you need to apply a workaround for a while. On HP, you can check for previous firmware update bin files and clear out. On anything, you can take a look at the MS docs for what they suggest. I’ll cover both here in this post.

Working with your System Volume – PowerShell

We’re going to first start by finding Fixed volumes formatted FAT32. Then find where it is set to “IsSystem”. From there we can find the partition by matching up the DiskNumber. Finally using that information to match up the ids. Now we have a Variable with the System Disk info.

$Volume = Get-Volume | Where-Object {$_.FileSystemType -eq "FAT32" -and $_.DriveType -eq "Fixed"}
$SystemDisk = Get-Disk | Where-Object {$_.IsSystem -eq $true}
$SystemPartition = Get-Partition -DiskNumber $SystemDisk.DiskNumber | Where-Object {$_.IsSystem -eq $true}  
$SystemVolume = $Volume | Where-Object {$_.UniqueId -match $SystemPartition.Guid}

So on this machine, I’ve got plenty of free space for now.

HP BIOS/Firmware Files on EFI partition

Now I’ll switch over to test machine for some tests. Ok, so lets do a search for .bin files.

Here you can see that the EFI partition is hosting several HP firmware updates.
It has the previous version 1.26 in the previous folder as a backup for rollback purposes, and 1.28 in the current folder. It has an extracted version in the EFI\HP\DEVFW folder from the last time it was updated.

All of these can be deleted safely to clean up room. Let’s pipe $BinFiles to Remove-Item then check again for Bin files…. all gone!

Lets refresh the variables and look at the free space now:

Ok, so we went from 165MB Free to 227MB Free.

OK… while this is possible, it’s BEST to leave the firmware files there, for recovery reasons. If you corrupt your bios, there are situations that having those bin files on the EFI partition can save you some headache. I’d start with removing the previous version, then the current version, and lastly, the DEVFW folder.

Microsoft Recommended files for Cleanup

“We couldn’t update system reserved partition” error installing Windows 10 – Microsoft Support

With that document from Microsoft where it suggests deleting the font files, let’s take a look at what that looks like in PowerShell.

$FontFolder = Get-ChildItem -LiteralPath $SystemVolume.path -Recurse | Where-Object {$_.name -match "Font"}
$FontFolder | Get-ChildItem

Lets check again:

Ok, so we went from 227MB Free to 240MB Free. Between both cleanups, we regained 75MB of space.

I did just reboot the system, and it reboot successfully, no issues. 🙂

Hope that helps clear up enough space for you to get your BIOS updates done and your Windows in place Upgrades!

Note, this should be last resort, hopefully you never need to do this. Process on Dell, Lenovo, etc might be different, I don’t know how their BIOS Update processes work. As with everything, TEST TEST TEST!

Pro Tip, when deleting things from your system partition, I’d recommend avoiding wildcards like *

Bonus HP knowledge I learned today:

What was found out is that the difference between updating through Softpaq and WU is Softpaq deletes backup firmware files in the EFI partition which increases the free space before copying new BIOS files to EFI, whereas WU does not delete backup firmware files in EFI before copying. Therefore WU is not able to complete updating due to insufficient EFI space.

GARYTOWN.COM

4 thoughts on “Low Space on EFI (System) Partition – Clean up”

  1. So, is it good to change the partitioning logic in Task Sequence to create a 984 MB EFI partition as well? I followed your earlier blog post guidance to create a 984 MB recovery partition.

    Reply
  2. Just a small note.

    “Hey folks, this seems like a topic that keeps coming up, despite the fact I had assumed everyone was creating large EFI volumes (984MB) by now, but I keep finding folks who have 100MB and run into issues.”

    Awesome advice if you are using MDT/SCCM where you can define the EFI volume size (or god forbid manually setting it during OSD). In our case we needed to create an Intune remediation script to clean up the EFI partition so that Windows 11 could install over W10.

    BUT

    Thus far I have found no way to set the EFI volume size when using Intune autopilot, which we migrated to a couple of years ago.

    Reply
    • Right, if you’re using Autopilot, that means you already have an OS installed and can no longer change the size of your EFI volume.
      You’d need to reimage for that, using one of the many available methods out there.

      Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.