From da85b629a5f1deeb84fbd2ffcaf236972cd8faf9 Mon Sep 17 00:00:00 2001 From: Huijing Hei Date: Fri, 11 Nov 2022 20:25:12 +0800 Subject: [PATCH] create_disk.sh: using the target system's `grub2-install` to install BIOS/PReP bootloader Fix https://github.com/coreos/coreos-assembler/issues/3156 --- src/create_disk.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/create_disk.sh b/src/create_disk.sh index 7f2b9cd168..4cf155e316 100755 --- a/src/create_disk.sh +++ b/src/create_disk.sh @@ -476,7 +476,9 @@ x86_64) if [ "${x86_bios_bootloader}" = 1 ]; then # And BIOS grub in addition. See also # https://github.com/coreos/fedora-coreos-tracker/issues/32 - grub2-install \ + # Install BIOS/PReP bootloader using the target system's grub2-install, + # see https://github.com/coreos/coreos-assembler/issues/3156 + chroot_run /sbin/grub2-install \ --target i386-pc \ --boot-directory $rootfs/boot \ --modules mdraid1x \ @@ -489,7 +491,7 @@ aarch64) ;; ppc64le) # to populate PReP Boot, i.e. support pseries - grub2-install --target=powerpc-ieee1275 --boot-directory $rootfs/boot --no-nvram "${disk}${PREPPN}" + chroot_run /sbin/grub2-install --target=powerpc-ieee1275 --boot-directory $rootfs/boot --no-nvram "${disk}${PREPPN}" install_grub_cfg ;; s390x)