Skip to content

24 Support shim fallback bootchain#107

Open
olivercalder wants to merge 5 commits intocanonical:24from
olivercalder:24-shim-fallback
Open

24 Support shim fallback bootchain#107
olivercalder wants to merge 5 commits intocanonical:24from
olivercalder:24-shim-fallback

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.

xnox and others added 4 commits October 5, 2023 01:01
Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
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 "$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 <oliver.calder@canonical.com>
@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