Installed Leap 42, but it boots into windows

I just installed Leap 42.1 on a win 8.1 computer with UEFI. Installation went fine, no error messages. However, I do not get the boot loader when I turn the computer on. It boots directly into windows.

For some reason, I am not allowed to attach pics (screenshots). Here are my partitions, as seen while installing Leap 42:

Device         Size     Type         FS Type  Label    Mount pt   Start    End
/dev/sda      698 GB   Toshiba HD                                   0  91200
/dev/sda1       1 GB   HPFS/NTFS    NTFS     System                  0    130
/dev/sda2     100 MB   EFI boot     FAT               /boot/efi    130    143
/dev/sda3     128 MB   Microsoft    NTFS                           143    159
/dev/sda4     394 GB   HPFS/NTFS    NTFS     TI106                 159  51653
/dev/sda5      10 GB   HPFS/NTFS    NTFS     Recovery            89898  91200
/dev/sda6       2 CB   Linux swap   Swap              swap       51653  51915
/dev/sda7      40 GB   Linux native BtrFS             /          51915  57137
/dev/sda8     250 GB   Linux native XFS               /home      57137  89898

I created free space for Linux in advance, by using the Windows disk manager.
I turned the computer’s secure boot off (otherwise it would not start installation - it complained “OS on USB not signed”).
I did not change any partition defaults (above) in the Linux installation.
Under bootloader settings:

  • I did not change the default bootloader GRUB2-EFI.
  • However, I did try both checked and unchecked secure boot support
  • I did not change the default protective MRB flag - set.

If the fix requires editing already installed files, I can do that. I am able to boot Ubuntu from USB and see all the Windows and Leap 42 files.

I apologize in advance if the fix is obvious or explained in some other thread. I searched carefully, but did not find anything similar.

Thank you

The UEFI firmware on some computers is biased toward Windows. Perhaps you have one of those.

Since you are able to boot the ubuntu USB, can you check the EFI partition. It should contain a directory: “/EFI/opensuse” (that would show as “/boot/efi/EFI/opensuse” on your installed system). Can you tell us what files are in that directory. The output of “ls -l” would be ideal.

I see that the hard drive is a Toshiba. Is the computer itself a Toshiba? (There are interesting earlier threads on getting UEFI booting to work on a Toshiba).

Thank you.

That directory is empty

ubuntu@ubuntu:/media/ubuntu/5bb1628f-bc3c-47a4-a965-7e11482093f4/boot/efi$ ls -la
total 0
drwxr-xr-x 1 root root   0 Feb 17 02:46 .
drwxr-xr-x 1 root root 580 Feb 17 02:55 ..

Yes, it is a Toshiba Satellite. The UEFI boot menu has boot order (USB, HDD, LAN) and secure boot on/off. Nothing else.

I just saw another thread, reading it…

Then I think something went wrong with your install.

Maybe you booted the install media in legacy mode instead of in UEFI mode.

mixing modes is very bad all OS must boot in same mode

Thanks,

I apologize for my ignorance :slight_smile: Not sure when I could have chosen legacy.

I created the USB stick following these instructions, using Image USB
https://en.opensuse.org/SDB:Create_a_Live_USB_stick_using_Windows

This is what my bootable USB looks like

$ find .
.
./EFI
./EFI/BOOT
./EFI/BOOT/locale
./EFI/BOOT/locale/en.mo
./EFI/BOOT/grub.cfg
./EFI/BOOT/MokManager.efi
./EFI/BOOT/bootx64.efi
./EFI/BOOT/grub.efi
./.packages.grub2-efi
./System Volume Information
./System Volume Information/IndexerVolumeGuid

Then the installation screenshots I saw were similar to these ones, except for the last step - restart.
https://en.opensuse.org/SDB:DVD_installation_for_42.1The ISO is still on my hard drive. Does it make sense to create bootable media again using SUSE Image writer on Windows or on Linux / Mac?

(Did not have many choices, as the ISO exceeds the size of a 4GB DVD. I did burn a BD, but it did not boot, etc)

It is the EFI boot menu you chose how to boot the install media. You will have to consult your machines documentation to see how to get to that menu F10 maybe maybe not:P Often the machine is set to default to legacy boot on CD/USB

Installer should have no options along bottom of screen and it should recommend mounting the EFI boot directory as FAT at /boot/efi it should use grub2-efi not grub2.

Thank you both again.

I now understand that it is not about how I installed Linux (from USB vs DVD, how I made the USB, etc). My Toshiba laptop must have a hidden setting that makes it boot into windows regardless of what you do.

  • Unchecked quick start from the control panel,
  • Disabled Inter Turbo boost from the UEFI menu - just in case
  • Made sure it boots into UEFI mode (as opposed to CSM)
  • Hit F12 while installing again from USB. The only option I got was boot from USB/HDD/LAN, no UEFI/legacy (or confirmation that is was indeed UEFI).
  • Then, during installation, the partitions were fine (like my in original post) and the default bootloader was indeed GRUB2-EFI. I did not have to change anything.

So I guess I will have to erase the windows partition on another computer and install Linux only…

Maybe it is a poor implementation of the UEFI specifications.

Here’s something that you can try:

Boot your install media. Best is to boot to the rescue system.

Mount the EFI partition somewhere (typically at “/mnt”).

Look at the directory “/EFI/opensuse” in that partition. If you mounted at “/mnt”, then that would be “/mnt/EFI/opensuse”. It should contain “grubx64.efi”. It probably also contains “shim.efi”, “grub.cfg”, “grub.efi” and a couple of other files.

There should also be a directory: “/mnt/EFI/Boot” (again, assuming that you mounted at “/mnt”). It probably contains a file “bootx64.efi”.

If all of this checks out, then try:


# cd /mnt/EFI
# mv Boot  oldBoot   ### this is a backup of the "Boot" directory
# mkdir Boot            ### create a new "Boot" directory
# cp opensuse/* Boot/.   ### copy opensuse boot files to "Boot" directory.
# cd Boot                 ### move to "Boot"
# mv shim.efi bootx64.efi  ### this assumes that "shim.efi" exists.  Otherwise
# mv grubx64.efi bootx64.efi  ### do this only if the file "shim.efi" did not exist

Note that anything following a “###” is a comment to explain. You don’t have to type in that part.

Now see if it boots to opensuse.

This is based on what happed with other Toshiba systems that have been discussed here.

If it doesn’t work, then you can delete the new “Boot” and rename the “oldBoot” back to “Boot”, so no harm done.

You must be allowed to set the type of boot (by the specs) But how you change this is up to who ever set up the UEFI. You should be able to get into the UEFI (BIOS) and change it but you need to find the keys to do this it is not at all the same on different machines so you need to dig out the docs on your hardware. Perhaps a visit to the Toshiba web site. F12 may or may not be the right key

On the other hand some UEFI are not to spec and do prefer only Windows (looking at you HP (at least some models))

Thank you for the detailed instructions, it worked! I can now choose Open SUSE or Windows upon startup.

I’m glad to hear that you have things working.

Thank you. Problem already solved (see above), but it is a very good thing to keep in mind when buying a new computer. I did test that I can turn the secure boot off in the store, but did not look at all other details (that I was not aware of).

One more comment.

When you have finished updating your system, that will have updated the boot setup. You should copy those updated files from “/boot/efi/EFI/opensuse” to “/boot/efi/EFI/Boot”, and again rename the appropriate file (probably “shim.efi”) in that “Boot” directory to “bootx64.efi”.

For some unrelated reason, I had to install openSUSE again (clean installation form the boot media), except that now it worked! This time I did something different though.

Before, I was doing something not very clean. After it was done installing, I would simply wait for it to reboot. It would reboot again from the install media, then I would abort, then remove the media, then turn the computer on again. In hindsight, this was not very clean, but I did not think of mentioning it.

Now I did something different. I simply hit F12 (escape to boot menu on my computer) upon restart. Then I unselected USB and selected HDD. It booted fine. I was able to login into both Open SUSE and Windows.

I apologize for overlooking this detail (out of ignorance) and thank you both for your help.