Few minor additions to the Solution
Quote:
Originally Posted by
_defalt
If you have dual booted kali with Windows 10 then most probably you are running PC with UEFI firmware. The booting process of UEFI is completely different from BIOS. Right after installation or after updating your UEFI you find that kali is not present in boot menu options. You can see the entry of Windows boot manager but there is no entry of kali in boot menu.
The reason can be failed grub installation or Windows major updates.
If you update UEFI it deletes the entry of kali from NVRAM.
If you update UEFI from 1.x to 2.x then entry of Grub is removed from the boot-menu.
Follow next post if you did this
If you update UEFI from 1.x to 1.y then it remains there.
Boot into kali live USB and follow the instructions:
mount /dev/sda* /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mkdir /mnt/sys/firmware/efi/efivars
mount --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
mkdir /mnt/boot/efi
mount /dev/sda+ /mnt/boot/efi
mount -o remount,rw /dev/sda+ /mnt/boot/efi
mkdir /mnt/hostrun
mount --bind /run /mnt/hostrun
chroot /mnt
mkdir /run/lvm
mount --bind /hostrun/lvm /run/lvm
grub-install /dev/sda
update-grub
exit
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys/firmware/efi/efivars
umount /mnt/sys
umount /mnt/boot/efi
umount /mnt/hostrun
umount /mnt/run/lvm
umount /mnt
REBOOT
/dev/sda
* is your linux filesystem. Like mine is /dev/sda6
/dev/sda
+ is your EFI partition which is most likely /dev/sda1.
Use
fdisk -l to list all partitions.
@defalt your solution worked like a charm
I wasn't even able to boot into Kali before. But after I followed your instructions I was able to add Kali Linux into the UEFI Boot menu.
The problem I faced was in the UEFI Boot menu, where my default OS manager was Windows 10 and it used to boot without even showing Grub.
Therefore I found a solution for this, and it's really simple.
In my case I was dual booting windows 10 and Kali Linux.
So in my UEFi OS boot manger the boot order was:
1. Windows 10 boot manger
2. KALI Linux boot manager
Where Kali Linux contained the Grub.
If I had to boot Kali, I had to hold F9( Boot device selection in my HP laptop) and then I would get a Grub boot screen with 3 options:
1. Kali Linux
2. Advanced Options for Kali
3. Windows 10 Boot
So I had to make changes to my original Boot order in UEFI:
1. I was able to boot into Kali Linux by holding F9( This command may change in your laptop based on your vendor) to open Boot Devices menu.
Then I selected Kali Linux Boot Manager.
Now you will boot into your Installed Kali Linux(not Live USB).
2. Install efibootmgr using the following commands:
sudo apt-get update
sudo apt-get install efibootmgr
3. Find out your Boot Order:
sudo efibootmgr
The output looks something like this:
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0001,0004,0002,0005,0006,2001
Boot0001 Windows Boot Manager
Boot0002 Network
Boot0004 Kali
Boot0005 Hard Drive
Boot0006 CD/DVD/CD-RW Drive
Boot2001 EFI USB Device
In the above output Windows 10 (0001) is set to boot before Kali(0004).
Note: The serial numbers of the boot devices may change in your system.
3. Now change the boot order to get your Kali Linux (with the Grub installed) to boot using the command:
sudo efibootmgr -o 0004,0001,2001,0006
In the above command we are setting Kali( with Grub installed) to boot before windows 10 in the UEFI OS manager.
4. Now check if your boot order has changed by typing the following command:
sudo efibootmgr
The output looks something like this:
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0001,0002,0005,0006,2001
Boot0001 Windows Boot Manager
Boot0002 Network
Boot0004 Kali
Boot0005 Hard Drive
Boot0006 CD/DVD/CD-RW Drive
Boot2001 EFI USB Device
If you get a similar output with Kali(0004) coming before Windows 10(0001) this means that your boot order has changed.
Note : You should install Grub on Kali to dual boot Kali and Windows 10.
Installation of grub stuck
I followed all the steps properly.
They didn't show any error.
But after the command ' grub-install dev/sdb '
NOTE: sdb as i have kali Linux on my hard drive (win 10 on ssd)
After the above mentioned command it shows " INSTALLING for x86_64-efi platform " and even after a long time shows no result.