linux – Re-adding .efi file to uefi boot

First, boot into linux.

Make sure that you have efibootmgr installed.

  1. Run sudo fdisk -l and look for the partition of Type EFI System. (/dev/sda2 in my case)
  2. Mount the partition to /mnt sudo mount /dev/sda2 /mnt
  3. Browse the file system and ensure the path of the file (EFI/kali/grubx64.efi in my case)

Refer to the sudo fdisk -l and find the partition that contains your Linux installation (/dev/sda6 in my case)

Using the values found previously, execute the following command:
sudo efibootmgr --create --disk=/dev/sda --part=6 --label="Kali" --loader="EFI\kali\grubx64.efi"

Read more here: Source link