Resize EFI Partition

For Hackintosh Install

You need to do it manually step by step.

Our solution is

  1. make a backup of contents of EFI partition.
  2. delete the EFI partition.
  3. re-create it with the extended size.
  4. copy the contents to the new EFI partition.

Step by step guide. You need root priviledge or sudo.

  1. # mount /dev/sda1 /media/ubuntu/XXXX # Use gnome-disks GUI. XXXX depends on your system.
  2. # mkdir esp/
  3. # rsync -av /media/ubuntu/XXXX esp/ # make a backup of the contents.
  4. # sudo umount /media/ubuntu/XXXX
  5. # sudo gdisk /dev/sda
    1. p # list of partition
    2. d # delete the partition.
    3. 1 # select the first partition.
    4. n # new partition.
    5. 1 # the number of new partition
    6. Enter # default 2048 sector.
    7. Enter # default X-th sector depending on the size of partition.
    8. EF00 # Hex Code for a EFI system partition.
    9. w # write the operation you have done.
    10. Y # final comfirmation.
  6. # sudo partprobe /dev/sda # ???
  7. # sudo mkfs.fat -F32 /dev/sda1 # format the EFI partition as FAT32.
  8. mount /dev/sda1 /mnt/
  9. rsync -av esp/ /mnt
  10. If it is a Linux drive, modify the UUID on /etc/fstab
    1. blkid | grep EFI
    2. nano /etc/fstab.

This stably works.
Go back to Computer

20220916