-
Notifications
You must be signed in to change notification settings - Fork 26
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
Import static grub configuration #536
Conversation
src/grub2/grub-static-coreos.cfg
Outdated
if [ -f $prefix/platform.cfg ]; then | ||
source $prefix/platform.cfg | ||
fi |
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.
Need to change coreos-assembler to do this, see https://github.com/coreos/coreos-assembler/blob/5824720ec3a9ec291532b23b349b6d8d8b2e9edd/src/create_disk.sh#L83
There's zero risk to this, it's just shipping some files in a subpackage. The larger set of work is adding support for importing this into being "owned" by bootupd. But that can come after centralizing the static config into this package, where it can be reused by both osbuild and anaconda style flows. |
Hmm, if we're going to move the GRUB configs, I think they belong better in e.g. https://github.com/coreos/fedora-coreos-config instead. There's a lot of integration points between the two and other distros that want bootupd likely will have their own GRUB config. (I guess we could set up some inheritance here with For the update case, we could easily ship an overlay somewhere under e.g. |
The main problem is that doesn't come as an RPM today, and that causes friction with tooling currently oriented towards that as primary input sources (e.g. |
We're already going to have to solve the RPM problem for a lot of overlay files we have in https://github.com/coreos/fedora-coreos-config so I'd just glob it as part of that effort. If the goal of bootupd is distro-independence, then IMO it doesn't make sense to have a GRUB config with opinionated things like |
Today, Image Builder has a separate copy of a grub config it uses, see https://github.com/osbuild/osbuild/blob/e48360e01c84ef702b6e5d34a26cedddc55a60c0/stages/org.osbuild.grub2.legacy#L204 And it'd be a giant effort to somehow wedge github.com/coreos/fedora-coreos-config into that. And as far as an RPM package place, given we already have bootupd and the plan is to move ownership there, it really seems simpler to move it here for now. Other distributions can just ignore it (it's not even installed by default!). Other ostree/container-native distributions don't have the problem with RPM-obsessed build systems 😄 |
04f7381
to
6b45c40
Compare
OK I dropped out the Ignition glue from this PR, so what we can do is use this even more minimal static version for Sagano work, and rework the version that lives in FCOS to write its additions into
bootuuid is used by bootc install today. Ignition firstboot: dropped! RAID1: eh...it aligns with also supporting mirrored EFI which we also want in bootupd. user dropins: Also something desired for anyone using a static grub config I think. IOW I don't want to block this demo I'm trying to put together of installing a Sagano container w/Anaconda (and bootupd) on refactoring the FCOS structure entirely by packaging fedora-coreos-config. And even if we did that, the converse is true that Sagano grub.cfg shouldn't have Ignition, so we still need two versions. Hence I think this model of changing FCOS to inherit from this version should work out well. |
Incidentally also, this project is still currently hardcoded to work with RPM #468 which is a far larger distro-independence problem, and one that will be hard to get away from. There's just going to be some ugly distro stuff in this project probably forever. |
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.
Yeah, that looks better. A bit apprehensive about setting up more inheritance chains here for this but I'm cool also evaluating the full impact when we get to this in FCOS land if this is considered demo/WIP material.
Again, what I think we should aim for is to have GRUB logic located closer to the code that leverages it. E.g. the thing that writes the bootuuids is called by f-c-c. A lot, but not all, of password and Ignition integration live in f-c-c. Once we get to the packaging hurdle, these things would go together.
Having the update mechanism live in bootupd sounds great, and then f-c-c can leverage that by placing its file in some predefined directory or something?
Pull this from coreos-assembler; prep for moving ownership of it into bootupd. The big change though is the addition of sourcing a `platform.cfg` which is where we'll put the stuff that currently lives in `platforms.yaml` in FCOS as well as the Ignition glue. This glue can be used as is by Sagano, where the base images don't need the Ignition glue or platforms.yaml.
Only in a "golden image" case. The Anaconda and bootc paths want to ensure that the system is set up properly with uuids from the start. (And actually, I want to change Anaconda to use |
6b45c40
to
b849ca3
Compare
/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. |
Also thanks for the review and debate here! It's a tricky topic we're navigating and I think while the debate felt contentious at first I actually think the result ended up working well! Or at least it hopefully will 😄 |
Pull this from coreos-assembler; prep for moving ownership of it into bootupd.
In the short term, this will allow install tools to copy it manually.