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

24 Support shim fallback bootchain #107

Open
wants to merge 5 commits into
base: 24
Choose a base branch
from

Conversation

olivercalder
Copy link
Member

@olivercalder olivercalder commented Oct 5, 2023

Adjust the EFI boot assets to place shim and grub binaries in EFI/ubuntu/, with boot and fallback binaries in EFI/BOOT/. Additionally, BOOT${arch}.CSV and mm${arch}.efi are placed in EFI/ubuntu/.

This corresponds to work being done in snapd to support shim fallback: canonical/snapd#13205

This corresponds to PR #106 , and is designed to be eventually backported to branches 22 and 20.

The possible boot patterns are:

  1. If EFI boot variables are set correctly, boot the desired asset correctly (namely, EFI/ubuntu/shim${arch}.efi).
  2. If the system supports fallback, then EFI/BOOT/fb${arch}.efi is run, which searches for BOOT${arch}.CSV, finds it in EFI/ubuntu/, and thus boots the corresponding assets in EFI/ubuntu/.
  3. If fallback is not supported, the system directly boots EFI/BOOT/BOOT${arch}.efi.

Copy link
Member

@alfonsosanchezbeato alfonsosanchezbeato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, some comments though:

  • Looks like the right time to remove shim from the boot partition (it has never been used)
  • 2.61 might be too optimistic
    See also comment below.

In any case, the PR cannot be merged until a snapd version with support for this has landed.

install -m 644 "$shim_path" "$CRAFT_PART_INSTALL"/shim.efi.signed
install -m 644 "$grub_path" "$CRAFT_PART_INSTALL"/${grub_bin%.signed}
install -m 644 "$fb_path" "$CRAFT_PART_INSTALL"/$fb_bin
install -m 644 "$mm_path" "$CRAFT_PART_INSTALL"/$mm_bin
install -m 644 "$csv_path" "$CRAFT_PART_INSTALL"/$boot_csv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe time to make this a for loop

As it is not really used at all from there.

Signed-off-by: Oliver Calder <[email protected]>
@olivercalder
Copy link
Member Author

This PR is being taken over by @valentindavid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants