Leap, Windows 10, 2 disks, dual boot, UEFI

I added a second hard drive to my computer. Windows 10 is on the first drive and I want to place openSUSE on the second drive. On startup, I want to display a boot menu where I can select either Windows 10 or openSUSE. You know, what you would expect if I repartitioned the first drive and installed openSUSE in addition to Windows. Nothing I have tried gives me the boot menu.

  1. I installed openSUSE Leap onto the second drive with partitions as follows:
    sdb1 whatever size the default install gives it /boot/efi
    sdb2 8 GiB swap
    sdb3 40 GiB /
    sdb4 rest of the drive /home
    When the installation completes and the system restarts, I am taken directly into Windows 10.

  2. An Internet search yielded an article that states the /boot/efi mount point should be placed on the Windows EFI partition. I repartitioned sdb to eliminate sdb1 above and placed the /boot/efi mount point on the Windows EFI partition. When the installation completes, I get:
    grub>
    Entering exit displays the Boot Option Menu. I selected the openSUSE entry and openSUSE started up. When the startup was complete, I restarted the computer and bang, Windows 10 again.

  3. I also found an article that states I should select sdb first in the UEFI Boot Order. I think it was referring to installing openSUSE on a USB drive, but I looked anyway:
    UEFI Boot Order
    OS boot manager
    USB Diskette on Key/USB Hard Disk
    Internal CD/DVD ROM Drive
    USB CD/DVD ROM Drive
    ! Network Adapter
    So, no entry for sdb, and OS boot manager goes straight to Windows 10.

What do I do to get a boot menu when the computer starts?

I’m not sure what you did there.

On my current desktop, I have two hard drives.

“/dev/sda” contains Windows 8.1, and nothing else.

“/dev/sdb” contains openSUSE 42.3 and openSUSE 15.0 Beta.

I normally get a grub boot menu, where I can choose Windows, openSUSE 42.3 or openSUSE 15.0 Beta (default is 42.3).

I have an EFI partition on “/dev/sdb” used by openSUSE. And the EFI partition on “/dev/sda” is used by Windows.

So I think I’m doing close to what you want.

However: UEFI implementations vary. The one on my computer is actually broken, but having two EFI partitions allows me to work around that.

In your case, I don’t know if you set things up wrongly, or you have a broken UEFI implementation on your system. You did not provide enough information.

Here’s what would help:

  1. Details on your computer (manufacturer, model, etc);
  2. The output of “fdisk -l” (run that as root) or of “parted -l”. Be sure to use code tags if you post this output. Or upload it to susepaste (“paste.opensuse.org”) and provide a link. If you cannot get into openSUSE to run those commands, then boot the installer to the rescue system and get the output of “fdisk -l /dev/sda” and “fdisk -l /dev/sdb”. Or maybe you can use “diskpart” in windows to get partition information.
  3. The output of “df” if you are able to boot openSUSE. If not, a list of mount points for your openSUSE system.

Or whatever information you can provide.

Given that your UEFI is NOT broken this

https://forums.opensuse.org/showthread.php/528400-Repair-a-broken-UEFI-GRUB2-openSUSE-boot-scenario

might help you to repair your installation.

Regards

susejunky

To get to a closer playing field, I reinstalled openSUSE Leap onto sdb. Here are the answers to your requests for more info.

HP Envy 17 circa 2015

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 9580E8EA-B872-4CEE-89A5-DF7F667ABD72

Device          Start        End    Sectors   Size Type
/dev/sda1        2048    1333247    1331200   650M Windows recovery environment
/dev/sda2     1333248    1865727     532480   260M EFI System
/dev/sda3     1865728    2127871     262144   128M Microsoft reserved
/dev/sda4     2127872 1904401458 1902273587 907.1G Microsoft basic data
/dev/sda5  1904402432 1906321407    1918976   937M Windows recovery environment
/dev/sda6  1906321408 1953513471   47192064  22.5G Microsoft basic data

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: EC0F229B-449A-49CB-AE60-D133A6711741

Device         Start        End    Sectors   Size Type
/dev/sdb1       2048     321535     319488   156M EFI System
/dev/sdb2     321536   17092607   16771072     8G Microsoft basic data
/dev/sdb3   17092608  100984831   83892224    40G Microsoft basic data
/dev/sdb4  100984832 1953523711 1852538880 883.4G Microsoft basic data

sdb1 is /boot/efi
sdb2 is swap
sdb3 is /
sdb4 is /home

DO you see the openSUSE entry in the UEFI boot menu?? Can you set the boot to that entry?

No and no. No menu is displayed at startup.

You must press the UEFI key to bring up the UEFI boot menu. This is hardware dependent so can’t tell you which hot key it is (f10/f12 Maybe??). Sometimes it is displayed on the UEFI/BIOS splash screen. Or you have to dig into the hardware docs.

I’m not requoting all of what you wrote.

It all looks good.

You should have a directory “/boot/efi/EFI/opensuse” and it should contain: shim.efi, grub.efi, grub.cfg (and other files).

Check whether the “pmbr_boot” flag is on for either disk. If it is on, then turn it off. Google can help guide you through this.

Some BIOS implementations ignore this flag. Others use it to control whether to use legacy booting or UEFI booting.

I get the following:

Boot Option Menu
OS boot Manager
Boot from EFI File

Selecting OS boot Manager starts Windows. Selecting Boot from EFI File opens File Explorer and shows two entries:

NO VOLUME LABEL.
[Acpi(PNP0A03,0)/PCI(1FI2)/Sata(0,0,0)/HD(Part2, sig<a UUID>)]

NO VOLUME LABEL.
[Acpi(PNP0A03,0)/PCI(1FI2)/Sata(4,0,0)/HD(Part1, sig<a different UUID>)]

Selecting the first volume displays:

<EFI>
<Boot>
<System Volume Information>

Selecting displays:

<.>
<..>
<Microsoft>
<Boot>
<HP>

Selecting the second volume displays:

<EFI>

and selecting it displays:

<.>
<..>
<boot>
<opensuse>

Selecting displays:

<.>
<..>
bootx64.efi
fallback.efi

Selecting either efi file displays the openSUSE GRUB menu.

Instead, if I select , I get:

<.>
<..>
MokManager.efi
grub.efi
shim.efi
grubx64.efi

Selecting any of these efi files displays the openSUSE GRUB menu.

Yes.

I set pmbr_boot to off for both disks. Still boots directly into Windows unless I press:

ESC, F9, Down, Enter, Down, Enter, Down, Down, Down, Enter, Down, Down, Down Enter

See my answer to gogalthorp directly above.

I was expecting the openSUSE GRUB menu when I start the computer, not having to press a minimum of 13 keys to display the menu.

Some EFI firmware is designed to boot any UEFI software as long as it is windows :stuck_out_tongue:

It looks as if you might have one of those.

Some things to try:

1: See if you can set the boot order in your BIOS, to prefer the second hard drive. Perhaps it will then boot opensuse.

2: Copy that “opensuse” directory (in full, “/boot/efi/EFI/opensuse”) to the EFI partition on the first drive. There, the “opensuse” directory should be immediately under “\EFI” (I’m using Windows notation for the moment). If you want to avoid risk of confusion, you can actually give that copied directory a different name. I’m calling it “tw” on my system (originally abbreviation for “tumbleweed”), though I am not actually using it except as a backup.

Once you have copied that, run the following command as Administrator in Windows.


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

If you named the directory something other than “opensuse”, then substitute that name in your command.

If you ever want to undo that command, use (as Administrator in Windows):


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

I don’t know if this will work. We have seen some computers where it doesn’t work. But give it a try. If it does work, then I suggest you create two windows “.CMD” scripts – one to apply that change, and one to undo it.

What it does, is tell Windows to use grub for booting Windows. Note that the grub menu should have an entry to boot Windows so you won’t be locked out of windows.

There’s a problem, though. Some windows updates might not work with those changes. The symptoms are that the update is applied, but then backed out after reboot. So if you run into that, then undo the changes to apply the update, then do them again.

An update:

By setting sda2 to be /boot/efi and installing openSUSE onto sdb, I was able to get openSUSE onto the UEFI menu so I only have to press ESC, F9, Down, Enter to get to the GRUB menu generated by openSUSE. That’s better than the 13 or so keys I had to press before. I have 3 ways of starting Windows (yay!) and two ways of starting openSUSE (latest kernel). At least things are moving in the right direction.

I have played a bit with bcdedit on Windows. Documentation on bcdedit is not the greatest as it tends to be very Windows-centric. Using bcdedit, I will attempt to display the GRUB menu directly. If I succeed, I will report back.

If openSUSE is now present in EFI boot options, the first thing to try is to make it default - either using efibootmgr or using BIOS setup. Posting “efibootmgr -v” output could be helpful.

Output is:

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0000,3000,0002,000F,2001,2002,2003
Boot0000* Windows Boot Manager    HD(2,GPT,6cae1fba-418b-4827-923f-25b160e4a8bb,0x145800,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.}.../................
Boot0002* opensuse-secureboot    HD(2,GPT,6cae1fba-418b-4827-923f-25b160e4a8bb,0x145800,0x82000)/File(\EFI\opensuse\shim.efi)
Boot0004* Internal Hard Disk or Solid State Disk    RC
Boot0005* Internal Hard Disk or Solid State Disk    RC
Boot0006* Internal Hard Disk or Solid State Disk    RC
Boot0008* Internal Hard Disk or Solid State Disk    RC
Boot0009* Internal Hard Disk or Solid State Disk    RC
Boot000A* Internal Hard Disk or Solid State Disk    RC
Boot000D* Internal Hard Disk or Solid State Disk    RC
Boot000E* Internal Hard Disk or Solid State Disk    RC
Boot000F* openSUSE Secure Boot    HD(2,GPT,6cae1fba-418b-4827-923f-25b160e4a8bb,0x145800,0x82000)/File(\EFI\opensuse\shim.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.5.a.d.4.4.0.8.-.4.f.9.8.-.1.1.e.8.-.8.3.d.7.-.3.0.3.a.6.4.e.7.e.8.1.5.}.../................
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

It certainly does seem that way. See comments below.

The second HDD is not an option presented for booting from.

Copying the opensuse directory from the second drive to the EFI partition on the first drive will work temporarily, but I would have to perform that step every time that grub-mkconfig is run on openSUSE. By setting the EFI partition on the first drive as the mount point /boot/efi makes sure that the grub menu is updated every time that grub-mkconfig is run.

This creates a second menu item called OS boot manager in the UEFI menu but does force it to be called at boot time.

I spent some time trying to use efibootmgr. Here are the results:

Assuming the efibootmgr output shown in another post,

sudo efibootmgr

gives:
BootOrder: 0000,3000,0002,2001,2002,2003

Note that there is no Boot2003 in the list of bootable devices.

I restarted the computer and it displays the OpenSUSE GRUB menu, just as I want. Running efibootmgr again gives:
BootOrder: 0002,3002,0000,2001,2002,2003

It has changed. Restarting the computer again displays the grub prompt. Entering exit displays the UEFI menu. I selected the OpenSUSE entry and it starts. Again running efibootmgr gives:
BootOrder: 0000,3000,002,2001,2002,2003

I restarted the computer; it boots directly into Windows.

Yes I had the same problem; Windows updates would not stay applied.

I will have to boot OpenSUSE by going through the UEFI menu.

Thank you to everyone who replied with suggestions.