missing opensuse EFI boot entry in UEFI and not booting

Hi, another boot issue sigh once they boot I’m quite happy but I seem to have problems getting to that point :slight_smile:

I have an OpenSUSE 13.1 install on a PC with UEFI that was booting happily from a FAT EFI partition. When everything was booting well. the boot settings in UEFI had an entry “opensuse”, along with the physical HDD, USB storage devices (if connected), …

Yesterday I made a change to a setting in the UEFI (changed “Primary Graphics Adapter” from “Onboard” to “PCIe”, so nothing boot-related) after which it won’t boot anymore - no GRUB, nothing, just “Insert boot media”. The “opensuse” boot entry in UEFI is gone, I only see the physical HDD listed.

I booted into Rescue mode - output of fdisk for /dev/sdc is

Disk /dev/sdc: 320.1 GB, 320072933376 bytes, 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt

#         Start          End    Size  Type            Name
 1         2048       321535    156M  EFI System      primary
 2       321536     17108991      8G  Microsoft basic primary
 3     17108992    184875007     80G  Microsoft basic primary
 4    184875008    226822143     20G  Microsoft basic primary

. The root partition is /dev/sdc3. If I mount the root partition to /mnt and the EFI partition to /mnt/boot/efi using

    1  2014-05-05 09:09:15 mkdir -p /mnt/boot/efi
    2  2014-05-05 09:09:29 mount /dev/sdc3 /mnt
    3  2014-05-05 09:09:37 mount /dev/sdc1 /mnt/boot/efi
    4  2014-05-05 09:09:45 mount /dev/sdc4 /mnt/home
    5  2014-05-05 09:09:58 mount --bind /dev /mnt/dev
    6  2014-05-05 09:10:06 mount --bind /proc /mnt/proc
    7  2014-05-05 09:10:19 mount --bind /sys /mnt/sys
    8  2014-05-05 09:10:24 chroot /mnt

there the directory structure looks like



I may have not mounted /boot/efi correctly here, wanted to give you an idea of what is in there.

  1. Is there anything obviously wrong?

  2. If so, what to do? Do I need to install grub2 for example?

  3. More generally, is there some sort of (semi-)universal boot repair tool that checks a number of basic points that would prevent booting

Thanks, I’m a bit at a loss here (as well).

I’m not fully certain if I’m looking in the right direction but from reading http://www.rodsbooks.com/efi-bootloaders/installation.html it looks like the boot loader is correctly set up (located in /boot/efi/EFI/opensuse). This document states that the boot loader needs to be registered with the EFI using efibootmgr. Invoking efibootmgr however gives me

. Anyhow it looks like that might be the issue.

  1. Is that correct?

  2. If so would it be best to attempt to register the boot loader with the EFI (not certain how, haven’t figured out how to resolve the errors it throws) or to use another boot mechanism (grub2 or grub legacy)?


edit: invoking efibootmgr gives

Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.


modprobe efivars gives

FATAL: Could not load /lib/modules/3.11.6-4-default/modules.dep: No such file or directory


edit: looking into this it would seem to indicate that the system is in BIOS mode and not in EFI mode. That would be consistent with not booting anymore after a settings change in UEFI. However I find no toggle that would switch between BIOS and UEFI or anything that even remotely looks like it.

Should I then attempt to install grub using

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sdc

from the chroot?


Found a setting “CSM” which, when set to enable, enables legacy booting. When setting it to disable to see if UEFI booting can be forced it comes up with “The BIOS of your discrete VGA card does not support UEFI GOP so it cannot support CSM disable”. So it looks like the problem may be with the video card (AMD 6450 from ASUS). Having said that, I tried to remove the card and that didn’t bring back the UEFI boot entry. So I may just try to install old fashioned GRUB2 and see if I can get that working. Thanks.

I’m mostly posting to compliment you on your own investigating.

Yes, it looks as if the video card is not compatible with UEFI, though that seems odd.

Your disk is probably GPT partitioned. If you also use Windows, that might be a problem. As I understand it, Windows with GPT requires UEFI, so you would have to switch to legacy MBR partitioning and reinstall Windows.

If you are only using linux, then GPT should be fine. I suggest that you create a BIOS Boot Partition. It can usually fit in the unassigned space before the first ordinary partition (sectors 34-2047). Then install grub2 in the MBR.

Hi, thanks :slight_smile: Investigating is a large part of the fun (though by now I do wish that both my OpenSUSE installs would just boot without hassle… am not asking that much…am I?).

Made some progress

  1. The video card has been installed in the system for some time and it was booting perfectly fine without it, with the difference that it was not set as primary graphics adapter.

  2. There’s an option in the ASROCK UEFI to boot straight into an “UEFI shell”. Did some research on that option and by booting into Rescue and copying the grubx64.efi to another location

# cp /boot/efi/EFI/opensuse/grubx64.efi /boot/efi/shellx64.efi

and… success! Selecting “boot to UEFI shell” loads the GRUB boot menu and from there on it boots.

I had previously attempted to install grub2 using aforementioned commands (grub2-mkconfig and grub2-install) to /dev/sdc1 and /dev/sdc but to no avail - perhaps due to lack of a BIOS Boot partition then. I’ll keep that as a next option, now that the system has booted I’m going to try again to run efibootmgr.

Any ideas that will save me further investigating are definitely welcome, feel free to spoil my fun a bit :wink:

And for posterity: that worked just fine.

# efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\opensuse\\grubx64.efi -L opensuse

as root wrote the opensuse entry back in the UEFI boot entry table and now it boots properly again. Phew. Sorry to be so episodic about the whole thing. I figure my learning struggles may help someone else at some point. Thanks again nrickert!

Yes. Thanks for posting. This problem may well come up for someone else.