-
Notifications
You must be signed in to change notification settings - Fork 158
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
overlay.d: add 40grub overlay #2769
overlay.d: add 40grub overlay #2769
Conversation
Upstream we are starting to use grub configs that are partially baked into bootupd [1] and partially baked into the image via the OS vendor (in our case a grub2/50_coreos.cfg file [2]). Let's look first to see if grub2/50_coreos.cfg exists when trying to write new console settings before falling back to grub2/grub.cfg. [1] coreos/bootupd#543 [2] coreos/fedora-coreos-config#2769
Upstream we are starting to use grub configs that are partially baked into bootupd [1] and partially baked into the image via the OS vendor (in our case a grub2/50_coreos.cfg file [2]). Let's look first to see if grub2/50_coreos.cfg exists when trying to write new console settings before falling back to grub2/grub.cfg. [1] coreos/bootupd#543 [2] coreos/fedora-coreos-config#2769
|
||
# Determine if this is a first boot and set the ${ignition_firstboot} variable | ||
# which is used in the kernel command line. | ||
set ignition_firstboot="" |
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.
(Remember because IoT/Edge exist and currently use osbuild this drives us to ship stuff like this in packages)
I think what hasn't happened yet is to ship that content in an ignition-grub
subpackage.
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.
Tangentially related to this...we are currently leaving the functionality of coreos-installer --console
on the floor in other paths (Anaconda, bootc install
).
Maaybe we should try to move this to bootupd
, like bootupd sync-bootloader-kargs
that uses the kernel cmdline as source of truth and syncs it to /boot/grub2/console.cfg
or something.
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.
(Remember because IoT/Edge exist and currently use osbuild this drives us to ship stuff like this in packages)
I think what hasn't happened yet is to ship that content in an
ignition-grub
subpackage.
oh nice - I didn't know that. Yeah, we'd need an ignition-grub subpackage included, but maybe since the path is /usr/lib/bootupd/grub2-static/configs.d/
maybe ignition-bootupd-grub-config
subpackage?
We can easily switch out this to use that when it has shipped.
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.
Tangentially related to this...we are currently leaving the functionality of
coreos-installer --console
on the floor in other paths (Anaconda,bootc install
).Maaybe we should try to move this to
bootupd
, likebootupd sync-bootloader-kargs
that uses the kernel cmdline as source of truth and syncs it to/boot/grub2/console.cfg
or something.
I'm not really sure what the best path forward is here but maybe we can at least get the file right so I can update coreos-installer once and not twice?
Would 30_console.cfg
work?
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.
Would 30_console.cfg work?
Sure.
I'm not really sure what the best path forward is here but maybe we can at least get the file right so I can update coreos/coreos-installer#1360 (review) once and not twice?
If we go the bootupd path, the file wouldn't be written by coreos-installer.
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.
Would 30_console.cfg work?
Sure.
ok cool - updated here. I split our configs out into 3 different ones now. I'll work on testing this.
I'm not really sure what the best path forward is here but maybe we can at least get the file right so I can update coreos/coreos-installer#1360 (review) once and not twice?
If we go the bootupd path, the file wouldn't be written by coreos-installer.
I think that would make bootupd a requirement of coreos-installer, which I think we'd have to think through the implications of.
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, would probably need to vendor as a crate I guess.
Upstream we are starting to use grub configs that are partially baked into bootupd [1] and partially baked into the image via the OS vendor (in our case a grub2/50_coreos.cfg file [2]). Let's look first to see if grub2/50_coreos.cfg exists when trying to write new console settings before falling back to grub2/grub.cfg. [1] coreos/bootupd#543 [2] coreos/fedora-coreos-config#2769
Upstream we are starting to use grub configs that are partially baked into bootupd [1] and partially baked into the image via the OS vendor (in our case a grub2/30_console.cfg file [2]). Let's look first to see if grub2/30_console.cfg exists when trying to write new console settings before falling back to grub2/grub.cfg. [1] coreos/bootupd#543 [2] coreos/fedora-coreos-config#2769
bootupd upstream was modified to store default static grub configs and allow for OS integrators to add their own snippets by placing files in /usr/lib/bootupd/grub2-static/configs.d/ [1] When we move to building with osbuild we will start taking advantage of this functionality and calling bootupd with --with-static-configs. Let's go ahead and add our snippets here so they can be leveraged when we start calling bootupd with --with-static-configs. The snippets added here come from the parts of the config currently defined in coreos-assembler that weren't lifted into bootupd [2][3][4]. [1] coreos/bootupd#543 [2] https://github.com/coreos/coreos-assembler/blob/4636b1a5c6dc00b1d6a58b1bfbb199431444336b/src/grub.cfg#L58-L60 [3] https://github.com/coreos/coreos-assembler/blob/4636b1a5c6dc00b1d6a58b1bfbb199431444336b/src/grub.cfg#L71-L85 [4] https://github.com/coreos/coreos-assembler/blob/4636b1a5c6dc00b1d6a58b1bfbb199431444336b/src/grub.cfg#L87-L91
abe42fe
to
d111bac
Compare
local tests on this are looking good. keep in mind these files currently won't be used in FCOS/RHCOS until we either change cause to call bootupd with This is mostly enablement, but doesn't make any concrete changes for now. |
See coreos/fedora-coreos-config#2769 This won't really have any effect right now but will enable someone to use the generated ociarchive container images in the OSBuild workflow that calls bootupctl with the --with-static-configs argument.
See coreos/fedora-coreos-config#2769 This won't really have any effect right now but will enable someone to use the generated ociarchive container images in the OSBuild workflow that calls bootupctl with the --with-static-configs argument. (cherry picked from commit 2771ca2)
bootupd upstream was modified to store default static grub configs and allow for OS integrators to add their own snippets by placing files in /usr/lib/bootupd/grub2-static/configs.d/ [1] When we move to building with osbuild we will start taking advantage of this functionality and calling bootupd with --with-static-configs. Let's go ahead and add our snippets here so they can be leveraged when we start calling bootupd with --with-static-configs.
The snippets added here come from the parts of the config currently defined in coreos-assembler that weren't lifted into bootupd [2][3][4].
[1] coreos/bootupd#543
[2] https://github.com/coreos/coreos-assembler/blob/4636b1a5c6dc00b1d6a58b1bfbb199431444336b/src/grub.cfg#L58-L60
[3] https://github.com/coreos/coreos-assembler/blob/4636b1a5c6dc00b1d6a58b1bfbb199431444336b/src/grub.cfg#L71-L85
[4] https://github.com/coreos/coreos-assembler/blob/4636b1a5c6dc00b1d6a58b1bfbb199431444336b/src/grub.cfg#L87-L91