Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37653 - Always load local disk's GRUB2 configuration #10247

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

goarsna
Copy link
Contributor

@goarsna goarsna commented Jul 17, 2024

We propose to switch to loading the local disk's GRUB2 configuration regardless of weather SecureBoot is enabled or not. This standardizes the boot process under UEFI.

To support SecureBoot for arbitrary operating systems, support for distribution vendor specific boot files will be added by #9864 and the related PRs.

Distribution vendors patch GRUB2 differently which results in

Therefore, in case distribution vendor specific boot files are set up for the operating system of a host, using the chainloader command may lead to problems during boot in case the distribution vendor specific GRUB2 doesn't support the connectefi command - which is at least true for non EL systems.

For SecureBoot enabled hosts this has already been fixed by switching to loading the local disk's GRUB2 configuration (#10207). Now we want to introduce this also for the case that SecureBoot is disabled.

For Windows we still use chainloading as there is no local grub.cfg. The default EL GRUB2 which is used in this case supports the connectefi command. SecureBoot verification is done by the Microsoft certificate in the db.

Load the local disk's GRUB2 configuration regardless of weather
SecureBoot is enabled or not. This standardizes the boot process
under UEFI.

To support SecureBoot for arbitrary operating systems, support for
distribution vendor specific boot files is added separately.

The following existing approaches for local boot don't work (anymore).

Using `chainloader` command:
    - Not supported according to GRUB2 manual [1] if SecureBoot is
      enabled (even if supported by some distribution vendors).
    - Chainloading with disabled SecureBoot requires patched
      `connectefi` command on some platforms which is currently only
      supported by EL GRUB2 binaries.

Using `exit 1` to boot from next boot device by firmware:
    - Tests showed that this behavior is not deterministic across
      different distribution vendor specific boot files.
    - Additional effort would be required to ensure the correct boot
      order.
    - This was introduced with commit b6b3204 for enabled SecureBoot
      only and was already fixed with commit aca4023.

For Windows we still use chainloading as there is no local `grub.cfg`.
The default EL GRUB2 which is used in this case supports the
`connectefi` command. SecureBoot verification is done by the Microsoft
certificate in the db.

[1]: https://www.gnu.org/software/grub/manual/grub/html_node/UEFI-secure-boot-and-shim.html#UEFI-secure-boot-and-shim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants