Page 2 of 2 FirstFirst 12
Results 51 to 73 of 73

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

  1. #51
    Join Date
    2018-Feb
    Location
    Seattle
    Posts
    16
    I did some more exploring. I didn't notice previously that both Add Boot Option and Path for Boot Option are required. With Add Boot Option you can enter anything however with Path for Boot Option you must navigate to a .efi file. I tried EFI\kali\grubx64.efi for Add Boot Option but can find no grubx64.efi file in navigating through all the choices with Path for Boot Option. The files I could find were bootx64.efi, bootmgfw.efi, memtest.efi and bootmgr.efi. The only Path option I have tried thus far is bootx64.efi and when I do that and hit Create the boot order is populated with EFI\kali\grux64.efi (PO: WDC WD5000LPVX-80V0TT0)....and it boots to Windows.

  2. #52
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    928
    Boot into kali live and mount your EFI partition and see if grub exists in the directory /mnt/EFI/kali/grubx64.efi

    mount /dev/sda1 /mnt
    nautilus /mnt/EFI

  3. #53
    Join Date
    2018-Feb
    Location
    Seattle
    Posts
    16
    I booted to Kali live, mount command was ok but nautilus /mnt/EFI resulted in "unable to get contents of the bookmarks file: error opening file /root/.gti.bookmarks: no such file or directory exists" a window popped up showing the three folders visible in CMOS>add new boot option: ASUS BOOT MICROSOFT no Kali folder and no Kali folder beneath any of those three folders (and no grubx64.efi file). I tried running the grub install again but again saw the "mount point doesn't exist" error upon mount --bind /dev /mnt/dev despite upon running mount /dev/sda1 /mnt again the output is "mount point already exists".

  4. #54
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    928
    When it reports mount point does not exist, create a mount point using mkdir /mnt/dev before executing that command. Try it again. You have to install grub. Show the screenshot of terminal when you run those commands.

  5. #55
    Join Date
    2018-Feb
    Location
    Seattle
    Posts
    16
    did mkdir had to do mkdir for both mnt/boot and mnt/boot/efi. chroot would not work - as you'll see I screwed up and did a chroot /root first then chroot /mnt saw "failed to run command 'bin/bash' : no such file or directory. All previous commands had run without errors. I tried the next command out of curiosity. First tried mkdir /run/lvm saw "file exists" then ran mount --bind /hostrun/lvm /run/lvm saw "special device /hostrun/lvm does not exist". Tried mkdir /hostrun/lvm "no such file or directory" next tried mkdir /mnt/hostrun/lvm "file exists" and again ran mount --bind /hostrun/lvm /run/lvm but of course still saw "special device /hostrun/lvm does not exist. So....what did I screw up about the chroot command? and do I perform mkdir /hostrun then mkdir /hostrun/lvm and THEN the mount --bind /hostrun/lvm /run/lvm again?
    Attached Images Attached Images

  6. #56
    Join Date
    2018-Feb
    Location
    Seattle
    Posts
    16
    Ran again no errors (besides file already exists) until chroot - which I did correctly (chroot /mnt) this time. Tried sudo chroot /mnt no joy (same error). I tried again to go further and again no joy specifically "special device /hostrun/lvm does not exist". Why won't chroot work? Also tried grub-install /dev/sda - should sda have a number after it or is /dev/sda correct? grub-install resulted in "command not found" something possibly of interest is the fdisk -l output yesterday had sdb.... whereas today it is sda....
    Attached Images Attached Images

  7. #57
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    928
    When it says mount point does not exist you can create one using mkdir as i told you before. If it now says file exist it just means that the mount point already exists and you don't have to create one with mkdir. I think you have already learned this.

    The error with chroot /mnt, i made an update to my original post. Run it again.

    Make sure you are not booting 32-bit kali image on your 64-bit PC.
    Last edited by _defalt; 2018-03-14 at 14:28.

  8. #58
    Join Date
    2018-Feb
    Location
    Seattle
    Posts
    16
    _defalt! Yes you are correct in that I understand that if the file/folder already exists it means "good! I don't have to create it!". I ran chroot /mnt/bin/bash as noted in your updated instructions - I took a new pic of them before booting up to Kali Live. I see a different error now "chroot: cannot change root directory to '/mnt/bin/bash': Not a directory" I tried "sudo chroot /mnt/bin/bash got the same error. I can confirm that yes I am booting 64-bit Kali image 2018.1 on my 64 bit machine. I got tired of the delay booting to CD-ROM so I created a 64 bit Kali USB stick per the instructions on the Kali site. I can now boot to Kali Live in under a minute. I did go on to the rest of the commands but got the same results as before.
    Attached Images Attached Images

  9. #59
    Join Date
    2018-Feb
    Location
    Seattle
    Posts
    16
    _defalt? I saw you again changed the chroot instruction to chroot /mnt /usr/bin/bash so I tried again. This time the mount -o remount,rw command wouldn't work - the result was "mount: /mnt/boot/efi: mount or bad..." sorry I must be very tired as I didn't get the entire error in my screen cap and I can't remember if offhand AND I'm too tired to try this again, this evening. I double-triple-quadruple checked my syntax and it looked correct.

    In the snip I was looking at I wasn't sure if there was a space between /mnt and /usr/bin/bash on the chroot command so I tried both. It looked more like there was a space so I tried it that way. There was an error either way "chroot: failed to run command 'usr/bin/bash': no such directory" with the space and "chroot: cannot change root directory to 'mnt/usr/bin/bash' no such directory" without the space.
    Attached Images Attached Images

  10. #60
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    928
    @Hammondo I've retested the solution of my original post (edited them again) and they are working as intended.

    It looks like the chroot, grub-install & update-grub binaries are missing in your kali filesytem /usr/sbin. Can you show the output of:

    mount /dev/sda* /mnt
    ls /mnt/usr/sbin | grep grub
    ls /mnt/usr/sbin | grep chroot

    Replace * with your kali filesystem name.

    If it returns no file then you have to reinstall kali.
    Last edited by _defalt; 2018-03-16 at 16:54.

  11. #61
    Join Date
    2018-Mar
    Posts
    1
    i had installed kali with win 10 in dual boot. but i accidently deleted the kali partition and swap area. using UEFI mode I can successfully boot into win 10. but when I try to boot into BIOS mode to do fresh install of kali, it shows error like "no such partition, grub rescue". How to get rid of this?

  12. #62
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    928
    Quote Originally Posted by cactus69 View Post
    i had installed kali with win 10 in dual boot. but i accidently deleted the kali partition and swap area. using UEFI mode I can successfully boot into win 10. but when I try to boot into BIOS mode to do fresh install of kali, it shows error like "no such partition, grub rescue". How to get rid of this?
    Why are you booting into BIOS mode when kali can be installed in UEFI mode?

  13. #63
    Join Date
    2018-Mar
    Posts
    1
    Whenever I install kali linux, I never for once enjoy it.. Always Grub rescue issue.. What's the problem? Is it my system? Or what?... I use hp, Windows 10..720gb hard drive.. 80gb partitioned for Linux only... But I install kali now, I shut down later, after like 5 hours when I on system, I see Grub rescue again and this kali is really needed.. I don't know what to do again m. Please help me.. Please

  14. #64
    Join Date
    2016-Oct
    Location
    /dev/sda
    Posts
    928
    Quote Originally Posted by vosquare View Post
    Whenever I install kali linux, I never for once enjoy it.. Always Grub rescue issue.. What's the problem? Is it my system? Or what?... I use hp, Windows 10..720gb hard drive.. 80gb partitioned for Linux only... But I install kali now, I shut down later, after like 5 hours when I on system, I see Grub rescue again and this kali is really needed.. I don't know what to do again m. Please help me.. Please
    When it jumps to grub rescue mode, post the output of ls here.

  15. #65
    Join Date
    2018-Jun
    Posts
    2
    Well I have a new question based on this issue.
    First here is the output of fdisk -l

    root@Kali-Chaos:~# fdisk -l
    Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
    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: 6748ECF3-6336-4440-BCFD-1125C2E87896

    Device Start End Sectors Size Type
    /dev/nvme0n1p1 2048 1026047 1024000 500M EFI System
    /dev/nvme0n1p2 1026048 1288191 262144 128M Microsoft reserved
    /dev/nvme0n1p3 1288192 477663577 476375386 227.2G Microsoft basic data
    /dev/nvme0n1p4 477665280 479655935 1990656 972M Windows recovery environment
    /dev/nvme0n1p5 479655936 500082687 20426752 9.8G Windows recovery environment


    Disk /dev/nvme1n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
    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: 0x8a8e6123

    Device Boot Start End Sectors Size Id Type
    /dev/nvme1n1p1 2048 292968447 292966400 139.7G 83 Linux
    /dev/nvme1n1p2 292970494 500117503 207147010 98.8G 5 Extended
    /dev/nvme1n1p5 292970496 312500223 19529728 9.3G 82 Linux swap / Solaris
    /dev/nvme1n1p6 312502272 500117503 187615232 89.5G 83 Linux


    Disk /dev/sda: 477 GiB, 512110190592 bytes, 1000215216 sectors
    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: 0x48742778

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 2048 1000212479 1000210432 477G 7 HPFS/NTFS/exFAT

    So as you can see, I have 2 NVME drives, and one SSD drive. NVME0N1 is the one that came with the system and is the one that the Windows 10 install is on (also the EFI partition I used for the grub fix in this thread). NVME1N1 is the second NVME drive and has a KALI install and a Ubuntu install on it. The SDA drive is simply data drive for the three OS systems to use. When installing 2018.2 Kali ran into the grub issue. Researched the forums and found this fix, used it, and for /dev/sda used /dev/nvme0n1. The grub-install line went without any issues, the update-grub however popped multiple warnings and only found the Ubuntu install. Sure enough after the umount and reboot, only Kali and Ubuntu were options to boot into. So I guess my question is how to correct the pointers so as to have all three OS availible.

  16. #66
    Join Date
    2018-Jun
    Posts
    2
    And I feel like an idiot, I might have found the fix.

  17. #67
    Join Date
    2018-Sep
    Posts
    2
    Thanks _Defalt for all the time and effort you've put into this post, it allowed me to bypass the Grub Console. so greatly appreciated.

    I am getting the same errors as joed1960 had - https://forums.kali.org/attachment.p...3&d=1500068213 screenshot.

    I ended up butchering the machine by updating a bunch of applications [800 ish] in human error, everything worked until I rebooted then the above screenshots, grub interface appears.

    I was able to bypass the interface using what you provided, using..
    set root=(hd0,2)
    set prefix=(hd0,2)/boot/grub
    insmod normal
    normal

    Once I got in
    sudo update-grub
    sudo grub-install /dev/sda1

    fdisk -l
    sda1 = efi
    sda2 = Linux Filesystems
    sda3 = Linux Swap
    I made a error first by installing into sda2, then releasing my error, I've installed it on the efi.

    No errors on install, everything looks perfect, apart from when I reboot the Grub console returns, which I then have to repeat above steps and I'm able to login

    Sorry if I should of raised a new post, unsure but this post seems relative to the "error" I'm receiving

    Any recommendations are greatly appreciated

  18. #68
    Join Date
    2018-Sep
    Posts
    2
    Figured it out

    For some reason the grub.cfg didn't exist in /boot/efi/EFI/debian

    After running grub-mkconfig -o /boot/efi/EFI/debian/grub.cfg

    Grub was bypassed on boot

  19. #69
    Join Date
    2018-Sep
    Posts
    1

    kali linux installinatin

    i do its very carefully but at the time of "grub-install /dev/sda" the result showing no such file directory what i do

  20. #70
    Join Date
    2018-Sep
    Location
    Sydney, Australia
    Posts
    7
    When I tried this, Kali appeared in the boot menu. I clicked on it and received some console messages:-

    Kali GNU/Linux Rolling Kali TTY
    Login:
    Password:

    I logged in and got:

    root@Kali ~#

    Any ideas?

  21. #71
    Join Date
    2018-Jun
    Posts
    1

    Few minor additions to the Solution

    Quote Originally Posted by _defalt View Post
    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.

  22. #72
    Join Date
    2019-Feb
    Posts
    1
    Hey _defalt. I went through the same problem. The first two commands run fine. When i type insmod normal then an error comes. You can see the error in the image.

    This happens when secure boot is enabled. When secure boot is off, then instead of "grub rescue" , the "grub" command menu opens. I type all the 4 commands there and after even typing the last normal command , it stays there . nothing boots. Please help
    Attached Images Attached Images

  23. #73
    Join Date
    2019-Apr
    Posts
    1
    Hey _defalt. Your commands work but only to start Kali.
    When I use the last two commands in the terminal (update-grub and grub-install) it does not mark any error but when I restart my PC, the grub rescue screen continues to appear. I tried to change the installation path to /deb/sda1 which is where I have the Efi partition but no progress.

Similar Threads

  1. Replies: 28
    Last Post: 2018-08-13, 11:49
  2. Dual boot Windows 10 & Kali Linux 2016.2 UEFI
    By stevo4mkd in forum How-To Archive
    Replies: 6
    Last Post: 2017-04-06, 16:55
  3. UEFI Dual Boot Kali Linux 1.0.9 with Windows 8.1
    By kingoking in forum Installing Archive
    Replies: 10
    Last Post: 2016-09-10, 21:43
  4. Dual Boot Kali Linux with Windows 8.1 (UEFI and SECURE BOOT)
    By sentostv in forum Installing Archive
    Replies: 2
    Last Post: 2015-01-01, 02:53
  5. Replies: 2
    Last Post: 2014-07-13, 08:01

Posting Permissions

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