PDA

View Full Version : GRUB loader not shown - Dual boot Windows 10 and Kali linux 2016.2



Snaggor
2017-02-10, 14:49
Hello there.
I know this might possibly be a duplicate of some posts but I didn't find anything in this forum that I didn't either
tried already or that suits my problem.

As you can get from the title i tried to install Kali Linux next to a Windows 10 installation.
Windows 10 already installed and works fine (For some mystery reasons it is still working fine :) )
Let me explain how i installed and what i tried to fix my problems:

(At this point I want to say that I already installed/reinstalled everything several times. i guess about 5-6 times or so...)

- Got the kali iso from official download website.
- Confirmed the checksum with the guide from www.kali.org -> everything ok
- Made Bootable USB Stick with the following command: sudo dd if=kali-linux-2016.2-amd64.iso of=/dev/disk2 bs=1m (also fine as far as i can confirm that)
- Made a free partition in Windows 10 of 150 GB space

In BIOS
- Kept UEFI enabled! (tried the whole thing also with legacy BIOS but didn't help me out)
- Disable Secure Boot in BIOS
- Disabled Fast Boot in Windows energy settings

- Booted the USB Stick from the Boot Manager
- Started the GUI installation

Let me skip the Language/ Network part...

For the partitioning I tried different ways:
- Manual with automatical partitioning
- Manual with manual partition selection (EFI partition, Ext4, Swap ...)
- Guided

Everything was fine. I guess...

But this **** GRUB loader just does not appear while booting.
He is there, installed, i saw it when i looked from live kali.
I also run the command bcdedit /set {bootmgr} /EFI/Kali/grub...efi
But that didnt help.
I tried to repair the GRUB loader with these commands:
mount /dev/sda3 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
grub-install /dev/sda
update-grub
exit
umount /mnt/dev/pts
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt

But at the command grub-install /dev/sda, it said that no EFI partition was found.

I also tried some more stuff but honestly i dont remember everythiing :)

I would be very grateful if you could present me a solution.
Even though I have already tried a lot of things;
I would like to bring the whole thing to run and would like to understand it.

_defalt
2017-02-10, 18:38
Did you notice that the 3 in mount /dev/sda* /mnt would be different for your partition. Open Gparted and see /dev/sda* of your linux partition. For me it is /dev/sda5.
Also show the output of fdisk -l. I doubt that the above commands will work. They need a very little tweak after when you show the output.



In BIOS
- Kept UEFI enabled! (tried the whole thing also with legacy BIOS but didn't help me out)
- Disable Secure Boot in BIOS
You did this one right. Legacy BIOS should not be enabled. People still think that to dual boot kali-linux legacy BIOS should be kept enabled. Even several old guides on internet recommend that but it is wrong. Kali rolling is fully compatible with UEFI.



For the partitioning I tried different ways:
- Manual with automatical partitioning
- Manual with manual partition selection (EFI partition, Ext4, Swap ...)
- Guided

Recommended to choose-
-Manual
-Automatically partition the free space
-All files in one partition
Finish partitioning and write changes to disk

Anyway you still managed to dual boot it. It doesn't matter now. They are just recommendations.

Snaggor
2017-02-10, 21:42
Tanks for your answer.


Did you notice that the 3 in mount /dev/sda* /mnt would be different for your partition. Open Gparted and see /dev/sda* of your linux partition. For me it is /dev/sda5.
Also show the output of fdisk -l. I doubt that the above commands will work. They need a very little tweak after when you show the output.


Yeah i noticed this. But thanks :)

What do you mean with
Anyway you still managed to dual boot it. It doesn't matter now. They are just recommendations. ??

And about what you recommend to choose:
This is exactly the workflow i used the last time.
Tis is also the actual state of the installation, i didn't remove it yet, since i believe that it is installed correctly and the problem is GRUB.

I forgot to mention (yeah i know this might be really important :D )
Every time i start my laptop Windows 10 is booted.
The GRUB loader does not shown, so i am not able to boot kali.
Also there is no instance of Kali in the BIOS Menu.

_defalt
2017-02-11, 04:55
Yeah i noticed this.
I forgot to mention (yeah i know this might be really important :D )
Every time i start my laptop Windows 10 is booted.
The GRUB loader does not shown, so i am not able to boot kali.
Also there is no instance of Kali in the BIOS Menu.
As you said that you were known to write /dev/sda* of your linux partition so I'm assuming it still didn't work which I suspected earlier why it might not work. That's why I asked you to upload the output of fdisk -l. In this output you will see an EFI partition. Check its corresponding name. Most of the time it is /dev/sda1. Write /dev/sda1 in the first command as mount /dev/sda1 /mnt.

Also upload the output here.

I'll soon create a thread on how to deal with this problem in UEFI-PC. I'm counting on you when you solve it. If that workaround doesn't work I've another edit but that should work.



What do you mean with
Anyway you still managed to dual boot it. It doesn't matter now. They are just recommendations. ??

And about what you recommend to choose:
This is exactly the workflow i used the last time.
This is also the actual state of the installation, i didn't remove it yet, since i believe that it is installed correctly and the problem is GRUB.
Recommendations means if you doubt what other options may do then you can stick to recommended option. Though You can choose not to follow them. It doesn't mean that you won't be able to install kali if you don't follow them. Like professionals choose their own way. Instead of automatically partition the free space they may create manual linux partition and assign custom space for swap and home partition. It is upto you.

You still managed to install it without any problem. As you have successfully installed it, it doesn't matter now how did you install. This is what i was saying.

Snaggor
2017-02-13, 22:37
I'm sorry for the delay.

Here is what i get (Kali live from USB with still the same installation as mentioned before)
from fdisk -l :

Device Start End Sectors Size Type
/dev/sda1 2048 923647 921600 450M Windows recovery environment
/dev/sda2 923648 1128447 204800 100M EFI System
/dev/sda3 1128448 1161215 32768 16M Microsoft reserved
/dev/sda4 1161216 690556927 689395712 328.7G Microsoft basic data
/dev/sda5 690556928 966940671 276383744 131.8G Linux filesystem
/dev/sda6 966940672 1000214527 33273856 15.9G Linux swap

_defalt
2017-02-14, 04:39
Edit your 1st command as mount /dev/sda2 /mnt and try them again.

Magnethelm
2017-02-14, 14:21
If the installation of Kali was successful (no errors / automatically reboot) try to check your BIOS.
In Dell notebook you have to add the EFI-entry manual an change the boot order to:
1. Kali-Linux
2. Windows-Boot-Manager

Snaggor
2017-02-14, 20:50
If the installation of Kali was successful (no errors / automatically reboot) try to check your BIOS.
In Dell notebook you have to add the EFI-entry manual an change the boot order to:
1. Kali-Linux
2. Windows-Boot-Manager

Hey thanks for your answer. Already checked the BIOS settings.


Edit your 1st command as mount /dev/sda2 /mnt and try them again.

_defalt i have a problem:
Used terminal in Kali Life mode.
Tried your tip with /dev/sda2

Now i launched:
mount /dev/sda2 /mnt
-> worked fine

But at the command:
mount --bind /dev /mnt/dev
There came the error:
mount: mount point /mnt/dev does not exist

Because the first time, as i used this commands, it worked at this point i tried to create the dirs manually with mkdir /mnt/dev
The same for /mnt/proc , /mnt/sys

After that, all these commands worked:

mount /dev/sda2 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys

But at chroot /mnt the error:
chroot: failed to run command ‘/bin/bash’: No such file or directory
appeared.

Do you have any idea?

_defalt
2017-02-15, 04:09
The grub should be installed in the EFI partition so you have to mount EFI partition too along with your root partition. Run these commands and see if it helps:



sudo mount /dev/sda5 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount /dev/sda2 /mnt/boot/efi
sudo chroot /mnt
grub-install /dev/sda
update-grub
exit
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt

Snaggor
2017-02-16, 08:36
So, your guess was correct. Here is a list of what has come out:

~# sudo mount /dev/sda5 /mnt
~# sudo mount --bind /dev /mnt/dev
~# sudo mount --bind /proc /mnt/proc
~# sudo mount --bind /sys /mnt/sys
~# sudo mount /dev/sda2 /mnt/boot/efi
~# sudo chroot /mnt
~# grub-install /mnt
Installing for x86_64-efi platform.
Installation finished. No error reported.
~# update-grub
Generating grub configuration file ...
Found background image: /usr/....
Foundlinux image: /boot/...
WARNING: Failed to connect to lvmetad. Falling back to device scan.
Adding boot menu entry for EFI firmware configuration
done
~# exit
~# sudo umount /mnt/dev
~# sudo umount /mnt/proc
~# sudo umount /mnt/sys
~# sudo umount /mnt

Then the error appeared:
umount: /mnt: target is busy

I tried the following:
~# sudo umount -l /mnt

which worked.
But after reboot there was still no GRUB loader (hold Shift, klicked ESC like an idiot, klicked ESC - Shift - ESC - Shift ...)

Here is what i get from Boot Manager:
2234

