No GRUB at startup - Dual boot Win 8.1 & Opensuse 13.1

I installed Opensuse 13.1 alongside WIndows 8.1 on an HP Envy 15-J073CL laptop that came with Windows 8.1 pre-installed. When I boot the computer, it goes directly into Windows instead of displaying GRUB.

If I press F9 at startup to display the BIOS boot manager, I can choose “Opensuse” instead of “OS Boot Manager,” and GRUB will appear. I can then choose either Opensuse or Windows from GRUB. Opensuse and WIndows can both start successfully from GRUB.

I was unable to find an option in the BIOS to load “Opensuse” by default instead of “OS Boot Manager.” Also, in the UEFI Boot Order section of the BIOS, “Opensuse” is not listed - only “OS Boot Manager” is there.

How can I get GRUB to load at startup so that I do not have to press F9 every time I want to run Opensuse?

While running opensuse, please run the commands (as root):


# df
# efibootmgr -v

Post the output in a code block. You can use the ‘#’ symbol in the edit box header to create a code box.

Actually, “df” need not be run as root. You can do that as a normal user.

Here’s the output. Thank you!

df

Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda8       20510716 4616304  14829456  24% /
devtmpfs         5710852      16   5710836   1% /dev
tmpfs            5724408      76   5724332   1% /dev/shm
tmpfs            5724408    5244   5719164   1% /run
tmpfs            5724408       0   5724408   0% /sys/fs/cgroup
tmpfs            5724408    5244   5719164   1% /var/lock
tmpfs            5724408    5244   5719164   1% /var/run
/dev/sda2         262144  102324    159820  40% /boot/efi
/dev/sda9      571732824  113704 570440776   1% /home


efibootmgr -v

BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0006,3006,0004,2001,2002,2003
Boot0000* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0001* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0002* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0003* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0004* opensuse      HD(2,c8800,82000,2b7ccbc2-8e51-4a9d-8f6e-35ee2b7c346b)File(\EFI\opensuse\grubx64.efi)
Boot0006* Windows Boot Manager  HD(2,c8800,82000,2b7ccbc2-8e51-4a9d-8f6e-35ee2b7c346b)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.}...I................
Boot2001* USB Drive (UEFI)      RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)      RC
Boot3000* Internal Hard Disk or Solid State Disk        RC
Boot3001* Internal Hard Disk or Solid State Disk        RC
Boot3002* Internal Hard Disk or Solid State Disk        RC
Boot3004* Internal Hard Disk or Solid State Disk        RC
Boot3005* Internal Hard Disk or Solid State Disk        RC
Boot3006* Internal Hard Disk or Solid State Disk        RC


Thanks.

Looking at the “efibootmgr” output, there’s a bunch of duplication. I’ll ignore that for the moment.

Can you try the command (as root)


# efibootmgr -o 0004,0006

That sets the boot order, with opensuse first.

It might not solve the problem, but it is worth a try.

My experience is that UEFI implementations vary greatly, and some give priority to Windows. What we need to do is to find the quirks in your system’s implementation, and then see if we can work around them.

I tried efibootmgr -o 0004,0006 but it still boots straight into Windows.

Here’s the output of efibootmgr -v after making the change:


BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0004,0006
Boot0000* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0001* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0002* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0003* Internal EFI Shell    MM(b,a9b08010,aa30800f)RC....
Boot0004* opensuse      HD(2,c8800,82000,2b7ccbc2-8e51-4a9d-8f6e-35ee2b7c346b)File(\EFI\opensuse\grubx64.efi)
Boot0006* Windows Boot Manager  HD(2,c8800,82000,2b7ccbc2-8e51-4a9d-8f6e-35ee2b7c346b)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.}...I................
Boot2001* USB Drive (UEFI)      RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)      RC
Boot3000* Internal Hard Disk or Solid State Disk        RC
Boot3001* Internal Hard Disk or Solid State Disk        RC
Boot3002* Internal Hard Disk or Solid State Disk        RC
Boot3004* Internal Hard Disk or Solid State Disk        RC
Boot3005* Internal Hard Disk or Solid State Disk        RC
Boot3006* Internal Hard Disk or Solid State Disk        RC

Okay. It was worth a try, but I am not surprised that it didn’t work.

Here’s the next thing to try:

1: Make a backup of the directory “/boot/efi/EFI/Boot”.
There’s probably only one file there, namely “bootx64.efi”. To backup, you can just copy to somewhere safe. If what I am suggesting does not work, you should restore that.

2: Copy “/boot/efi/EFI/opensuse/*” to “/boot/efi/EFI/Boot”. Suggested commands:


# cd /boot/efi/EFI/Boot
# cp -p ../opensuse/* .
# mv grubx64.efi bootx64.efi

3: The third step was already in that list of commands – namely, rename “grubx64.efi” as “bootx64.efi”

4: Reboot, to test if this works.

Explanation: According to the UEFI standards, a system is supposed to boot the systems defined in NVRAM. That’s what we were listing with “efibootmgr -v”. But some implementations are not doing that. There’s a fallback to booting a device. And that fallback is to use “\EFI\Boot\bootx64.efi” in the EFI partition. My suggestions set your system up so that the fallback to the device should boot the grub menu.

I tried copying and renaming the grubx64.efi file as you instructed, but it still booted into Windows. I then restored the original bootx64.efi file.

Okay. So we will try the next possibility. This one works well for me with a Dell, but I have had mixed reports on whether it works on an HP.

Boot into Windows.

Open an administrator command prompt.

Enter the command:


bcdedit /set {bootmgr} path \EFI\opensuse\grubx64.efi

If it works, this tells Windows to use grub as the Windows boot manager. You can still boot into Windows using the grub menu entry for that.

The Windows command to undo this, also from an Admin command prompt, is:


bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi

I tried that, and it still booted to Windows. I entered bcdedit /enum, and confirmed that it was set to use grubx64.efi. Here’s the output:

C:\WINDOWS\system32>bcdedit /enum

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume2
path                    \EFI\opensuse\grubx64.efi
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {f34317fc-850a-11e3-85fc-b6e5c5a75e68}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \WINDOWS\system32\winload.efi
description             Windows 8.1
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {f34317fe-850a-11e3-85fc-b6e5c5a75e68}
recoveryenabled         Yes
isolatedcontext         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \WINDOWS
resumeobject            {f34317fc-850a-11e3-85fc-b6e5c5a75e68}
nx                      OptIn
bootmenupolicy          Standard

In that case, you might as well put it back to the default.

Your UEFI implementation is doing some weird things.

The other method that some people have used, has been to:

backup the “\EFI\Microsoft” directory in the EFI partition (I’m using Microsoft name format here);
copy the content of the opensuse directory to “\EFI\Microsoft\Boot”
Rename “grubx64.efi” to “bootmgfw.efi”.
Change the grub menu to boot Windows via “\EFI\Boot\bootx64.efi” which is actually identical to the installed “bootmgfw.efi”

I don’t guarantee that will work. I don’t much like that way of doing things, because Windows could reinstall or update its boot code, and undo things. It does a bit too much messing with things for my liking. But you can try it if you like.

I think if it were my box, I would live with having to hit F12 during boot and selecting opensuse at the BIOS prompt.

I do hope that vendors sort out these incomplete UEFI implementations, so that we can avoid this kind of messing around.

I think I’ll just live with pressing F9. I don’t want to risk having a Windows Update render the system inoperable. Thank you for all your help lol!

On Thu 20 Mar 2014 04:36:01 AM CDT, jasoncoxTX wrote:

I think I’ll just live with pressing F9. I don’t want to risk having a
Windows Update render the system inoperable. Thank you for all your
help lol!

Hi
If you boot mostly to openSUSE, then use the efibootmgr -n
(nextboot) option but when you boot next time into windows 8.1 you need
to do the F9 routine to get back to openSUSE.

There is one other option is to delete all the entries and re-create
with openSUSE as 0000, but I use the F9 and nextboot option on my HP
2000 system.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-7-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!