mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[bootloader] Fix sb-shim mode to write grub.cfg into the ESP
src/modules/bootloader/main.py (install_secureboot): Run the configured grubMkconfig command (should be `grub-mkconfig` or `grub2-mkconfig`) to create `/boot/efi/EFI/$efi_bootloader_id/grub.cfg`. The sb-shim is just a chainloader to GRUB 2, which expects a grub.cfg in that location, so something has to create it or the installed system will not boot beyond the GRUB rescue shell. (install_grub): Fix misleading comment above the grubMkconfig call: it is not the file specified in grubCfg that should be already filled out by the grubcfg job module, that file is written by `grub*-mkconfig` using `/etc/default/grub` as the input file. It is that input file `/etc/default/grub` that should already be filled out by the grubcfg job module. (The same input file is used in install_secureboot.)
This commit is contained in:
parent
ec15cfb58d
commit
ec7c5a4611
1 changed files with 9 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
||||||
# Copyright 2014, Anke Boersma <demm@kaosx.us>
|
# Copyright 2014, Anke Boersma <demm@kaosx.us>
|
||||||
# Copyright 2014, Daniel Hillenbrand <codeworkx@bbqlinux.org>
|
# Copyright 2014, Daniel Hillenbrand <codeworkx@bbqlinux.org>
|
||||||
# Copyright 2014, Benjamin Vaudour <benjamin.vaudour@yahoo.fr>
|
# Copyright 2014, Benjamin Vaudour <benjamin.vaudour@yahoo.fr>
|
||||||
# Copyright 2014, Kevin Kofler <kevin.kofler@chello.at>
|
# Copyright 2014-2019, Kevin Kofler <kevin.kofler@chello.at>
|
||||||
# Copyright 2015-2018, Philip Mueller <philm@manjaro.org>
|
# Copyright 2015-2018, Philip Mueller <philm@manjaro.org>
|
||||||
# Copyright 2016-2017, Teo Mrnjavac <teo@kde.org>
|
# Copyright 2016-2017, Teo Mrnjavac <teo@kde.org>
|
||||||
# Copyright 2017, Alf Gaida <agaida@siduction.org>
|
# Copyright 2017, Alf Gaida <agaida@siduction.org>
|
||||||
|
@ -339,8 +339,8 @@ def install_grub(efi_directory, fw_type):
|
||||||
"--force",
|
"--force",
|
||||||
boot_loader["installPath"]])
|
boot_loader["installPath"]])
|
||||||
|
|
||||||
# The file specified in grubCfg should already be filled out
|
# The input file /etc/default/grub should already be filled out by the
|
||||||
# by the grubcfg job module.
|
# grubcfg job module.
|
||||||
check_target_env_call([libcalamares.job.configuration["grubMkconfig"],
|
check_target_env_call([libcalamares.job.configuration["grubMkconfig"],
|
||||||
"-o", libcalamares.job.configuration["grubCfg"]])
|
"-o", libcalamares.job.configuration["grubCfg"]])
|
||||||
|
|
||||||
|
@ -395,6 +395,12 @@ def install_secureboot(efi_directory):
|
||||||
"-p", efi_partition_number,
|
"-p", efi_partition_number,
|
||||||
"-l", install_efi_directory + "/" + install_efi_bin])
|
"-l", install_efi_directory + "/" + install_efi_bin])
|
||||||
|
|
||||||
|
# The input file /etc/default/grub should already be filled out by the
|
||||||
|
# grubcfg job module.
|
||||||
|
check_target_env_call([libcalamares.job.configuration["grubMkconfig"],
|
||||||
|
"-o", os.path.join(efi_directory, "EFI",
|
||||||
|
efi_bootloader_id, "grub.cfg")])
|
||||||
|
|
||||||
|
|
||||||
def vfat_correct_case(parent, name):
|
def vfat_correct_case(parent, name):
|
||||||
for candidate in os.listdir(parent):
|
for candidate in os.listdir(parent):
|
||||||
|
|
Loading…
Add table
Reference in a new issue