grub-install: error: cannot find EFI directory. (Reinstalling Grub Boot Loader Windows 10/Kali Linux Dual Boot with Dual Hard Drive)
This type of issue is common enough with windows 10. It has a habit of reformatting your EFI partition.
Grub-install for EFI installs a file to the EFI file system. It's not intelligent enough to mount the filesystem for itself first. It expects the EFI partition to be already mounted to /boot/efi
.
Locate your EFI partition with blkid
. It should be a vfat file system 0.5GB or less. Then mount it to /boot/efi and check you now have a directory /boot/efi/EFI
This will then let you run grub-install
Based on your screenshot that means you need:
sudo mount /dev/sda2 /boot/efi
sudo grub-install
Shateel
Updated on September 18, 2022Comments
-
Shateel over 1 year
I have 2 hard drive (SSD) in my laptop. One hard drive has windows 10 installed and other hard drive has kali linux installed. After reinstalling Windows 10 my kali linux grub boot loader isn't working anymore. So I tried to reinstall grub boot loader for kali linux with kali live cd.
I used these commands to install grub boot loader for kali linux:
sudo mount /dev/sdb4 /mnt sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys sudo chroot /mnt grub-install /dev/sdb
Whenever I write the command:
grub-install /dev/sdb
I get an error message "grub-install: error: cannot find EFI directory."
Can anyone please help me out!
Here's fdisk -l result:
kali@kali:~$ sudo fdisk -l Disk /dev/sdb: 447.14 GiB, 480113590272 bytes, 937721856 sectors Disk model: WDC WDS480G2G0A- 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: gpt Disk identifier: E85DA061-C60D-4CA9-9EEF-B703A8B89C96 Device Start End Sectors Size Type /dev/sdb1 34 32767 32734 16M Microsoft reserved /dev/sdb2 32768 734455807 734423040 350.2G Microsoft basic data /dev/sdb3 734455808 745361407 10905600 5.2G Microsoft basic data /dev/sdb4 745361408 922120191 176758784 84.3G Linux filesystem /dev/sdb5 922120192 937719807 15599616 7.4G Linux filesystem Disk /dev/sda: 238.49 GiB, 256060514304 bytes, 500118192 sectors Disk model: SanDisk SD9SN8W2 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: gpt Disk identifier: AC00DC72-4C02-49E3-B211-9AC5CB577E09 Device Start End Sectors Size Type /dev/sda1 2048 1085439 1083392 529M Windows recovery environment /dev/sda2 1085440 1290239 204800 100M EFI System /dev/sda3 1290240 1323007 32768 16M Microsoft reserved /dev/sda4 1323008 500117503 498794496 237.9G Microsoft basic data Disk /dev/sdc: 15.12 GiB, 16231956480 bytes, 31703040 sectors Disk model: v165w 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: 0x121f4f51 Device Boot Start End Sectors Size Id Type /dev/sdc1 * 0 7539839 7539840 3.6G 0 Empty /dev/sdc2 20412 21275 864 432K ef EFI (FAT-12/16/32) kali@kali:~$
Here's blkid result:
kali@kali:~$ sudo blkid /dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="117cfa3e-e16a-4240-b6bc-c1fd34f0d7c6" /dev/sdb2: LABEL="Data" UUID="92360F97360F7C0B" TYPE="ntfs" PARTUUID="d59a6755-9afd-4eb2-8975-9b1ed0558568" /dev/sdb3: LABEL="Extra" UUID="5CBC4FB1BC4F848C" TYPE="ntfs" PARTUUID="2230936f-4a3c-4812-ac5b-ec4dc56f5eb1" /dev/sdb4: UUID="214bbee0-4f90-455c-9703-5b9518bbbca1" TYPE="ext4" PARTUUID="c3962ed9-e800-40e1-8e99-0d159533cdf3" /dev/sdb5: UUID="6dd82a88-7622-4d48-b8ec-1e27b379ae9b" TYPE="ext4" PARTUUID="a5f85b50-533b-4ded-86b6-33c1ca7c6a46" /dev/sda1: LABEL="Recovery" UUID="F4C46F12C46ED700" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="cbc4ba92-f9e1-4318-b564-c9cdb4fbd673" /dev/sda2: UUID="7071-13EF" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="2ffb528c-6180-446e-8d9a-39f544dccbdd" /dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="a8ebfdac-d662-435c-a75f-e87989ae9f78" /dev/sda4: LABEL="OS" UUID="46E281D3E281C81F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="39245a43-640e-4d8c-b3a6-5e815dbc8680" /dev/sdc1: UUID="2020-05-08-14-35-45-00" LABEL="Kali Linux amd64 1" TYPE="iso9660" PTUUID="121f4f51" PTTYPE="dos" PARTUUID="121f4f51-01" /dev/sdc2: SEC_TYPE="msdos" UUID="E35D-15CD" TYPE="vfat" PARTUUID="121f4f51-02" kali@kali:~$
-
Philip Couling about 4 yearsPlease use code blocks and copy text from your terminal rather than screenshots.
-
-
Shateel about 4 yearsafter executing this command sudo mount /dev/sda2 /boot/efi sudo grub-install grub boot loader came back however now there's no windows 10 listed in the grub boot loader. I can only boot kali linux.