Closed anonymouse64 closed 4 years ago
@xnox done, applied your suggested changes and rebased on 20.
Snapd will be ready for this change with https://github.com/snapcore/snapd/pull/7947, so this PR and that one should happen at the same time I think
@anonymouse64 with a small tweak we can de-couple the two.
One can test for presence of the unpacked kernel, if there isn't one, fallback to the "just boot anything one can find on ubuntu-data" which is what we currently have.
This implements the new UC20 spec for loading kernels and failover handling.
Note this is blocked until snapd sets the appropriate kernel_status and extracts the kernel assets to ubuntu-boot partition.
The one open question I had about this is what to do if
kernel_status
is not"try"
,"trying"
, or""
. I implemented it such that we default to""
ifkernel_status
is anything else.I also renamed grub.cfg-normal to grub.cfg-boot because this grub lives on the ubuntu-boot partition and it's easier to understand which grub corresponds to which partition with this naming scheme I think.
How to test right now:
grub assets
,grubx64.efi
,bootx64.efi
and grub.cfg into$ubuntu-boot/EFI/boot/grubx64.efi
,$ubuntu-boot/EFI/boot/bootx64.efi
and$ubuntu-boot/EFI/ubuntu/grub.cfg
respectively.$ubuntu-boot/EFI/ubuntu/grubenv
to modify later at runtime$ubuntu-boot/kernel.efi
from the kernel snap$ubuntu-boot/try-kernel.efi
(I just put in a file with "broken" in it there)"try"
and reboot:kernel_status
to see it has been reset to""
: