[bootloader] Allow skipping the EFI fallback

This commit is contained in:
Adriaan de Groot 2018-01-29 22:55:07 +01:00
parent aed904e3b4
commit 78108c5cda
2 changed files with 15 additions and 6 deletions

View File

@ -33,3 +33,11 @@ grubCfg: "/boot/grub/grub.cfg"
# names since no sanitizing is done.
#
# efiBootloaderId: "dirname"
# Optionally install a copy of the GRUB EFI bootloader as the EFI
# fallback loader (either bootia32.efi or bootx64.efi depending on
# the system). This may be needed on certain systems (Intel DH87MC
# seems to be the only one). If you set this to false, take care
# to add another module to optionally install the fallback on those
# boards that need it.
installEFIFallback: true

View File

@ -269,13 +269,14 @@ def install_grub(efi_directory, fw_type):
os.makedirs(install_efi_boot_directory)
# Workaround for some UEFI firmwares
efi_file_source = os.path.join(install_efi_directory_firmware,
efi_bootloader_id,
efi_grub_file)
efi_file_target = os.path.join(install_efi_boot_directory,
efi_boot_file)
if libcalamares.job.configuration.get("installEFIFallback", True):
efi_file_source = os.path.join(install_efi_directory_firmware,
efi_bootloader_id,
efi_grub_file)
efi_file_target = os.path.join(install_efi_boot_directory,
efi_boot_file)
shutil.copy2(efi_file_source, efi_file_target)
shutil.copy2(efi_file_source, efi_file_target)
else:
print("Bootloader: grub (bios)")
if libcalamares.globalstorage.value("bootLoader") is None: