"No valid EFI partition"

This morning sudo zypper dup

ran /usr/sbin/shim-install --config-file=/boot/grub2/grub.cfg

which resulted in

Executing %posttrans script  'grub2-i386-pc-2.04-5.1.noarch.rpm'  .................<20%>==========================================================================================|] Output of grub2-i386-pc-2.04-5.1.noarch.rpm %posttrans script:
    update-bootloader: 2020-02-25 23:49:48 <3> update-bootloader-3564 run_command.294: '/usr/lib/bootloader/grub2-efi/install' failed with exit code 1, output:
    <<<<<<<<<<<<<<<<
    target = x86_64-efi
    + /usr/sbin/shim-install --config-file=/boot/grub2/grub.cfg
    No valid EFI partition
    >>>>>>>>>>>>>>>>

Tried with SecureBoot enabled and disabled.

zypper ls -d

# | Alias               | Name                                                                 | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                               
--+---------------------+----------------------------------------------------------------------+---------+-----------+---------+----------+--------+-----------------------------------------------------------------------------------
1 | KDE_Extra           | Additional packages maintained by the KDE team (openSUSE_Tumbleweed) | Yes     | (r ) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/repositories/KDE:/Extra/openSUSE_Tumbleweed/         
2 | openSUSE-20200219-0 | openSUSE-20200219-0                                                  | No      | ----      | ----    |   99     | rpm-md | hd:/?device=/dev/disk/by-id/usb-TOSHIBA_TOSHIBA_USB_DRV_0708358651878421-0:0-part1
3 | repo-debug          | openSUSE-Tumbleweed-Debug                                            | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/tumbleweed/repo/oss/                           
4 | repo-non-oss        | openSUSE-Tumbleweed-Non-Oss                                          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/non-oss/                             
5 | repo-oss            | openSUSE-Tumbleweed-Oss                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/                                 
6 | repo-source         | openSUSE-Tumbleweed-Source                                           | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/source/tumbleweed/repo/oss/                          
7 | repo-update         | openSUSE-Tumbleweed-Update                                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/tumbleweed/             

Everything seems to work just fine though. Except the boot menu “seems” to be missing:

  • Start bootloader from read-only snapshot
  • previous snaphot

Should I be worried? Will this fix itself in the next update?

There was no problem here with “shim-install”, running today’s update.

I have seen that message in the past. But that happened when I had unmounted “/boot/efi” for some reason, and forgot to remount it.

Thanks but I didn’t unmount “/boot/efi” explicitly, It also seems to be mounted

dmesg | grep efi

    5.174734] systemd[1]: Mounting /boot/grub2/x86_64-efi...
    5.183051] systemd[1]: Mounted /boot/grub2/x86_64-efi.
    5.198389] systemd[1]: Mounting /boot/efi...
    5.217005] systemd[1]: Mounted /boot/efi.

efibootmgr -v

BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0005,0000,0006
Boot0000  UEFI KBG40ZPZ1T02 NVMe KIOXIA 1024GB Y9D100U8NTRL 1   PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,8C-E3-8E-04-00-42-6F-ED)/HD(1,GPT,1687c016-6515-4b88-870e-0b8295886cb0,0x800,0x5a000)/File(\EFI\Boot\BootX64.efi)N.....YM....R,Y.
Boot0004* opensuse-secureboot   HD(7,GPT,6870cd5d-501b-4d12-b397-2f29376def7b,0x13bbf000,0xfa000)/File(\EFI\opensuse\shim.efi)
Boot0005* Windows Boot Manager  HD(1,GPT,1687c016-6515-4b88-870e-0b8295886cb0,0x800,0x5a000)/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.}....................
Boot0006  UEFI KBG40ZPZ1T02 NVMe KIOXIA 1024GB Y9D100U8NTRL 1 2 PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,8C-E3-8E-04-00-42-6F-ED)/HD(7,GPT,6870cd5d-501b-4d12-b397-2f29376def7b,0x13bbf000,0xfa000)/File(\EFI\Boot\BootX64.efi)N.....YM....R,Y.

grub2-mkconfig /boot/grub2/grub.cfg ran successfully.

/usr/sbin/shim-install --config-file=/boot/grub2/grub.cfg still gives “No valid EFI partition”

Booting is fine. Everything working.

I’m included to wait for the next update and see what happens.

Given that I’ve got Secure Boot disabled in the BIOS, I did try to disable Secure Boot in YAST but got “cannot find EFI directory”.

What’s the output from:

df /boot/efi

sudo journalctl -b 0 | grep mount

Feb 26 03:29:21 ... systemd[1]: boot-efi.mount: Succeeded.
Feb 26 03:29:21 ... systemd[1]: Unmounted /boot/efi.
Feb 26 03:29:21 ... systemd[1]: boot-grub2-i386\x2dpc.mount: Succeeded.
Feb 26 03:29:21 ... systemd[1]: Unmounted /boot/grub2/i386-pc.
Feb 26 03:29:21 ... systemd[1]: boot-grub2-x86_64\x2defi.mount: Succeeded.
Feb 26 03:29:21 ... systemd[1]: Unmounted /boot/grub2/x86_64-efi.

Seems related https://forums.opensuse.org/showthread.php/538378-Partition-in-etc-fstab-not-mounted-automatically-at-boot/page2
“The issue that systemd unmounts just mounted filesystems early in boot is known”

So I manually do “sudo mount -a” to mount.

Any better workaround?

Thanks

Yes, that is probably the issue you are having. I’m pretty sure that there’s an open bug report on this (maybe linked in the thread that you mentioned).

So I manually do “sudo mount -a” to mount.

As far as I know, that should work.

I have not been seeing this problem. But maybe it only affects people use “btrfs”, which I am not using.

I saw several “immediatly umounted after mount at boot” threads here. I doubt they were all Btrfs related. Some where even non-Linux (NTFS or Vat or similar) and when I remember correct also NFS.

IMHO this bug is a real sucker that emerges at several places. I hope the cause is found and patched asap… :wink:

It’s a robust bug: https://bugzilla.redhat.com/show_bug.cgi?id=1494014 I use btrfs, but have not seen it on Tumbleweed.