-
Notifications
You must be signed in to change notification settings - Fork 29
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
boot_counter not decrementing? #135
Comments
Greenboot needs a new release as version 0.15.4 does not have the bootup changes. |
I was checking what the 0.15.4 included and the grub config seems to have been included. https://github.com/fedora-iot/greenboot/releases/tag/v0.15.4 Even before the PR #129, the project advertised and/or had the max boots limit. That is what confused me a bit more. What is the dependency on the bootupd? |
previously image builder used to put the grub2/greenboot.conf , PR: #129 move that out from image builder into greenboot itself. So my understanding is new release will solve the issue. I haven't tested with the patch yet, so I can check do some tests and confirm. |
Thank you. I've tried to manually add the Do you happen to have the link to where image builder added that? Was that only for the Fedora IoT images? Is my understanding correct that without bootupd the boot counting is not done (and bootupd is a dependency)? Was the counting (decrementing) moved to a grub config for convenience or some advantage, rather than counting it in the systemd targes within a shell script? |
https://github.com/osbuild/osbuild/blob/b29aa5e6517e017f545de54819aa845fb026fd1e/stages/org.osbuild.grub2#L321 |
historically greenboot relied on grub to decrement boot_counter, bootupd came later and I have not tested with it yet. |
Sill no luck with the Here's my Containerfile:
Note that I'm using @cgwalters would you happen to know what bootupd wizardry I am missing? For clarity:
EDIT: The same applies for base |
(Unrelated but any reason why this versus
Hmm, to verify look at the final configuration in |
I do not see it being included. Check https://pastebin.com/JLVsy5hw. I do not know when the grub config is being generated, and bootupd does not have much docs.
The greenboot services are all green when using the good image: https://pastebin.com/7JiQSZN5 The
Unless it has different conditions for the systemd units, this should not be an issue. And regardless of that, the
My mistake, as I saw use of the ostree commit I've stick to ostree commands (I guess the commit is then not needed). Anyhow, I've changed it to use |
Is the bootupd stuff to be expected to be already injected by the initial image that the systems is first booted from? Could that be the expectation that is broken here, and subsequent |
Yes indeed, that's the reason; right now the bootloader state is not updated by That's what If you haven't I'd recommend trying https://gitlab.com/bootc-org/podman-bootc-cli which streamlines creating VMs directly from a container, without starting from an existing disk image. |
Thank you. I'll try that one out. Is there a way to force the |
@cgwalters Once the greenboot units were enabled, the rollback (currently using ostree) went as expected. Hence I can conclude the boot_counter was being decremented. cc @say-paul |
Hello,
I'm failing to understand how the greenboot prevents for bootloops and how it decrements the
boot_counter
on each failure.Only place I've found where the variable is decremented is in the static grub config:
greenboot/grub2/greenboot.cfg
Line 13 in 332e5e3
This seems to depend on bootupd, however with the RPM packages in regular Fedora (dist-git) and CentOS repositories the dependency on bootupd and the file
greenboot.cfg
grub file cannot be found.greenboot/greenboot.spec
Line 22 in 332e5e3
greenboot/greenboot.spec
Line 69 in 332e5e3
The
greenboot-grub2-set-counter
script is only called once without a parameter...How should this work outside of Fedora IoT? Or what am I missing?
Thank you.
The text was updated successfully, but these errors were encountered: