Dual boot grub menu not showing; went straight to Windows 10

Hello everyone, pardon me since I’m pretty new to Linux. I’m aware this is a very common problem but after a week of research, I assume that the underlying causes seem to vary.

So last year I’ve got OpenSUSE Tumbleweed installed along with pre-installed Windows 10 on my new computer. Everything went okay and I switched back and forth between the 2 via dual boot menu GRUB. Around last March, my Windows performed a lot of automatic updates. And suddenly I couldn’t boot into OpenSUSE anymore; (re)boot always goes directly to Win10. I didn’t have time and the need to fix that problem at that moment, but now urgencies arise and I need my Linux again.

I’ve followed this](https://forums.opensuse.org/showthread.php/528400-Repair-a-broken-UEFI-GRUB2-openSUSE-boot-scenario) to no avail. (Skip the update GRUB step because I don’t know yet how to connect wifi via command line).

Using bootable USB drive OpenSUSE inside rescue system CLI:


[FONT=courier new] tty1:rescue:~ # efibootmgr -v[/FONT]
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 20001,0000,2002,2003
Boot0000* Windows Boot Manager   HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0001* USB HDD: General UDisk    PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(1,MBR,0x6b36440f,0xd64,0x1e84)RC
Boot0002* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC
Boot0005* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC
Boot2001* EFI USB Device RC 
Boot2002* EFI DVD/CDROM  RC
Boot2003* EFI Network    RC
tty1:rescue:~ #

typing in:
fdisk -l
gives something like:


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  612712699 611551484 291.6G Microsoft basic data
/dev/sda5  612714496  614399999   1685504   823M Windows recovery environment
/dev/sda6  614402048 1174106647 559704600 266.9G Microsoft basic data
/dev/sda7 1174108160 1178304511   4196352     2G Linux swap
/dev/sda8 1178304512 1262194687  83890176    40G Linux filesystem
/dev/sda9 1262194687 1953523711 691329024 329.7G Linux filesystem

Boot mode: [UEFI]
Windows partition: [GPT]
Secure boot: [disabled]
Fast boot: [disabled]

Hardware Specification:
Acer E14 E5-475G-73A3
*NVidia *GeForce 940MX

*Intel *Core i7-7500u
4GB DDR4

I’m looking forward a clue on solving this problem. If possible, I want to restore the system instead of reinstall because of the data and settings. Thank you in advance

Hi and welcome to the Forum :slight_smile:
Just check your system BIOS first to see if you can change the boot order here, or even add a new one?

You want the openSUSE one first, which can be done with the efibootmgr from a rescue system (since this is in the system NVRAM, as in hardware)

Also remove the duplicate entry


efibootmgr -v
efibootmgr -b 5 -B 5
efibootmgr -o 2,0

Run the first command, just to check the output for boot numbers…

So the openSUSE entry should be first selected, then the Windows one…

This the output on a HP machine of mine, Windows is down the list;


efibootmgr -v

BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0002,0003,0000,2001,2002,2004
Boot0000* opensuse-secureboot    HD(1,GPT,39088b4d-7686-453b-b894-c0e2c1a1a382,0x800,0x82000)/File(\EFI\opensuse\shim.efi)
Boot0001* openSUSE    HD(1,GPT,39088b4d-7686-453b-b894-c0e2c1a1a382,0x800,0x82000)/File(\EFI\opensuse\grubx64.efi)RC
Boot0002* Windows Boot Manager    HD(1,GPT,39088b4d-7686-453b-b894-c0e2c1a1a382,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...t................
Boot0003* memtest86 7.5    HD(1,GPT,39088b4d-7686-453b-b894-c0e2c1a1a382,0x800,0x82000)/File(\EFI\memtest\mt8675.efi)
Boot2001* EFI USB Device    RC
Boot3001* Internal Hard Disk or Solid State Disk    RC

Thank you Malcom :slight_smile:

I was surprised to find now one more duplicate:

[FONT=courier new]tty1:rescue:~ # [/FONT][FONT=courier new]efibootmgr -v[/FONT]
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 2001,0000,2002,2003
Boot0000* Windows Boot Manager   HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0001* USB HDD: General UDisk    PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(1,MBR,0x6b36440f,0xd64,0x1e84)RC
Boot0002* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC
**Boot0003* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC**
Boot0005* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC
Boot2001* EFI USB Device RC 
Boot2002* EFI DVD/CDROM  RC
Boot2003* EFI Network    RC

So I ran:


**[FONT=courier new]tty1:rescue:~ # [/FONT]**[FONT=courier new]efibootmgr -b 5 -B 5[/FONT][FONT=courier new]
[FONT=courier new]BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 2001,0000,2002,2003
Boot0000* Windows Boot Manager
Boot0001* USB HDD: General UDisk
Boot0002* Unknown Device
Boot0003* Unknown Device
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
**[FONT=courier new]tty1:rescue:~ # [/FONT]**[FONT=courier new]efibootmgr -b 3 -B 3[/FONT][/FONT][/FONT]
[FONT=courier new][FONT=courier new]BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 2001,0000,2002,2003
Boot0000* Windows Boot Manager
Boot0001* USB HDD: General UDisk
Boot0002* Unknown Device
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network[/FONT][/FONT]

and finally:


[FONT=courier new]**tty1:rescue:~ #** [FONT=Verdana][FONT=courier new]efibootmgr -o 2,0[/FONT]
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0002,0000
Boot0000* Windows Boot Manager
Boot0001* USB HDD: General UDisk
Boot0002* Unknown Device
Boot0003* Unknown Device
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network[FONT=courier new][FONT=Verdana][FONT=courier new]
**tty1:rescue:~ #**[/FONT][/FONT][/FONT][/FONT][/FONT]

Still boot back to Windows 10.
I’m sorry for the long response, had to write the output manually :cry:

I just realized
Boot 0 and 5 (and 3 obviously) seems to have the same UUID. Could this be the problem:question:?

Hi
OK, so lets just delete and re-create and see if that helps…


efibootmgr -b 5 -B 5
efibootmgr -b 2 -B 2
efibootmgr -c -L "opensuse" -l "\\EFI\\opensuse\\grubx64.efi"

Question, is the boot disk sda or sdb (since it shows gpt,2)? If so the need to add -d /dev/sdb to the third command.

Post the output from the following to confirm;


lsblk

Everytime I boot into a new rescue system session a new copy of unknown device appears. That being said, on my second OpenSUSE USB boot after the last edit we have 3 of them :o:

[FONT=courier new]tty1:rescue:~ # [/FONT][FONT=courier new]efibootmgr -v[/FONT]
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 2001,0000,2002,2003
Boot0000* Windows Boot Manager   HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)RC
Boot0001* USB HDD: General UDisk    PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(1,MBR,0x6b36440f,0xd64,0x1e84)RC
Boot0002* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC
Boot0003* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC
Boot0004* Unknown Device:        HD(2,GPT,10472833-174e-4a0f-9866-e0320563d655,0xe1800,0x32000)/File(\EFI\opensuse\grubx64.efi)RC
Boot2001* EFI USB Device RC 
Boot2002* EFI DVD/CDROM  RC
Boot2003* EFI Network    RC
tty1:rescue:~ #

Btw what does (gpt,2) imply?
I’m pretty certain efi partition is /dev/sda2.

[FONT=courier new]tty1:[FONT=Verdana][FONT=courier new]rescue[/FONT]:~ # [/FONT][/FONT][FONT=courier new]blkid | grep EFI
[FONT=Verdana][FONT=courier new]/dev/sda2: UUID="7AAC-5A53"[/FONT] TYPE="vfat" PARTLABEL="**EFI **system partition" PARTUUID="[/FONT][/FONT]174e-4a0f-9866-e0320563d655"

The command slblk gives:

[FONT=courier new]
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0  69.1M  1 loop /parts/mp_0000
loop1    7:1    0  12.9M  1 loop /parts/mp_0001
loop2    7:2    0  51.1M  1 loop /mounts/mp_0000
loop3    7:3    0  45.1M  1 loop /mounts/mp_0001
loop4    7:4    0   4.1M  1 loop /mounts/mp_0002
sda      8:0    0 931.5G  0 disk 
|-sda1   8:1    0   450M  0 part 
|-sda2   8:2    0   100M  0 part 
|-sda3   8:3    0    16M  0 part 
|-sda4   8:4    0 291.6G  0 part 
|-sda5   8:5    0   823M  0 part 
|-sda6   8:6    0 266.9G  0 part 
|-sda7   8:7    0     2G  0 part 
|-sda8   8:8    0    40G  0 part
`-sda9   8:9    0 329.7G  0 part
sdb      8:16   1    15G  0 disk 
|-sdb1   8:17   1   3.8M  0 part 
`-sdb2   8:18   1   4.1G  0 part
sr0     11:0    1  1024M  0 rom

I have deleted all the duplicate of * unknown device* in efibootmgr -v leaving only 1.
I’ve also created new:


[FONT=arial][FONT=courier new]efibootmgr -c - L "opensuse" -l "EFI\\opensuse\\grubx64.efi\\"[/FONT][/FONT]

[/FONT]
Still nothing.

also, every change made on efibootmgr (creating new entry) will show success, but when I reboot and enter *efibootmgr -v *the entries I made disappear as if nothing ever happened before and the *unknown device *gets duplicated instead.

I did a little surfingand found that many people faces the same issue: highly possible efibootmgr is buggy

I’ve been trying to follow this, without commenting. But since you seem to be stuck, I’ll add my two cents worth.

It looks to me as if this is a BIOS (or UEFI firmware) problem. However, since you had it working at one time, I suppose it is also possible that it’s a Windows issue. I don’t have Windows 10, and I haven’t seen Windows 8.1 cause these kinds of problems.

The “Unknown Device” is what indicates a problem. I would expect to see “opensuse” or “opensuse-secureboot” rather than “Unknown Device”. And that’s what suggests a BIOS issue to me.

Is it possible that your BIOS was updated recently? I’m not sure if Windows update would do that, but I don’t know that it wouldn’t.

In any case, here is what I would try in your situation.

I would create a Windows script file “FIXBOOT.CMD” containing:


@echo off
if X%1 == Xwindows goto :win
echo bcdedit /set {bootmgr} path \EFI\opensuse\shim.efi
goto :finish
:win
echo bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi
:finish

Put that somewhere on your Windows system. Here, it is in the user home directory. It has to be run from an Administrator command prompt.

If that works for you the same as it worked here, then the command:

FIXBOOT

should get it to boot opensuse, and

FIXBOOT windows

should revert it to only booting Windows.

This assume that the directory “\EFI\opensuse” in your EFI partition contains a file “shim.efi”. That’s normally there. If it isn’t, then replace “shim.efi” with “grubx64.efi” in that script. If that directory does not even contain “grubx64.efi” then you have more serious problems.

The way this is supposed to work: When Windows boots, it is tricked into calling grub. That should give a menu which allows you to select either openSUSE or Windows.

The downside to this method: some Windows updates may fail. If that happens, then use “FIXBOOT windows” to revert to Windows only booting, and retry the Windows updates. Then switch back again.

No guarantees. Different UEFI firmware behaves differently.

I admire “highly”. What is buggy is firmware of your system - it won’t accept anything that is not Windows. Do not ask me how it determines that it is Windows. You may try changing bootloader in Windows using bcdedit; this was described on this forums before, search for it.

thank you for the advice. I’ll consider it very soon, considering no progress is made.

Thank you nrickert
I’ve copied your script and run admin:

C:\dev>FIXBOOT
bcdedit /set {bootmgr} path \EFI\opensuse\shim.efi

I’m eager to see something, I’ll now reboot.

Hi
If shim.efi doesn’t work, try grubx64.efi since you have secure boot off…

nope, still nada :cry:

shall I return by:

FIXBOOT windows

now?

Is this replacing shim.efi[FONT=arial] with [FONT=courier new]grubx64.efi[/FONT][/FONT][FONT=arial] in FIXBOOT.CMD?[/FONT]

Yes, that’s correct.

On Thu 25 Oct 2018 02:26:02 AM CDT, tropicalSUSE wrote:

nope, still nada :cry:

shall I return by:

Code:

FIXBOOT windows

now?

malcolmlewis;2884290 Wrote:
> Hi
> If shim.efi doesn’t work, try grubx64.efi since you have secure boot
> off…

Is this replacing shim.efi with grubx64.efi in FIXBOOT.CMD?

Hi
I would also suggest a check on the hardware suppliers website in case
there is a BIOS update…

If the windows script doesn’t work, I would be tempted to delete the
efi entries and just put in the openSUSE one to start with, then add
the windows one back in via the efibootmgr command(s).


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.22-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

I’ve checked mine, it’s Insyder V1.16.
The newest available BIOS firmware is V1.21.
Do you think I need to update?

If the windows script doesn’t work, I would be tempted to delete the
efi entries and just put in the openSUSE one to start with, then add
the windows one back in via the efibootmgr command(s).

I don’t know yet what it means and how it is done but at this time I’m a little bit afraid to go that far. :slight_smile:

Considering that efibootmgr runs okay, except that:

  1. Unknown Device
  2. New succesfully created boot entry disappear after reboot
  3. Duplication of entries.

I start to think this problem is “BIOS” firmware-related.
As suggested on the above link, I did an update to the firmware.

However no significant result appears. Even USB stick is not recognized now.

Anyway, I don’t feel like solving it anymore :’(
I’m sure the solution lays somewhere around here, but maybe I’ll just try next time.

Thank you everyone!!! I really appreciate all concerns, help and advice.