Repository navigation
aboot support followup - #2593
alexlarsson wants to merge 4 commits into
Conversation
|
@jmarrero moved the followup here |
Without this, later updates will fail, so ensure we don't get into this bad state. Signed-off-by: Alexander Larsson <alexl@redhat.com>
| .section(ORIGIN_KEY_BOOT) | ||
| .item(ORIGIN_KEY_BOOT_TYPE, boot_type); | ||
| .item(ORIGIN_KEY_BOOT_TYPE, boot_type) | ||
| .item(ORIGIN_KEY_BOOTLOADER, bootloader); |
There was a problem hiding this comment.
We've been refraining from storing the bootloader in the origin file. Is there a way to determine this at runtime as we do with other bootloaders?
There was a problem hiding this comment.
Its a bit tricky, as it will have to encode some internal knowledge, like config files. But, I'll give it a go.
There was a problem hiding this comment.
Ok, I replaced this with reading /etc/aboot.cfg
There was a problem hiding this comment.
hmm... this is also pretty weird. So the reason for us not storing bootloader info in origin file is we can easily figure it out at runtime, by reading efivars, which also helps us again some accidental file corruption. I think the origin file approach is much better than storing this in /etc. But, ideally we'd want to read some sort of system variable to figure it out
There was a problem hiding this comment.
We're already storing this in /etc though. That is how aboot-deploy knows how do do the update for the current system. This is just reading that data.
Retaining an attempted aboot deployment currently blocks further updates and switches after a failed flash or firmware fallback. Allow an explicit update or switch to discard it after reboot, preserving the selected image source and refreshing status before checking deployment collisions. Keep the same-boot guard and leave failed attempts disarmed across ordinary reboots. Rollback can also discard an older failed attempt when a valid rollback deployment remains available. Document recovery and extend the unit and VM tests to cover failed finalization, repeated reboots without reflashing, and explicit retry. Validation: 320 library tests passed, with one ignored. The VM regression test was extended but not run. Assisted-by: AI Signed-off-by: Alexander Larsson <alexl@redhat.com>
We're currently always showing bootloader None in the aboot entires, this is not right for ukiboot hosts. Read BOOT_TYPE from the running system's /etc/aboot.cfg instead, reporting ukiboot for ukiboot configurations and none for other values. Assisted-by: AI Signed-off-by: Alexander Larsson <alexl@redhat.com>
Android aboot and ukiboot share the Aboot boot type but require different bootloaders. Checking only the boot type allows updates across incompatible layouts. Reuse the install validator against the running host's detected bootloader before staging an update. Assisted-by: AI Signed-off-by: Alexander Larsson <alexl@redhat.com>
7c5d3bb to
efaa310
Compare
There were some remaining comments in #2490 and these are handled in this PR.
Changes: