diff --git a/mender-convert-modify b/mender-convert-modify index 7168716..d249365 100755 --- a/mender-convert-modify +++ b/mender-convert-modify @@ -140,7 +140,9 @@ if [ "${MENDER_GRUB_EFI_INTEGRATION}" == "y" ]; then # Check for known U-Boot problems in all files on the boot partition. check_for_broken_uboot_uefi_support work/boot - if [ "$MENDER_GRUB_D_INTEGRATION" = y ] || ( [ "$MENDER_GRUB_D_INTEGRATION" = auto ] && supports_grub_d "work/rootfs" ); then + if [ "$MENDER_GRUB_D_INTEGRATION" = y ] || ( [ "$MENDER_GRUB_D_INTEGRATION" = auto ] \ + && supports_grub_d_and_efi "work/boot" "work/rootfs" ); then + # No need to install Grub, use the one already present, and only install # our tools. log_info "Not installing GRUB EFI bootloader, relying on platform provided one." diff --git a/modules/probe.sh b/modules/probe.sh index f1705be..6a00687 100644 --- a/modules/probe.sh +++ b/modules/probe.sh @@ -344,8 +344,10 @@ is_efi_compatible_kernel() { return 0 } -supports_grub_d() { - test -d "$1"/etc/grub.d || return 1 +supports_grub_d_and_efi() { + test -d "$1"/EFI || return 1 + test -d "$2"/boot/efi || return 1 + test -d "$2"/etc/grub.d || return 1 # Because we are executing programs inside a chroot in the image, we cannot # currently convert non-native architectures to use grub.d integration. See