Dual Boot Install Problem with Windows 8.1 Open SUSE 15.1 Leap (GRUB Stuck on USB!)

Ever considered turning off fast-boot in Windows 8 and UEFI? In my opinion users should load uefi defaults and the turn off both CSM and fast-boot.

Note: Bei einigen EFI-BIOS darf secure-boot während der Installation nicht aktiviert sein - es werden dann keine Einträge in das NVRAM übernommen!
https://wiki.ubuntuusers.de/EFI_Installieren/

In this case, it was not actually relevant to the problem.

In practice – I normally turn off fast-boot options in the BIOS or firmware. I also turn it off in Windows. But turning of fast-boot in Windows doesn’t work. I had to disable hibernation in Windows to prevent it’s fast-boot nonsense (otherwise described as “don’t properly shutdown the Windows file system”).

Yes, I normally have CSM turned off in BIOS/firmware, except when I need it for special reasons. And I normally have secure-boot turned on (which forces CSM to be off). I’m not persuaded that secure-boot provides much security. But having it on does mean that when I boot, I am testing the openSUSE secure-boot implementation and turning up any bugs that might affect my system. I currently have secure-boot on in one machine and off in my other UEFI box.

Yeah, I don’t really have a need for fast or secure boot. I don’t really see much advantage to either of those. My identical laptop with 8.1 and Ubuntu can boot up fine and see grub with or without CSM enabled. I don’t recall seeing if it will boot/see grub with Secure boot enabled.

nrickert, can you let me know if their is any harm in running the command you suggested after booting into my SUSE load with the USB thumb drive?

cd /boot/efi/EFI/Boot
cp /usr/share/efi/x86_64/fallback.efi

I just want to try to avoid any issues with Windows if possible. Thanks!

You won’t know until you try it :stuck_out_tongue:

It should not cause any problems. That file “fallback.efi” is an openSUSE file. But it does not conflict with any Windows file. So it should not affect Windows. However, when you use the installer in UEFI boot mode, and select “Boot from hard drive” from the menu, it checks for the presence of that file to decide whether your disk is ready for booting into an openSUSE system.

Ok, I had one other question about the command and actual syntax and any checks and balances I can do before and after running this command.

I already know my current df, fsbtab, fdisk -l output details so that should be enough to understand what to expect when running your commands.

I was curious if I can do any before and after checks to see what this command will do to any OS files for fstab,etc.

Based on what I looked up when I search for this > “cp /usr/share/efi/x86_64/fallback.efi” this website came up.

From what I understand this will essentially possibly re-write my NVRAM Boot entries by scanning my drive for drive for boot*.csv entries and recreate a Grub boot menu on sda somewhere. Probably here?

/dev/sda2 1845256 2459663 614408 300M EFI System

Does this sound accurate on what your commands are attempting to do? Based on website link above, essentially your commands are going to possibly re-write my NVRAM Boot entries by scanning my drive for drive for boot*.csv entries and recreate a Grub boot menu on sda somewhere. Probably here?/dev/sda2 1845256 2459663 614408 300M EFI System

It appears Windows should still boot after trying your commands but I was just hoping to have a little more reassurance. I was also wondering if I should verify my current Win 8.1 can load the OS via UEFI or legacy mode since this isn’t exactly clear to me. I believe in order to boot my Win 8.1 via UEFI I would need to possibly enable secure boot but I haven’t looked into this consideration.

I should also expect my boot manger to shift the ***** from where it is currently via my USB boot method.

FROM>
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 8192 60604415 60596224 28.9G c W95 FAT32 (LBA)

TO>
/dev/sda2 1845256 2459663 614408 300M EFI System

That is, I should have an * next to my /dev/sda2 as a boot drive instead?

Also, Can you confirm if you meant to have this period . At the end of your original syntax > Below?

cd /boot/efi/EFI/Boot
cp /usr/share/efi/x86_64/fallback.efi  .

Sorry for all the questions & thanks for any additional input!

It won’t touch anything important. All it will do is copy one file to a different directory.

Based on what I looked up when I search for this > “cp /usr/share/efi/x86_64/fallback.efi” this website came up.

Yes, rodsbook explains the use of the file. But you aren’t using it for that purpose. You are only using it because booting from installer and selecting “Boot from hard drive” checks to see if this file is present.

From what I understand this will essentially possibly re-write my NVRAM Boot entries by scanning my drive for drive for boot*.csv entries and recreate a Grub boot menu on sda somewhere. Probably here?

It does that when the opensuse “shim.efi” has been copied to “/boot/efi/EFI/Boot/bootx64.efi”. But you don’t have that. You have the Windows boot file there instead. So it won’t do any of those things.

Does this sound accurate on what your commands are attempting to do?

All I’m attempting to do, is trick the “Boot from hard drive” into actually booting from the hard drive instead of complaining that the file is missing. It isn’t going to do anything else unless we make a bunch of other changes to your disk.

Also, Can you confirm if you meant to have this period . At the end of your original syntax > Below?

cd /boot/efi/EFI/Boot
cp /usr/share/efi/x86_64/fallback.efi  .

Yes, the “.” is intended. It just means “current directory”. You are just copying one file to the directory that you made current with “cd”.

And by the way – yes, it was okay for you to ask those question. It was my mistake to have not explained better.

Awesome. Thanks for the details nrickert! I’m going to get back to this later today or tomorrow.

Hello nricket,

I booted from original USB I used for the install and Ran Syntax Exactly as discussed> Did not notice anything come back on the prompt.
Command appeared to go through fine.

