tar2fs: grub-efi without Secure Boot

If build is performed on a system with EFI Secure Boot enabled,
then grub will not boot even on EFI without Secure Boot.
This problem is caused by the use of the --removable option, which
is not compatible with option --uefi-secure-boot  the current grub.
Option --uefi-secure-boot is enabled automatically if the system is
booted in EFI Secure Boot mode.
This commit is contained in:
Anton Midyukov 2020-01-15 21:50:17 +07:00
parent 4d39e0236d
commit 8117194b02

View File

@ -376,21 +376,26 @@ grub-efi)
chroot "$ROOTFS" grub-mkconfig -o /boot/grub/grub.cfg
case "$ARCH" in
*86)
chroot "$ROOTFS" grub-install --target=i386-efi --removable
chroot "$ROOTFS" grub-install --target=i386-efi --recheck \
--removable --no-uefi-secure-boot
sed -i 's/initrd16/initrdefi/g' "$ROOTFS/boot/grub/grub.cfg"
sed -i 's/linux16/linuxefi/g' "$ROOTFS/boot/grub/grub.cfg"
;;
x86_64)
chroot "$ROOTFS" grub-install --target=i386-efi --removable
chroot "$ROOTFS" grub-install --target=x86_64-efi --removable
chroot "$ROOTFS" grub-install --target=i386-efi --recheck \
--removable --no-uefi-secure-boot
chroot "$ROOTFS" grub-install --target=x86_64-efi --recheck \
--removable --no-uefi-secure-boot
sed -i 's/initrd16/initrdefi/g' "$ROOTFS/boot/grub/grub.cfg"
sed -i 's/linux16/linuxefi/g' "$ROOTFS/boot/grub/grub.cfg"
;;
aarch64)
chroot "$ROOTFS" grub-install --target=arm64-efi --removable
chroot "$ROOTFS" grub-install --target=arm64-efi --recheck \
--removable --no-uefi-secure-boot
;;
armh)
chroot "$ROOTFS" grub-install --target=arm-efi --removable
chroot "$ROOTFS" grub-install --target=arm-efi --recheck \
--removable --no-uefi-secure-boot
;;
esac
;;