Browse Source
Merge pull request #461 from kacf/efi_missing
fix: Detect when EFI is not available and disable grub.d integration.
automatic_bootstrap_artifact
Kristian Amlie
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
3 deletions
-
mender-convert-modify
-
modules/probe.sh
|
|
@ -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." |
|
|
|
|
|
@ -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 |
|
|
|