Add --force to UEFI grub2-install to bypass Fedora Secure Boot warning
This commit is contained in:
@@ -295,12 +295,12 @@ def configure_system(mount_root, partition_info, user_info=None, disk_device=Non
|
|||||||
|
|
||||||
if uefi:
|
if uefi:
|
||||||
efi_dir = "/boot/efi"
|
efi_dir = "/boot/efi"
|
||||||
# Re-verify mount inside chroot if possible, but we already mounted it outside
|
|
||||||
|
|
||||||
logger.info("Installing GRUB2 for UEFI...")
|
logger.info("Installing GRUB2 for UEFI...")
|
||||||
# Using --removable can help on some systems that don't like efibootmgr entries
|
# Fedora's grub2-install requires --force for EFI to acknowledge it won't be Secure Boot signed
|
||||||
# but for now let's stick to standard and add --recheck
|
run_command(["chroot", mount_root, "grub2-install", "--target=x86_64-efi", f"--efi-directory={efi_dir}", "--bootloader-id=iridium", "--recheck", "--force"])
|
||||||
run_command(["chroot", mount_root, "grub2-install", "--target=x86_64-efi", f"--efi-directory={efi_dir}", "--bootloader-id=iridium", "--recheck"])
|
|
||||||
|
config_dir = os.path.join(mount_root, "boot/efi/EFI/iridium")
|
||||||
|
os.makedirs(config_dir, exist_ok=True)
|
||||||
|
|
||||||
config_path = "/boot/efi/EFI/iridium/grub.cfg"
|
config_path = "/boot/efi/EFI/iridium/grub.cfg"
|
||||||
run_command(["chroot", mount_root, "grub2-mkconfig", "-o", config_path])
|
run_command(["chroot", mount_root, "grub2-mkconfig", "-o", config_path])
|
||||||
|
|||||||
Reference in New Issue
Block a user