Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility for bootc image #146

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Conversation

say-paul
Copy link
Member

@say-paul say-paul commented Aug 8, 2024

This enables greenboot to work with bootc image alongside supporting ostree based image.
Its achieved by:

  1. Support is added for greenboot to work with read-only /boot. It uses PrivateMounts=yes to isolate the system and remounts boot as rw followed by setting the grub variable as per healthcheck.

The following services are affected:

  • greenboot-grub2-set-success.service
  • greenboot-grub2-set-counter.service
  • greenboot-rpm-ostree-check-fallback.service

The grub2-editenv command is decoupled from greenboot-grub2-set-success.service and is part of a separate script.

fixes: #136 .

  1. Auto-detecting the the image type: ostree/bootc and applying the correct rollback verb to rollback to last known stable version.

fixes: #135

@say-paul say-paul changed the title support for ro /boot support for read only /boot mount Aug 8, 2024
@say-paul say-paul changed the title support for read only /boot mount compatibility for bootc image Aug 12, 2024
Support is added for greenboot to work with read-only /boot.
It uses PrivateMounts=yes to isolate the system and remounts
boot as rw followed by setting the grub parameters as per healthcheck.

The following services are affected:

greenboot-grub2-set-success.service
greenboot-grub2-set-counter.service
greenboot-rpm-ostree-check-fallback.service

The grub2-editenv command is decoupled from greenboot-grub2-set-success.service
and is part of a separate script.

Signed-off-by: saypaul <paul.sayan@gmail.com>
greenboot will able able to detect the image type of the os,
i.e ostree or bootc and use the correct verb to rollback to
previous stable deployment.

Signed-off-by: saypaul <paul.sayan@gmail.com>
@runcom runcom merged commit 223f41d into fedora-iot:main Aug 16, 2024
10 checks passed
@hexfusion
Copy link

Thanks, I was just recently seeing this.

Aug 21 12:58:07 localhost.localdomain systemd[1]: Starting Set grub2 boot counter in preparation of upgrade...
Aug 21 12:58:07 localhost.localdomain systemd[1]: Starting Hold /boot Open for OSTree Finalize Staged Deployment...
Aug 21 12:58:07 localhost.localdomain systemd[1]: Started Hold /boot Open for OSTree Finalize Staged Deployment.
Aug 21 12:58:07 localhost.localdomain greenboot-grub2-set-counter[1668]: grub2-editenv: error: cannot open `/boot/grub2/grubenv': Read-only file system.

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.

Support readonly /boot mount boot_counter not decrementing?
5 participants