Next, boot off my Dedicated 15.1 Leap USB key to attempt to “Boot From Hard Disk”. I then selected “boot from hard disk”. The screen flashes really quick (probably showing some error?) and the goes back to GRUB menu. After that I no longer see the “Boot from hard disk option”.

So, when I select boot from hard disk it looks like it’s going to work because it goes back to the boot menu but no longer see “boot from hard disk”
But after that I selected openSUSE Leap 15.1 to boot I get this >
Loading Linux 5.12.14-lp151.28.48-default …
error: can’t find command ‘linux’.
Load initial ramdiskerror: can’t find command ‘initrad’.

Press any key

However, what’s interesting if I select Windows Boot Manager (on /dev/sda2) it will boot right into Windows without issues. I’m almost 100% certain this was not the case prior to running your command.

Trying to disable CSM to see if that matters. CSM enabled or disabled does not make a difference. Same results.

Do you think I should try your original solution now?

This one? Thanks again!

mount /dev/sda8  /mnt
### mount your root partition
mount --bind /dev  /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
### those bind mounts make system information available below "/mnt".
chroot /mnt
### this now makes your root file system look like "/".  You are, in effect, in your mounted system
mount -a
### this should mount all remaining needed file systems via /etc/fstab
shim-install
That installs the UEFI booting.
grub2-mkconfig -o /boot/grub2/grub.cfg
### regenerate the grub menu (might not be needed, but play it safe)
mkinitrd
### rebuild the initrd, in case it changes for UEFI booting.  Probably not needed, but play it safe
exit
### this leave the chroot environment
shutdown -r now
That should boot.  And you should now be able to boot with UEFI without needing the USB to be plugged in

Okay. I guess I should have expected that.

Try again. Select that menu entry, but do not hit ENTER. Instead, hit the ‘e’ key.

This should give you an edit window.

Scroll down until you find a line that begins “linux”. And change that “linux” to “linuxefi”.
Scroll down one more line, and that should begin “initrd”. Change that to “initrdefi”.

The use CTRL-X to continue booting.

This is just for testing. We can eventually fix things so that you don’t have to do this every time.

Oh neat! This did work and allowed it to boot after editing those lines!

I still see some sort of error with ‘parse’ in the name that flashes on the screen really quick while it boots into the GUI. But, it has this error on my original USB boot key also. I could probably take a picture with my camera to get exact error if necessary.

Any other tips or ideas how to proceed?

Thank you!

We are making progress. This should put you in openSUSE after booting in UEFI mode, so that UEFI relevant commands work.

I’m not sure what’s the next best step.

You could switch to grub2-efi in Yast bootloader, and I think you already rehearsed that. That will probably fix the booting problem, by building a “grub.cfg” that uses “linuxefi” and “initrdefi” in place of “linux” and “initrd”. But that might break your other way of booting with your other USB. So maybe I’ll let you think about this. By the way, one of the things that I like about Leap 15.2, is that it fixes this. With its newer grub-2.04, “linux” and “linuxefi” do the same thing, so you can have identical “grub.cfg” for UEFI booting and for MBR booting.

For now, while booted in UEFI mode, can you post the output from:

efibootmgr -v

The only difference between “linux” and “linuxefi” is secure boot support. Even grub-efi will use “linuxefi” only if secure boot support is explicitly enabled (granted, this is default on SUSE).

There’s another difference, namely that “linuxefi” is built into “grub.efi” but “linux” isn’t. And that makes a difference here.

Yes, I could suggest that the OP turn off secure-boot support in Yast bootloader. But I want to see his “efibootmgr -v” output before I suggest that.

Here’s that output nrickert. I haven’t even rebooted yet. Thanks again.

linux-1fn2:/etc # efibootmgr -v
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0003,0004
Boot0003* Windows Boot Manager  HD(2,GPT,01f9031f-4dc3-45f8-a77a-a217e12be63d,0x1c2808,0x96008)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot0004* UEFI: KingstonDataTraveler 3.0PMAP    PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0x26ce2674,0xac8,0x1e84)AMBO
linux-1fn2:/etc # 

Interesting. Thanks.

At one time, you seemed to have an entry for “opensuse-secureboot”. And that is not there anymore.

I’ll suggest that you now go ahead and use Yast bootloader. Change the BOOTLOADER to GRUB2 or EFI.

After you have done that, can you again run (as root)

efibootmgr -v

and post the output.

Hello nrickert, can you check this screen shot for grub2-efi setting before I commit.

I’m hoping to avoid any issues booting my Windows system during this process. It has removed protective MBR flag as default. Thanks again.

It looks good.

Words I uttered after changing to secure boot and seeing Grub with Window 8.1 Boot options. “Hold ISH Dude”!!

You rule nrickert!! Thanks for all your help on this!!! :smiley:

I would add to your rep but I’m out of points or something.

I’m glad it is all working for you.

However, I’ll wait until you reboot to Windows and then back to openSUSE a couple of times before I’ll consider it solved.

Everything is looking good nrickert!

Observation in my BIOS:

Secure boot, Fast boot and Launch CSM are all currently disabled.
I have not tried changing any of these to see if I can still boot into Windows/Linux with GRUB menu.

Under boot option priorities in BIOS I have these two:
opensuse-secureboot
Windows Boot Manager

I have booted into Windows 8.1 a few times without issues.

I applied all the pending updates to SUSE Leap 15.1 and am installing some of the programs I like like gkrellm.
So far I’m really liking this Leap 15.1!

I used to run SUSE 11 dual boot on my main Rig but that went EOL a while back.

I really appreciate everyone’s input and help with this!
Thanks a million nrickert! :good: