1

Just about to setup my notebook with Fedora 31 and ran into the issue the EFI partition (/boot/efi) being too small with just 100Mb. (the EFI partition was previously setup from windows when I ran "MBR2GPT.exe /convert /disk:0 /allowfullos" )

Tried to use 'gparted' to extend its size. Though gparted can increase the partition, it does not correct the partition format itself and gparted throws an error:

gnu parted cannot resize this partition to this size. we're working on it
mattes
  • 101
  • 2
  • 6
  • Does this answer your question? [Gparted gives problems with Fat32](https://unix.stackexchange.com/questions/365704/gparted-gives-problems-with-fat32) – Ã©clairevoyant Jul 12 '22 at 08:46

2 Answers2

4

Really did not feel like shelling any $$ for solution the internetz proposed. So I came up with this one:

Boot Fedora 31 Live from the USB stick again and did following:

  1. use 'fdisk' to create a new small partion (/dev/sda99) at the end of the disk don't forget to press 'w' to write changes to disk
  2. format as FAT32: mkfs.vfat -F 32 /dev/sda99
  3. and mount the new partition to /mnt/f99
  4. mount the current EFI partition to /mnt/efi
  5. now i saved the content of the current EFI partition cp -a /mnt/efi/EFI /mnt/f99
  6. unmounted /mnt/efi umounted /mnt/f99

Here my partition layout 'fdisk -l /dev/sda':

/dev/sda1        2048    1180000   1180000  579M Windows RE
/dev/sda2     1180000  164423679 163235840  80G  Microsoft basic data
/dev/sda3   164423680  164623680    200000  100M EFI System
/dev/sda99  900000000  900200000    200000  100M Linux home
  1. Now I used fdisk to delete /dev/sda3
  2. then I create a new partition with fdisk called /dev/sda3 and assigned it 300M its important to assign the correct partition type. use command 't' and press '1' for EFI partition. see 'L' for available types !!! don't forget to press 'w' to write changes to disk
  3. format new EFI partition mkfs.vfat -F 32 /dev/sda3

Here the new partition layout:

/dev/sda1        2048    1180000   1180000  579M Windows RE
/dev/sda2     1180000  164423679 163235840  80G  Microsoft basic data
/dev/sda3   164423680  165023679    600000  300M EFI System
/dev/sda99  900000000  900200000    200000  100M Linux home
  1. now copy the saved EFI data back to the EFI partition:

mount /dev/sad99 /mnt/f99
mount /dev/sda3 /mnt/efi
cp -a /mnt/f99/EFI /mnt/efi
sync
umount /mnt/f99
umount /mnt/efi

EFI is now resized to 300M and restored with the 'original' data to boot windows.

Now its time to reboot and install the 'fine' operating system of my choice Fedora31

Worked for me like a charm. Enjoy.

mattes
  • 101
  • 2
  • 6
0

Thank you for mattes for providing the above answer, I was wondering myself if replicating the efi partition somewhere else by copying could work.

I just want to share a quick fix that somewhat solves the problem, although not by increasing the size of the efi partition:

  • you can safely delete chinese korean and japanese fonts from EFI/Microsoft/Fonts if you don't need those languages at boot. These languages have thousands of characters, so they take 1000x more space than other fonts.
  • you can disable the creation of fallback initramfs in the config file /etc/mkinitcpio.d/linux.preset by removing 'fallback' from PRESETS.
  • you can delete /boot/initramfs-linux-fallback.img, and it won't be recreated
  • you can remove /boot/Boot directory. As far as I know it is there for legacy reasons.

With these you can free about 50MB. It worked for Arch linux - Windows 10 dual boot. But mattes' answer is the long term safe solution.

David
  • 1
  • 1