Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: UEFI: How to repair kali-linux grub dual boot with Windows 10

  1. #1
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    659

    UEFI: How to repair kali-linux grub dual boot with Windows 10

    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/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
    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.
    Last edited by _defalt; 2017-07-26 at 05:38 PM.

  2. #2
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    659
    Sometimes Installer shows this error executing grub install dummy failed while installing grub and then you have to skip this most important step. The above commands are mandatory if grub was not installed during the kali installation.

    However if grub is present in EFI system partition but entry of kali is missing from boot menu options then you don't have to do those efforts. Just select

    Boot from EFI just below the Windows Boot Manager.

    Click on the interface drive>EFI>kali>grubx64.efi

    Once kali boots open terminal and enter these commands

    sudo update-grub
    sudo grub-install /dev/sda


    For DELL users, there is no Boot from EFI option in your boot menu options but if you go to your BIOS settings you can add entry of bootloader in the table.
    Last edited by _defalt; 2017-08-25 at 05:12 PM.

  3. #3
    Junior Member
    Join Date
    Jul 2017
    Posts
    9
    I do not have Windows installed on my HP laptop, only Kali. The only EFI Boot I have is when I hit F9 when it starts up. There is no grub.cfg file, only grubx64.efi. What do I need to do to boot into Kali?

  4. #4
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    659
    That was my mistake. Instead of grub.cfg I was supposed to write grubx64.efi. You should click on this one. Kali will boot. Let me edit my mistake there.

  5. #5
    Junior Member
    Join Date
    Jul 2017
    Posts
    9
    I'm currently at a grub prompt. I cannot boot into Kali. Tab lists possible command completions...

  6. #6
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    659
    You are in grub rescue mode. I think grub no longer remembers that partition in which kali filesystem is. For that run these commands:
    ls
    set root=(hd0,gptx)
    set prefix=(hd0,gptx)/boot/grub
    insmod normal
    normal


    ls(LS) lists all the partitions of your hard drive like this (hd0) (hd0,gpt1) (hd0,gpt2). I think you can make some guesses which one is your kali filesystem to replace the variable gptx. Most likely it is (hd0,gpt2).

    Once you boot into kali open terminal and type:
    update-grub
    grub-install /dev/sda
    Last edited by _defalt; 2017-07-12 at 07:01 AM.

  7. #7
    Junior Member
    Join Date
    Jul 2017
    Posts
    9
    I ran the first set of commands. I found gpt2 was correct. After rebooting I'm still left at a grub prompt. I only have Kali installed, if that makes a difference.

  8. #8
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    659
    You were not supposed to reboot. You have to proceed to 2nd set once you boot into kali else the change will not be permanent. Try it again.

  9. #9
    Junior Member
    Join Date
    Jul 2017
    Posts
    9
    I've run several versions of Linux before, but never encountered this issue. What is the command to boot into Kali?

  10. #10
    Senior Member
    Join Date
    Oct 2016
    Location
    /dev/sda
    Posts
    659
    There is no command to boot into kali. Grub boots kali. Show the screenshot of where you are getting stuck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •