Bug#990497: grub-efi-amd64: grub-install not run if /boot/efi/EFI/debian doesn't exist
Yves-Alexis Perez
corsac at debian.org
Wed Jun 30 19:09:44 BST 2021
Package: grub-efi-amd64
Version: 2.02+dfsg1-20+deb10u4
Severity: normal
Hi,
reporting a bug after an IRC debugging session today.
On a amd64 EFI platform (Buster) I wanted to put the ESP partition on a RAID1
volume, so I recreated the whole thing (RAID1 creation and mkfs.vfat on
the /dev/md1 device), ending with an empty vfat partition.
I then proceeded to dpkg-reconfigure grub-efi-amd64 and chose to force
installation to the removable path (EFI/boot/bootx64.efi) and not to
update NVRAM variables.
After that, grub-install was *not* ran and thus nothing appeared in
/boot/efi/.
Looking at the postinst script, I noticed:
693 grub-efi-ia32|grub-efi-amd64|grub-efi-ia64|grub-efi-arm|grub-efi-arm64)
694 bootloader_id="$(config_item GRUB_DISTRIBUTOR | tr A-Z a-z | \
695 cut -d' ' -f1)"
696 case $bootloader_id in
697 kubuntu) bootloader_id=ubuntu ;;
698 esac
699 if [ "$bootloader_id" ] && [ -d "/boot/efi/EFI/$bootloader_id" ]; then
700 case grub-efi-amd64 in
701 grub-efi-ia32) target=i386-efi ;;
702 grub-efi-amd64) target=x86_64-efi ;;
703 grub-efi-ia64) target=ia64-efi ;;
704 grub-efi-arm) target=arm-efi ;;
705 grub-efi-arm64) target=arm64-efi ;;
706 esac
707 db_get grub2/force_efi_extra_removable
708 if [ "$RET" = true ]; then
709 FORCE_EXTRA_REMOVABLE="--force-extra-removable"
710 fi
711 NO_NVRAM="$(no_nvram_arg)"
712 run_grub_install --target="$target" "$FORCE_EXTRA_REMOVABLE" "$NO_NVRAM"
713 fi
On Debian GRUB_DISTRIBUTOR is set to `debian` so if /boot/efi/EFI/debian
doesn't exist, then grub-install won't be run at all.
It looks like a bug to me, but maybe I missed something.
Regards,
--
Yves-Alexis
More information about the Pkg-grub-devel
mailing list