Skip to content

aboot support followup - #2593

Open
alexlarsson wants to merge 4 commits into
bootc-dev:mainfrom
alexlarsson:aboot-followup
Open

alexlarsson wants to merge 4 commits into
bootc-dev:mainfrom
alexlarsson:aboot-followup

Conversation

@alexlarsson

Copy link
Copy Markdown
Contributor

There were some remaining comments in #2490 and these are handled in this PR.

Changes:

  • Check that deployed aboot images have aboot-deploy so we don't end up in s setup where we can't further update
  • Track the bootloader in the origin file so that we can correctly report this in the status
  • Use tracked bootloader to ensure that we don't update to an aboot image with the wrong bootloader
  • After failed update, allow later update/switch to replace the existing failed pending update.

@bootc-bot
bootc-bot Bot requested a review from henrywang October 27, 2026 15:28
@alexlarsson

Copy link
Copy Markdown
Contributor Author

@jmarrero moved the followup here

@github-actions github-actions Bot added the area/documentation Updates to the documentation label Oct 27, 2026
Without this, later updates will fail, so ensure we don't get into
this bad state.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
Comment thread crates/lib/src/bootc_composefs/state.rs Outdated
.section(ORIGIN_KEY_BOOT)
.item(ORIGIN_KEY_BOOT_TYPE, boot_type);
.item(ORIGIN_KEY_BOOT_TYPE, boot_type)
.item(ORIGIN_KEY_BOOTLOADER, bootloader);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Its a bit tricky, as it will have to encode some internal knowledge, like config files. But, I'll give it a go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, I replaced this with reading /etc/aboot.cfg

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants