/boot/efi filesystem is much smaller than its partition

I have Fedora 43 installed on my Lenovo ThinkPad, in a dual boot installation with Windows.

For reasons too dull to go into, the size of my /boot/efi partition is 4GB. So I was surprised when an update of the Lenovo System Firmware failed just now because there is insufficient space in /boot/efi.

I’ve checked for old kernels that might be hanging around: nothing beyond the standard 3 most recent.

Checking with df -h, it turns out the /boot/efi filesystem is only 96MB:

$ df -h /boot/efi
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1   96M   52M   45M  54% /boot/efi

When I use fdisk -l, the output is very odd:

Disk /dev/nvme0n1p1: 3.91 GiB, 4194304000 bytes, 8192000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x500a0dff

Device           Boot      Start        End    Sectors   Size Id Type
/dev/nvme0n1p1p1      1948285285 3650263507 1701978223 811.6G 6e unknown
/dev/nvme0n1p1p2               0          0          0     0B 74 unknown
/dev/nvme0n1p1p4        28049408   28049848        441 220.5K  0 Empty

Any ideas what might be going on and how I can expand the size of my /boot/efi filesystem?

Did you run sudo fdisk -l /dev/nvme0n1p1 ? The output of that isn’t meaningful - fdisk should be run on a disk (like sudo fdisk -l /dev/nvme0n1) not on a partition.

Or of course you can run just sudo fdisk -l to see all disks.

/dev/nvme0n1p1 is partition 1 on disk /dev/nvme0n1. You should specify the disk instead:

fdisk -l /dev/nvme0n1

Also, findmnt /boot/efi will tell you the file system options in use.

The fatresize command should be able to handle the resizing:

$ fatresize --help
fatresize 1.1.0 (20250723)
Usage: fatresize [options] device (e.g. /dev/hda1, /dev/sda2)
    Resize an FAT16/FAT32 volume non-destructively:

    -s, --size SIZE      Resize volume to SIZE[k|M|G|ki|Mi|Gi] bytes or "max"
    -i, --info           Show volume information
    -f, --force-yes      Do not ask questions
    -n, --partition NUM  Specify partition number
    -p, --progress       Show progress
    -q, --quiet          Be quiet
    -v, --verbose        Verbose
    -h, --help           Display this help

Please report bugs to mouse@ya.ru

Thanks! fdisk -l /dev/nvme0n1 just gives me the 3.9G partition size.

When I use the latter command, I get:

$ findmnt /boot/efi 
TARGET SOURCE   FSTYPE OPTIONS
/boot/efi
       /dev/nvme0n1p1
                vfat   rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt

I’m wondering if I should just use fatresize to increase the size of the /boot/efi filesystem? A bit reluctant to do so (even after backing up the partition) given the risk of an unbootable system

Ah, I replied before seeing this. Thanks, yes, I’ll give that a go now.

Have a Live USB handy so that you can restore from backup if necessary?

Yep, will do, though would still be nice not to have to! Anyway, I’ll do the backup and resizing and see where that takes me…

Success!

fatresize didn’t work (I got some apologetic “we’re working on it” error message) – possibly because the existing filesystem was less than 512MB?

So I just backed up the contents of /boot/efi and ran mkfs.vfat on the partition to create a fresh new vfat filesystem. Then copied back the files for /boot/efi. Had a moment’s panic over not having noted down what the original file permissions were before remembering it was a FAT partition.

The other thing I had to do was to update the UUID for the partition in /etc/fstab.

All is now working (and the firmware update has gone through successfully). If anything I’ve said above sounds problematic (e.g. I need to update something else somewhere else, in addition to /etc/fstab to avoid future problems) then let me know. But I’ll mark this as solved

It might be a fat12 file system which you can’t grow beyond a certain limit.

Ah, right, that would make sense. Thanks!