grub-install error: "efibootmgr: not found"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
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:/
...and this is the most recent bionic version of grub-efi-amd64-bin at the time of writing this bug report: https:/
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: | ubuntu-release-upgrader (Ubuntu) → grub (Ubuntu) |
affects: | grub (Ubuntu) → grub2 (Ubuntu) |
After updating GRUB, does grub-install fail without efibootmgr installed?