-
Notifications
You must be signed in to change notification settings - Fork 305
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
grub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist #3150
grub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist #3150
Conversation
With the new bootupd installation path in Anaconda, the `/etc/default/grub` config file is not written anymore as we are only using BLS configs with new enough bootloaders. We thus don't need to generate (duplicated) legacy boot entries. We still need to keep this logic in place in Atomic Desktops (Silverblue, etc.) until we've actually landed bootupd there and forced a bootloader update for everybody. See: fedora-silverblue/issue-tracker#530 See: fedora-silverblue/issue-tracker#120 See: https://fedoraproject.org/wiki/Changes/FedoraSilverblueBootupd
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.
This is totally fine...however, the real fix here is anything using bootupd really must be setting sysroot.bootloader=none
.
This is a messy bootupd-ostree integration issue, which is kind of sad given the two projects are designed to be used together 😄
One bikeshed here...at a practical level ostree could probably detect that bootupd+static grub configs is in use and automatically do the equivalent of bootloader=none
.
One stance to take is that anything using Anyways hmmm...it's actually kind of annoyingly hard to detect right now as bootupd doesn't really leave any explicit trace on the system that static configs are in use right now. |
This is nice because it works as that marker we were looking for to know that GRUB2 is new enough. (The issue IIRC with @cgwalters The static config stance makes sense (though in that case, couldn't |
At the moment, bootupd isn't really in a position to affect the ostree global configuration.
static configs inherently do that, yes. |
I'm talking specifically about the general case. Basically, this statement:
|
Yeah agree, we want to support bootupd with dynamic configs as well. |
Though if it's a bug that Anaconda isn't writing |
If I understand correctly, this is OK, but we should also fix it in Anaconda to support dynamic GRUB configs? Do we really want to support non BLS configs? |
Unfortunately it's only a marker that Anaconda detected bootupd in the image and is installing the system in this mode. In general, systems installed with bootupd have a recent enough GRUB2 so that works, but there is no guarantee. |
CI failed but looks green in Jenkins UI so I don't know what happened. |
We will only be able to set that for everybody once we've installed bootupd everywhere and forced a bootloader update. Or we could have Anaconda set this directly? |
Maybe I could do something like rhinstaller/anaconda#4240 and set |
I've just found out that we have a script to switch systems to BLS and we never used it AFAIK: |
We do this interesting thing with Android Bootloader support in that although the bootloader has no BLS concept from the OSTree userspace perspective it still uses the BLS files. |
Currently our static configs don't directly support updates. (They really should) We also have a use case around simply introspecting the state that static configs were enabled (xref ostreedev/ostree#3150) where we want to have ostree not run grub2-mkconfig in this case. In preparation for both of these things, add tracking of our *own* version of the static configs into the metadata. In theory of course, static configs could include other components (ignition, greenboot, etc.) and we should track those too. For now this at least gets us basic metadata.
Currently our static configs don't directly support updates. (They really should) We also have a use case around simply introspecting the state that static configs were enabled (xref ostreedev/ostree#3150) where we want to have ostree not run grub2-mkconfig in this case. In preparation for both of these things, add tracking of our *own* version of the static configs into the metadata. In theory of course, static configs could include other components (ignition, greenboot, etc.) and we should track those too. For now this at least gets us basic metadata.
Currently our static configs don't directly support updates. (They really should) We also have a use case around simply introspecting the state that static configs were enabled (xref ostreedev/ostree#3150) where we want to have ostree not run grub2-mkconfig in this case. In preparation for both of these things, add tracking of our *own* version of the static configs into the metadata. In theory of course, static configs could include other components (ignition, greenboot, etc.) and we should track those too. For now this at least gets us basic metadata.
|
I've verified that this fixes the installation for Silverblue. |
Looks like those tests failed on previous merge requests as well. |
/override continuous-integration/jenkins/pr-merge |
@cgwalters: Overrode contexts on behalf of cgwalters: continuous-integration/jenkins/pr-merge In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks |
Did we ever decide this? I realized today openQA is running up against this. On aarch64 installs, at the end of install before we boot for the first time, we actually need to add a kernel parameter to see anything on the screen after the reboot ( I looked into it a bit, and while the PR commit message says "the /etc/default/grub config file is not written anymore as we are only using BLS configs with new enough bootloaders. We thus don't need to generate (duplicated) legacy boot entries", I'm not sure that follows? Looking at anaconda writes various things in that file which we intend to be "Fedora defaults" - the timeout, the distributor, the If not |
Note that there's a difference between "bootupd" and "bootupd --with-static-configs". We're talking about the static configs path.
Anaconda today uses an ostree CLI that I was never very happy with to do this (which is the backend for the
The idea here is that the |
What would definitely make sense is to not even install |
Right now, on an install of an osbuild-built IoT image that uses bootupd, |
I do think editing these entries is the most straightforward path today, but if they don't exists at the points described above, maybe it's worth reconsidering, 🤷 |
Thanks, that is what I've made openQA do. It does work. |
Yay for standardized BLS configs! |
grub2-15_ostree: Graceful exit if /etc/default/grub doesn't exist
With the new bootupd installation path in Anaconda, the
/etc/default/grub
config file is not written anymore as we are onlyusing BLS configs with new enough bootloaders.
We thus don't need to generate (duplicated) legacy boot entries.
We still need to keep this logic in place in Atomic Desktops
(Silverblue, etc.) until we've actually landed bootupd there and forced
a bootloader update for everybody.
See: fedora-silverblue/issue-tracker#530
See: fedora-silverblue/issue-tracker#120
See: https://fedoraproject.org/wiki/Changes/FedoraSilverblueBootupd
grub2-15_ostree: Fix whitespace