Algin with stock Ubuntu desktop boot assets layout#109
Algin with stock Ubuntu desktop boot assets layout#109sil2100 merged 1 commit intocanonical:classicfrom
Conversation
xnox
left a comment
There was a problem hiding this comment.
Needs information
have the matching changes in snapd secboot landed to support multiple bootchains, with multiple bootassets, in different directories?
Last time I tried to update boot chains in snapd it was blocked on not being able to distinguish grubx64.efi and if it comes form Boot or Ubuntu directories.
Please link PR# of changes from snapd, such that we can only land this change, once compatible snpad is in stable.
Is a typo, in both the commit message and this PR title. |
|
@xnox This PR is targeted on the 'classic' branch, which is used to deploy boot assets for classic preinstallation images.
I guess your comment is looking for the '22' and '24' branch. |
|
My understanding is that this branch is used by desktop FDE models such as https://github.com/snapcore/models/blob/master/ubuntu-classic-2310-amd64.model Which perform TPM FDE. Which use snapd & secboot and thus affected by the same blocking issues as the above mentioned Ubuntu Core gadgets. Are you trying to use classic gadget, without support for TPM FDE for image creation only using ubuntu-image tooling? If yes, then this would work but then we need more branches: classic-nofde, classic-withfde, core-withfde. |
|
Thanks! I got your point for TPM FDE case. Let me trigger a discussion for this case with the team. |
I think desktop FDE uses classic-23.04 / classic-23.10 (and presumably classic-24.04 soon) via https://launchpad.net/~ubuntu-core-service/+snap/pc-classic, not this branch |
|
@xnox , after several syncing with CE-PC and HWE, we think the FDE case can be covered.
But, we found BIOSs from IoT projects did not follow UEFI spec. They auto-detect if EFI//shimx64.efi exists, then create and boot the Ubuntu boot entry for EFI/ubuntu/shimx64.efi. If all BIOSs auto-detect shimx64.efi and create a fixed boot entry to use, then the FDE case can be covered. However, maybe there are some BIOSs that not only fetch EFI/ubuntu/shimx64.eif, but also skip to create the boot entry. An idea is our FDE process should detect whether if Ubuntu boot entry exists or not. |
|
@mwhudson Thanks for your information. Do you know the branch maintenance plan in the future? If the branch must be created for newer series (such as 23.04 a branch, 23.10 a branch, 24.04... and so on), the current target branch (class) is only be used for Jammy's previous series. Then it's unnecessary to consider the FDE case in this PR. If the new series' branch will be merged back to the classic branch, we still need to consider the FDE cases. BTW, do you know how many teams reference this repo? Core/Foundation/CE/? Tks. |
|
@LaiderLai I am no longer @ Canonical. Feel free to do whatever, but do test things extensively including refresh of gadget with TPM-FDE to exercise reseal flow. |
I do not.
Yes, I think that's right.
I do not know the plan here. Maybe I should...
I assume you mean "this branch" here? I do not know. |
|
I've reviewed and tested this, and the ESP file layout itself seems fine. But I have a few concerns:
|
- BOOT
- BOOT{ARCH}.EFI
- fbx{ARCH}.efi
- mm{ARCH}.efi
- ubuntu
- BOOT{ARCH}.CSV
- grub.cfg
- grub{ARCH}.efi
- mm{ARCH}.efi
- shim{ARCH}.efi
* Refine Makefile and snapcraft.yaml to support different archtecture build.
Signed-off-by: Laider Lai <laider.lai@canonical.com>
6da08c5 to
3c9f3d7
Compare
|
Thanks for the review. Please help to check my comments inline.
|
sil2100
left a comment
There was a problem hiding this comment.
I chatted with Mate and he recommended that for a preinstalled image 128-256MB ESP should be enough, 1GB might be a bit too big. Can we tweak that?
|
Maybe like this: I'll merge this as-is and then change it myself. |
The EFI boot assets layout of the classic gadget is different from the stock Ubuntu desktop version.
It's better to align them to ensure the same user experience.
And refine Makefile and snapcraft.yaml to support the snap package building correctly with amd64 and arm64 architecture.
Confirmed the default make build still working well after the refinement.