Grub and UEFI making life difficult [SOLVED]

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read how to get help
feffer
Level 4
Level 4
Posts: 204
Joined: Mon Jul 07, 2008 7:49 pm

Grub and UEFI making life difficult [SOLVED]

Postby feffer » Tue Aug 22, 2017 8:36 pm

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!
Last edited by feffer on Sun Sep 03, 2017 3:38 pm, edited 1 time in total.

User avatar
austin.texas
Level 20
Level 20
Posts: 11696
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Grub and UEFI making life difficult

Postby austin.texas » Tue Aug 22, 2017 8:53 pm

Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2017

syg00
Level 4
Level 4
Posts: 211
Joined: Fri Jul 21, 2017 4:00 am

Re: Grub and UEFI making life difficult

Postby syg00 » Tue Aug 22, 2017 8:56 pm

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.

feffer
Level 4
Level 4
Posts: 204
Joined: Mon Jul 07, 2008 7:49 pm

Re: Grub and UEFI making life difficult

Postby feffer » Wed Aug 23, 2017 5:51 pm

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...

feffer
Level 4
Level 4
Posts: 204
Joined: Mon Jul 07, 2008 7:49 pm

Re: Grub and UEFI making life difficult

Postby feffer » Sat Sep 02, 2017 10:01 pm

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.

User avatar
catweazel
Level 10
Level 10
Posts: 3320
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Grub and UEFI making life difficult

Postby catweazel » Sat Sep 02, 2017 10:13 pm

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.
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

feffer
Level 4
Level 4
Posts: 204
Joined: Mon Jul 07, 2008 7:49 pm

Re: Grub and UEFI making life difficult

Postby feffer » Sun Sep 03, 2017 3:36 pm

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.

User avatar
catweazel
Level 10
Level 10
Posts: 3320
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Grub and UEFI making life difficult

Postby catweazel » Mon Sep 04, 2017 2:51 am

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.
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.


Return to “Installation & Boot”

Who is online

Users browsing this forum: No registered users and 1 guest