Bug#846927: does not check return value

Daniel Bayer daniel at halbordnung.de
Sun Dec 4 12:12:26 UTC 2016


Package: grub2-common
Version: 2.02~beta3-3
Severity: normal
File: /usr/sbin/grub-install

Hi!

grub-install does not check the return value of
efibootmgr:

| grub-install: info: Registering with EFI: distributor = `debian', path = `\EFI\debian\grubx64.efi', ESP at hostdisk//dev/sda,gpt1.
| grub-install: info: executing efibootmgr --version </dev/null >/dev/null.
| grub-install: info: executing modprobe -q efivars.
| grub-install: info: executing efibootmgr -c -d /dev/sda -p 1 -w -L debian -l \EFI\debian\grubx64.efi.
| Could not prepare Boot variable: No space left on device
| Installation finished. No error reported.

Despite efibootmgr failing and returning an eror code (5)
grub-install claims installation was successful. This
resulted into an unbootable system. See also
#845023 for an example.

grub-install should check the return code of efibootmgr,
report it to the user, and (idealy) suggest a strategy
to workaround this firmware bug.


Daniel



More information about the Pkg-grub-devel mailing list