-
Notifications
You must be signed in to change notification settings - Fork 53
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
Make use of grub2 environment block #387
Conversation
@Itxaka @mudler I could not resist and did a PoC that worked out of the box, so here is the PR :) With this grub config change we can run I did not add a tests neither refactored any test since it collides with #382 and I did not want to conflict with it. But it should be pretty straight forward to use that on tests. Also probably a new test for that is not needed since it might be already tested on upgrade or recovery tests. This PR might also be helpful to define a default reboot behavior in case we detect some obvious error at boot (we are dropped into an emergency shell, no login user is defined, etc.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Looks good here and seems shouldn't even have side effects on old installs
Correct, that's my understanding too. |
b98c6ac
to
bcdc8e8
Compare
Maybe also worth it to add to the docs as well? Easy to forget in PRs, but I see this quite handy in the long run also when debugging things going bad from recovery |
This is awesome! |
a8fb717
to
407149f
Compare
407149f
to
4e5de08
Compare
This commit sets the grub2 configuration to load /grubenv file, if any, and checks the `next_entry` variable to set the default grub2 option. This is helpful to set default boot in grub only for the next boot. From cOS it is enough to run `grub2-editenv /oem/grubenv set next_entry=recovery` to set the next reboot to default to recovery system. This commit also adds a new docs page devoted to grub configuration. Finally in also moves the wiki page devoted to a K3s and Fleet deployment example into its own docs page. Signed-off-by: David Cassany <[email protected]>
This commit refactors the tests to make use of `grub2-editenv` utility to configure the default grub boot entry. Signed-off-by: David Cassany <[email protected]>
4e5de08
to
75f5941
Compare
All tests green, nice change! |
Yes, test-recovery had some issues. In fact, I do have concerns about these tests, since we can't get back to the initial state in any way after running |
mmmhhh, we maybe be able to get away with mounting a temporal dir from the runner into the vm, but that would imply doing a create-repo with Or we could rework the serial port stuff so it saves in different files using |
We could also avoid the docker repo type for tests, and just start an http server on the host (there is a small one embedded in luet for that purpose, |
That's a nice option indeed. |
This commit sets the temp dir for luet on start up. It also fixes a bug on partitions detection, where the device name was used instead of the partition label. In elemental-cli partition names are partition labels, they are hardcoded and not configurable. Finally fixes few log messages Fixes rancher#380 Signed-off-by: David Cassany <[email protected]>
This commit sets the grub2 configuration to load /grubenv file, if any,
and checks the
next_entry
variable to set the default grub2 option.This is helpful to set default boot in grub only for the next boot. From
cOS it is enough to run
grub2-editenv /oem/grubenv set next_entry=recovery
to set the next reboot to default to recovery system.Signed-off-by: David Cassany [email protected]