Page 1 of 1

Grub and UEFI making life difficult [SOLVED]

Posted: Tue Aug 22, 2017 8:36 pm
by feffer
Dual booting linux and win for ten years. In the past, Grub2 "saw" windows and my linux systems just fine. Recently got a new machine which has the UEFI system and have had a hard time getting it working properly. Win was installed first, and it's OS lives on an SSD. There is a second SSD (in the M.2 motherboard slot) that has 3 linux distros on it. These seemed also to install OK, and initially GRUB saw them and win. When starting the machine and going to the BIOS (which I guess is now the UEFI) I saw settings for a LOT of boot options, both legacy and UEFI. I disabled Windows "fast boot" and some other windows related settings. But probably did something wrong. Now grub was skipped and the machine booted into windows 10 every time w/o choice. So I went back to BIOS, and disabled all of the UEFI boot options to force it to legacy mode. Now neither win, nor linux would boot. I got the dreaded Grub Rescue > screen. But I couldn't get out, it would not see my grub root partition (and yes, I typed the correct stuff). After googling, I rebooted the install disc and installed the repair-grub (or grub-repair) pkg and tried that. Maybe the EFI boot manager had overwritten grub? I could force the bios to get to Win 10, so I did that and tried to "fix" EFI with the win command terminal using: # bcedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi --- didn't work; neither did 3 or 4 slightly different versions of the command that I found on various sites. Finally, I booted from the lmde install disc and used chroot to fix grub on my first partition (ubuntu). Got error messages...now I was worried. Then I tried chroot into lmde (last installed distro) and from there I could run # grub-install /dev/nvme0n1 (the name of the M.2 SSD) & # update-grub.

Now I got the expected GRUB boot screen except no Windows there. I could boot into either linux distro from GRUB, but not Win 10. I could boot windows by doing F11 to bring up the bios boot screen and choose the windows system SSD from there. This is as far as I've gotten. I rarely boot win anyway, so I could live with this, but it really isn't right. I'm sure this issue has come up before, since googling brought LOTS of info -- which is the problem -- too much, and some of it flat wrong. Could someone who knows, point me in a productive direction? I want to understand basically how to set up the BIOS properly and how to proceed to get Grub to offer all the usual linux options plus Win 10. Thx!

Re: Grub and UEFI making life difficult

Posted: Tue Aug 22, 2017 8:53 pm
by austin.texas

Re: Grub and UEFI making life difficult

Posted: Tue Aug 22, 2017 8:56 pm
by syg00
feffer wrote:These seemed also to install OK, and initially GRUB saw them and win.
So neither grub nor UEFI is making life difficult - your fiddling did.
You may have the option to reset the firmware to it's default - would be worth a try. Rerun boot repair (report mode) and post the link it generates so we can see the lay of the land.

Re: Grub and UEFI making life difficult

Posted: Wed Aug 23, 2017 5:51 pm
by feffer
austin.texas wrote:Maybe this will help...
Fix boot problems with UEFI boot menu:
thx, it seems pretty straight-forward. I have other fish to fry right now but it looks helpful. It is possible that I've over-written something on the win-boot-loader that may require going into bcdedit to fix, but I'd prefer to leave that alone. Now I CAN see all my linux systems in Grub, just not Windows, but I can boot it via F11. I could make things worse...ie make windows unbootable...

Re: Grub and UEFI making life difficult

Posted: Sat Sep 02, 2017 10:01 pm
by feffer
The thread was idle while I was doing other things, but I did have a chance to read the link that Austin.Texas provided, and found this pertinent line:
It is highly likely that if you have installed Ubuntu in legacy mode then the option to boot into Windows doesn't appear in the GRUB menu.
This seems to be my situation. I would like to fix this, but it seems it would require reinstalling my 3 linux distro again, this time in UEFI mode -- this would be the right way to do it. There is some info on the ArchLinux wiki about how to do this. Hardly seems worth the effort though now...I rarely boot into Windows anyway and can always do this via the F11 key (on my system). In any case, I learned quite a bit in the process.

Re: Grub and UEFI making life difficult

Posted: Sat Sep 02, 2017 10:13 pm
by catweazel
feffer wrote:This seems to be my situation. I would like to fix this

Code: Select all

sudo su
add-apt-repository ppa:danielrichter2007/grub-customizer
apt-get update && apt-get install grub-customizer
Start it from the menu. Under General settings, choose 'look for other operating systems'. While you're there, add a few seconds to 'Boot default entry after' then save and reboot.

Re: Grub and UEFI making life difficult

Posted: Sun Sep 03, 2017 3:36 pm
by feffer
Tried installing grub-customizer, it does not show windows. Check for other operating systems is marked. I think my previous post hit the reason for windows being invisible to grub...I used the legacy method to install my linux OS's and grub. The machine is a new build with the latest MSI Z270 mobo and it is designed to use UEFI booting. Being unfamiliar with this, I opted for "legacy" methods, so grub and uefi are ships passing in the night...at a distance! :wink:

I have to consider the issue closed, so I'll mark it SOLVED even though the solution is not exactly what I wanted.

Re: Grub and UEFI making life difficult

Posted: Mon Sep 04, 2017 2:51 am
by catweazel
feffer wrote:Tried installing grub-customizer, it does not show windows. Check for other operating systems is marked. I think my previous post hit the reason for windows being invisible to grub...I used the legacy method to install my linux OS's and grub. The machine is a new build with the latest MSI Z270 mobo and it is designed to use UEFI booting. Being unfamiliar with this, I opted for "legacy" methods, so grub and uefi are ships passing in the night...at a distance! :wink:

I have to consider the issue closed, so I'll mark it SOLVED even though the solution is not exactly what I wanted.
The correct solution may lie in your BIOS settings. Check if you have an option to allow both UEFI and legacy boot.