View previous topic :: View next topic |
Author |
Message |
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
Posted: Mon Mar 19, 2018 9:03 pm Post subject: Grub drops to prompt after mkconfig finds Win10 [SOLVED] |
|
|
I just set up a dual-boot with Win10. In chroot, grub-mkconfig would not find Win10. (os-prober is installed.) But after booting into my fresh Gentoo install, I could grub-mkconfig again and Win10 was found. But thereafter, Grub dropped to a prompt. I fixed it by chrooting back in and running grub-mkconfig again, where Win10 was not found by Grub.
Until I fix this, I'm using the BIOS to boot into Win10 when I need it.
So it seems something goes wrong when Grub picks up Win10, although no error is reported. What's happening and how do I fix it? _________________ decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Last edited by audiodef on Mon May 07, 2018 11:27 pm; edited 1 time in total |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Mon Mar 19, 2018 9:45 pm Post subject: |
|
|
Are either or neither or both Win10 and Gentoo installed as UEFI? _________________ Defund the FCC. |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Tue Mar 20, 2018 2:52 pm Post subject: |
|
|
"I used the EFI partition that Win10 set up during its own install." That is absolutely the right thing to do. Multiple EFI Systems Partition's (ESP) can cause confusion.
It appears that grub installed on the ESP but can't find or can't read grub.cfg.
Are you sure Windows is behaving? boot windows, Press Win + R > type msinfo32 > press Enter. BIOS Mode entry should be UEFI
Are you sure that the installed Gentoo system was in UEFI mode when you were running grub-install? Boot installed Gentoo. and run ; if "efivarfs on /sys/firmware/efi/efivars type efivarfs (ro,relatime)" appears in the output, your install is in uefi mode and the kernel supports efivars.
Run: Code: | emerge wgetpaste
ls -lR /boot | wgetpaste -t |
If you are using a separate boot partition, Code: | mount /boot
ls -lR /boot | wgetpaste -t | Mount the ESP, assuming the ESP is on /dev/sda2 (note that if /etc/fstab has an entry for /boot and for /boot/efi that the boot partition must be mounted before the ESP is mounted or grub-install will go random) and assuming that you want the ESP to use mount point /boot/efi: Code: | mount /boot/efi /dev/sda2
ls -lR /boot | wgetpaste -t
fdisk -l | wgetpaste -t
mount | wgetpaste -t | post the url's returned. _________________ Defund the FCC. |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Tue Mar 20, 2018 8:08 pm Post subject: |
|
|
Do you have to mind the exact command options used when you did grub-install? _________________ Defund the FCC. |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
bammbamm808 Guru
Joined: 08 Dec 2002 Posts: 548 Location: Hawaii
|
Posted: Wed Mar 21, 2018 2:40 am Post subject: |
|
|
If you get sick of spending do much effort configuring software you might not need, consider the rEFInd boot manager instead. _________________ MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 2070S 8GB
Samsung m.2 NVME pcie-3.0
Etc.... |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 975 Location: The Village, Portmeirion
|
Posted: Wed Mar 21, 2018 2:59 pm Post subject: |
|
|
audiodef wrote: | Using a separate boot partition, but EFI is on the boot partition as /boot/EFI. |
audiodef wrote: | I did
Code: |
grub-install --efi-directory=/boot
|
.... |
I would try grub-install again with --efi-directory=/boot/EFI |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Mar 21, 2018 4:38 pm Post subject: |
|
|
The ls -lR pastebin earlier shows "grub-install --efi-directory=/boot" worked well as far as placing correct files in the correct places on the ESP. (also known, in this case, as the boot partition).
If I grasp the problem correctly: booting installed Gentoo, mounting /boot, running grub-mkinstall -o /boot/grub/grub.cfg (with os-prober installed) produces output resembling mine Quote: | grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
Found Windows Boot Manager on /dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi
Found Gentoo/Linux on /dev/nvme1n1p1
Found SystemRescueCD on /dev/nvme1n1p1
done | thus showing os-prober finding windows.
I am presuming that Quote: | But thereafter, Grub dropped to a prompt. | means on the subsequent reboot? If my presumption is correct the problem is that the generated /boot/EFI/gentoo/grubx64.efi can not find or can not read grub.cfg
If my presumption is wrong and grub-mkconfig displayed the os-prober information and then crashed to a grub prompt without an intervening reboot -- very interesting.
Suggest the following:
boot installed gentoo
Code: | mount /dev/nvme0n1p2 /boot
#copy and post the terminal output of the next 2 commands
#if any remounting required it is very strange
grub-install --target=x86_64-efi --efi-directory=/boot --boot-directory=/boot #excessive,redundant, I know
grub-mkconfig -o /boot/grub/grub.cfg
wgetpaste -t /boot/grub/grub.cfg
efibootmgr -v | wgetpaste -t | post url's, reboot _________________ Defund the FCC. |
|
Back to top |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 975 Location: The Village, Portmeirion
|
Posted: Wed Mar 21, 2018 5:00 pm Post subject: |
|
|
DONAHUE wrote: | The ls -lR pastebin earlier shows "grub-install --efi-directory=/boot" worked well as far as placing correct files in the correct places on the ESP. (also known, in this case, as the boot partition). |
Yes, it would seem to look like it was installed ok. I just wanted to make sure it wasn't saving the value of efi-directory and using it for something else later, or something else using it. |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
Posted: Thu Mar 22, 2018 12:36 pm Post subject: |
|
|
What's happening is this:
emerge -C os-prober (don't find Windows, leave it out)
grub-mkconfig -o /boot/grub/grub.cfg
Output as expected, succeeds
Reboot
Grub appears normally, boot into Gentoo
Now...
emerge os-prober (let's find Windows and include it)
grub-mkconfig -o /boot/grub/grub.cfg
Output as expected, succeeds, Gentoo and Windows written to grub.cfg
Reboot
Grub drops to prompt
If I emerge -C os-prober and redo grub-mkconfig, grub goes back to showing boot options and booting normally into Gentoo.
So the question is: why does this work when Windows is ignored, and grub drops to prompt on reboot after adding Windows to grub.cfg? _________________ decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Thu Mar 22, 2018 4:10 pm Post subject: |
|
|
Is there any terminal output before the grub prompt appears?
Can you pastebin a grub.cfg that includes windows and one that does not?
Suggest print the windows containing grub.cfg. Then boot it and enter the windows menu commands manually at the grub prompt. Record any output from the commands. _________________ Defund the FCC. |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6639 Location: The soundosphere
|
|
Back to top |
|
|
|