And here from BIOS Boot:
2235

I gess the problem was at WARNING: Failed to connect to lvmetad. Falling back to device scan.

But then i dont understand why the message Adding boot menu entry for EFI firmware configuration
was shown but the GRUB loader still does not appear while starting... ??

_defalt
2017-02-16, 12:49
They should have worked. That's the appropriate way to re-install grub in UEFI.

_defalt
2017-02-16, 12:59
You can skip update-grub command and enter the remaining.

There is a way to disable lvmetad from /etc/lvm/lvm.conf by setting use_lvmetad = 0 but whether it should be done from kali-live root directory or from the mounted linux partition is confusing. You can try this if skipping that step doesn't work.

Snaggor
2017-02-17, 10:25
They should have worked. That's the appropriate way to re-install grub in UEFI.
But shouldn't I see an instance then in BIOS Boot or in the Boot Manager?



There is a way to disable lvmetad from /etc/lvm/lvm.conf by setting use_lvmetad = 0 but whether it should be done from kali-live root directory or from the mounted linux partition is confusing. You can try this if skipping that step doesn't work.
Edited the lvm.conf file and set use_lvmetad = 0.

What would you say could show the GRUB loader on boot?
I mean I found the two solutions (Holding Shift / pressing ESC continuously)
Is there another way to "help" GRUB to show himself? :)


EDIT:
OK, maybe I found the problem, but could not solve it.

I launched all the commands as usually.
But this time, before I unmounted /mnt I checked the /boot directory.
Before the unmount:
~# cd /boot
efi/ grub/
~# cd /boot/grub
fonts/ locale/ x86_64-efi/

After that i unmounted as mentioned before all relevant mountpoints.
After unmount:
~# ls /boot
config-4.6.0-kali1-amd64 System.map-4.6.0-kali1-amd64
initrd.img-4.6.0-kali1-amd64 vmlinuz-4.6.0-kali1-amd64

So grub was no longer in the boot directory, and i don't understand why?
Is it somewhere else?

_defalt
2017-02-17, 19:31
I told you to run those commands again by skipping update-grub command. Did it work?

Modifying lvm.conf was supposed to be that step if earlier resolution didn't have worked. You have modified lvm.conf file of kali-live partition which has no use and is reverted back to its original state after reboot. Even if you manage to set lvm=0 in your B]root[/B] partition that doesn't do anything. It was just to solve that error you were getting while update-grub. There is no other significance of modifying it at all.

Snaggor
2017-02-18, 09:36
I told you to run those commands again by skipping update-grub command. Did it work?

Yeah I did what you told me to do.
Well, it worked to go through all these commands without update-grub but the GRUB loader is still not shown.
So no it didn't work...

_defalt
2017-02-18, 19:11
Run umount /dev/sda2 /mnt/boot/efi and then open file manager. Go to /mnt/boot/efi/EFI/kali see if grubx64.efi is present?

Omega
2017-06-10, 18:12
I also met the same case, pls help me
sda6 is /root
sda7 is swap area
sda8 is /boot


2502
2501

_defalt
2017-06-11, 07:24
I also met the same case, pls help me
sda6 is /root
sda7 is swap area
sda8 is /boot


2502
2501

https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10

Omega
2017-06-11, 12:46
https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10

I already read and error:
2503

2504

_defalt
2017-06-12, 13:17
I already read and error:
2503

2504
Yesterday I did my BIOS update after which kali is no longer present in boot menu options. That is a working solution which I'm also going to use again.

I'm wondering why BIOS update deletes entry of kali but keeps the entry of Windows 10. It may be because kali bootloader is not signed so it removes unsigned bootloaders from the boot menu.

The error you are seeing is just that there is no such directory as /mnt/boot/efi. So create one and run those commands again. Make sure that you create this directory just before you enter mount /dev/sda2 /mnt/boot/efi.

_defalt
2017-06-12, 17:40
I edited the post and ran those commands and my problem is fixed.

https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10

anguilla1980
2017-07-21, 18:59
I have an easier solution I did.

After Kali install in UEFI mode next to a Windows 10 install, I went back into the BIOS, re-enabled SecureBoot, selected the EFI Kali boot file from the now local install (prior it was pointing to the one on the USB drive for install), disabled SecureBoot again, rebooted, then went back into the BIOS and moved the new entry to the top of the boot order, bam. Works perfect.

I hope this helps others.

stellarix
2017-12-12, 02:04
I have same problem also,snaggor are you have fix it?

_defalt
2017-12-12, 07:04
I have same problem also,snaggor are you have fix it?
Have you tried this solution? https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10