grub-install: error: efibootmgr: not found.

Bug #1936857 reported by dann frazier
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned
Xenial
Confirmed
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
grub2-signed (Ubuntu)
Confirmed
Medium
Unassigned
Xenial
Confirmed
Undecided
Unassigned
Bionic
In Progress
Undecided
Unassigned

Bug Description

[Impact]
grub-install from 2.02~beta2-36ubuntu3.32 on xenial/arm64 fails with:

ubuntu@ubuntu:~$ sudo grub-install
Installing for arm64-efi platform.
grub-install: error: efibootmgr: not found.

[Test plan]
Make sure that it works, and we can't uninstall efibootmgr

[Where problems could occur]
Systems that removed grub-efi-amd64-bin (you know, non-EFI systems might do that) get efibootmgr installed unneccessarily.

However I believe this significantly reduces the risk of this breaking again in a future grub2-unsigned update and permits sharing the grub2-unsigned binaries across releases which is what we want.

Related branches

dann frazier (dannf)
Changed in grub2 (Ubuntu Xenial):
status: New → Confirmed
dann frazier (dannf)
Changed in grub2 (Ubuntu Bionic):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

in later releases grub-install has stopped forking to call efibootmgr in favor of using an EFI library.

Does it return non-zero error code? because it should be ignoring failure to call efibootmgr. And otherwise grub installation was completed.

efibootmgr recommends has been added back in Debian, but not yet in Ubuntu. becuase in general it is useful. Previously the dependency was on the grub-efi-arm64-bin package Depends: efibootmgr which is not there in the binary copies.

Imho src:grub2 in xenial/bionic should depend on efibootmgr on amd64 & arm64, or we should add efibootmgr dep in the grub2-unsigned package.

Upgrades should not be affected, since efibootmgr will not be removed. But fresh installs are affected, like the newly respun cloud-image.

Revision history for this message
dann frazier (dannf) wrote : Re: [Bug 1936857] Re: grub-install: error: efibootmgr: not found.

On Tue, Jul 20, 2021 at 07:07:55PM -0000, Dimitri John Ledkov wrote:
> in later releases grub-install has stopped forking to call efibootmgr in
> favor of using an EFI library.
>
> Does it return non-zero error code? because it should be ignoring
> failure to call efibootmgr. And otherwise grub installation was
> completed.

ubuntu@ubuntu:~$ dpkg-query -W grub2-common
grub2-common 2.02-2ubuntu8.23
ubuntu@ubuntu:~$ sudo grub-install
Installing for arm64-efi platform.
grub-install: error: efibootmgr: not found.
ubuntu@ubuntu:~$ echo $?
1

After installing efibootmgr (to demonstrate it is the only issue):

ubuntu@ubuntu:~$ sudo grub-install
Installing for arm64-efi platform.
Installation finished. No error reported.
ubuntu@ubuntu:~$ echo $?
0

> efibootmgr recommends has been added back in Debian, but not yet in
> Ubuntu. becuase in general it is useful. Previously the dependency was
> on the grub-efi-arm64-bin package Depends: efibootmgr which is not there
> in the binary copies.
>
> Imho src:grub2 in xenial/bionic should depend on efibootmgr on amd64 &
> arm64, or we should add efibootmgr dep in the grub2-unsigned package.
>
> Upgrades should not be affected, since efibootmgr will not be removed.
> But fresh installs are affected, like the newly respun cloud-image.

ACK

tags: added: bionic regression-proposed
affects: grub2 (Ubuntu) → grub2-signed (Ubuntu)
Dan Bungert (dbungert)
Changed in grub2-signed (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Dan Bungert (dbungert) wrote :

A newer LP: #1991676 has been filed, talking about ADT failures.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2-signed (Ubuntu):
status: New → Confirmed
description: updated
Changed in grub2-signed (Ubuntu Bionic):
status: Confirmed → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello dann, or anyone else affected,

Accepted grub2 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2/2.02-2ubuntu8.26 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in grub2 (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
dann frazier (dannf) wrote :
Download full text (3.4 KiB)

verified w/ 2.02-2ubuntu8.26

ubuntu@ubuntu:~$ sudo apt install grub2-common grub-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  efibootmgr libefiboot1
Suggested packages:
  multiboot-doc xorriso desktop-base
Recommended packages:
  os-prober
The following NEW packages will be installed:
  efibootmgr libefiboot1
The following packages will be upgraded:
  grub-common grub2-common
2 upgraded, 2 newly installed, 0 to remove and 19 not upgraded.
1 not fully installed or removed.
Need to get 2121 kB of archives.
After this operation, 151 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic/main arm64 libefiboot1 arm64 34-1
 [20.7 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic/main arm64 efibootmgr arm64 15-1
[27.1 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-proposed/main arm64 grub2-common
arm64 2.02-2ubuntu8.26 [477 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-proposed/main arm64 grub-common a
rm64 2.02-2ubuntu8.26 [1596 kB]
Fetched 2121 kB in 1s (2694 kB/s)
Selecting previously unselected package libefiboot1:arm64.
(Reading database ... 96973 files and directories currently installed.)
Preparing to unpack .../libefiboot1_34-1_arm64.deb ...
Unpacking libefiboot1:arm64 (34-1) ...
Selecting previously unselected package efibootmgr.
Preparing to unpack .../efibootmgr_15-1_arm64.deb ...
Unpacking efibootmgr (15-1) ...
Preparing to unpack .../grub2-common_2.02-2ubuntu8.26_arm64.deb ...
Unpacking grub2-common (2.02-2ubuntu8.26) over (2.02-2ubuntu8.25) ...
Preparing to unpack .../grub-common_2.02-2ubuntu8.26_arm64.deb ...
Unpacking grub-common (2.02-2ubuntu8.26) over (2.02-2ubuntu8.25) ...
Setting up grub-efi-arm64-signed (1.187.3~18.04.1+2.06-2ubuntu14.1) ...
Installing for arm64-efi platform.
Installation finished. No error reported.
Setting up libefiboot1:arm64 (34-1) ...
Setting up efibootmgr (15-1) ...
Setting up grub-common (2.02-2ubuntu8.26) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back
to defaults
Setting up grub2-common (2.02-2ubuntu8.26) ...
Processing triggers for systemd (237-3ubuntu10.56) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
W: APT had planned for dpkg to do more than it reported back (20 vs 24).
   Affected packages: grub-efi-arm64-signed:arm64
ubuntu@ubuntu:~$ sudo apt remove efibootmgrstall linux-modules-5.4.0-139-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libefiboot1
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  efibootmgr grub-common grub-efi-arm64 grub-efi-arm64-bin
  grub-efi-arm64-signed grub2-common shim-signed
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what yo...

Read more...

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu Xenial):
status: New → Confirmed
Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02-2ubuntu8.26

---------------
grub2 (2.02-2ubuntu8.26) bionic; urgency=medium

  * Have grub-common depend on efibootmgr on amd64, arm64, i386 (LP: #1936857)
  * grub-check-signatures: Support gzip compressed kernels (LP: #1954683)

 -- Julian Andres Klode <email address hidden> Wed, 01 Feb 2023 18:49:01 +0100

Changed in grub2 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for grub2 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.