Commit 8117194b authored by Anton Midyukov's avatar Anton Midyukov

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.
parent 4d39e023
......@@ -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
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment