[Bug 1928858] [NEW] grub-install error: "efibootmgr: not found"

Benjamin Curtiss 1928858 at bugs.launchpad.net
Tue May 18 19:20:50 UTC 2021


Public bug reported:

> 1) The release of Ubuntu you are using, via 'lsb_release -rd' or
System -> About Ubuntu

Description:	Ubuntu 18.04.5 LTS
Release:	18.04

> 2) The version of the package you are using, via 'apt-cache policy
pkgname' or by checking in Software Center

grub2-common version: 2.02-2ubuntu8.23
grub-efi-amd64-bin: 2.04-1ubuntu44

> 3) What you expected to happen

`grub-install --force "dummy"` to run correctly when installing into
UEFI

> 4) What happened instead

`grub-install --force "dummy"` failed and output the error `grub-install
error: "efibootmgr: not found"`

I create a custom ubuntu bionic installation cd, which uses the old
debian-installer grub-installer component to install grub onto the
target system. This grub-installer component runs the following command:
`grub-install --force "dummy"`

Recently when installing this custom ubuntu installation cd on a system
using UEFI, debian-installer would fail with an error message stating
"Unable to install GRUB in dummy: Executing 'grub-install dummy' failed.
This is a fatal error."

After some digging, I discovered the root of the issue. From the
/var/log/syslog of the installation, I could see that the fatal error
that occurred during the `grub-install` command was "grub-install:
error: efibootmgr: not found". Digging a bit more, I discovered that on
previous systems, the efibootmgr command was installed via the
efibootmgr package, which was a dependency of grub-efi-amd64-bin.
However, in the most recent version of grub-efi-amd64-bin, efibootmgr
had been moved from "Depends" to "Recommends", and as such was not
included on my custom ubuntu bionic installation cd. Thus, when grub-
install tried to run the efibootmgr command, it was not available.

This is the most recent bionic version of grub-efi-amd64-bin that I've
personally had installed that directly depended on efibootmgr:
https://launchpad.net/ubuntu/bionic/amd64/grub-efi-
amd64-bin/2.02-2ubuntu8.21

...and this is the most recent bionic version of grub-efi-amd64-bin at
the time of writing this bug report:
https://launchpad.net/ubuntu/bionic/amd64/grub-efi-
amd64-bin/2.04-1ubuntu44

I noticed that the upstream version of the package changed from 2.02 to
2.04 between these two versions; I suspect that is partially the cause
of this "Depends" being moved to "Recommends".

I suspect that the solution here would be one of:
- Update grub-efi-amd64-bin to re-add efibootmgr as "Depends"
- Add efibootmgr as "Depends" for grub2-common, since grub2-common is the package that provides the grub-install command that ultimately needs the efibootmgr command to be in place.
- Update grub-install to no longer depend on efibootmgr

I've attached the stderr of `grub-install --verbose --force "dummy"` as
well, just in case it could be useful. There was nothing output to
stdout when the command ran.

** Affects: grub (Ubuntu)
     Importance: Undecided
         Status: New

** Package changed: ubuntu-release-upgrader (Ubuntu) => grub (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1928858

Title:
  grub-install error: "efibootmgr: not found"

Status in grub package in Ubuntu:
  New

Bug description:
  > 1) The release of Ubuntu you are using, via 'lsb_release -rd' or
  System -> About Ubuntu

  Description:	Ubuntu 18.04.5 LTS
  Release:	18.04

  > 2) The version of the package you are using, via 'apt-cache policy
  pkgname' or by checking in Software Center

  grub2-common version: 2.02-2ubuntu8.23
  grub-efi-amd64-bin: 2.04-1ubuntu44

  > 3) What you expected to happen

  `grub-install --force "dummy"` to run correctly when installing into
  UEFI

  > 4) What happened instead

  `grub-install --force "dummy"` failed and output the error `grub-
  install error: "efibootmgr: not found"`

  I create a custom ubuntu bionic installation cd, which uses the old
  debian-installer grub-installer component to install grub onto the
  target system. This grub-installer component runs the following
  command: `grub-install --force "dummy"`

  Recently when installing this custom ubuntu installation cd on a
  system using UEFI, debian-installer would fail with an error message
  stating "Unable to install GRUB in dummy: Executing 'grub-install
  dummy' failed. This is a fatal error."

  After some digging, I discovered the root of the issue. From the
  /var/log/syslog of the installation, I could see that the fatal error
  that occurred during the `grub-install` command was "grub-install:
  error: efibootmgr: not found". Digging a bit more, I discovered that
  on previous systems, the efibootmgr command was installed via the
  efibootmgr package, which was a dependency of grub-efi-amd64-bin.
  However, in the most recent version of grub-efi-amd64-bin, efibootmgr
  had been moved from "Depends" to "Recommends", and as such was not
  included on my custom ubuntu bionic installation cd. Thus, when grub-
  install tried to run the efibootmgr command, it was not available.

  This is the most recent bionic version of grub-efi-amd64-bin that I've
  personally had installed that directly depended on efibootmgr:
  https://launchpad.net/ubuntu/bionic/amd64/grub-efi-
  amd64-bin/2.02-2ubuntu8.21

  ...and this is the most recent bionic version of grub-efi-amd64-bin at
  the time of writing this bug report:
  https://launchpad.net/ubuntu/bionic/amd64/grub-efi-
  amd64-bin/2.04-1ubuntu44

  I noticed that the upstream version of the package changed from 2.02
  to 2.04 between these two versions; I suspect that is partially the
  cause of this "Depends" being moved to "Recommends".

  I suspect that the solution here would be one of:
  - Update grub-efi-amd64-bin to re-add efibootmgr as "Depends"
  - Add efibootmgr as "Depends" for grub2-common, since grub2-common is the package that provides the grub-install command that ultimately needs the efibootmgr command to be in place.
  - Update grub-install to no longer depend on efibootmgr

  I've attached the stderr of `grub-install --verbose --force "dummy"`
  as well, just in case it could be useful. There was nothing output to
  stdout when the command ran.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub/+bug/1928858/+subscriptions



More information about the foundations-bugs mailing list