Skip to content
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

grub console settings with bootupd bootloader updates #1671

Closed
dustymabe opened this issue Feb 14, 2024 · 9 comments
Closed

grub console settings with bootupd bootloader updates #1671

dustymabe opened this issue Feb 14, 2024 · 9 comments
Assignees

Comments

@dustymabe
Copy link
Member

In the OSBuild workflow we are using bootupd to do the bootloader install along with --with-static-configs which will copy into place the files under /usr/lib/bootupd/grub2-static/configs.d/

In coreos/fedora-coreos-config#2769 we added the configs needed for CoreOS which included 30_console.cfg with these contents:

$ cat 30_console.cfg 

# Any non-default console settings will be inserted here.
# CONSOLE-SETTINGS-START
# CONSOLE-SETTINGS-END

We then updated coreos-installer to update that config with the platform specific console settings (i.e. like a find/replace on CONSOLE-SETTINGS-START/CONSOLE-SETTINGS-END) and are in the process of adding a stage to OSBuild that will do the same.

However, a really good question here is what will happen on these provisioned machines the next time the bootloader is updated? Will /boot/grub2/30_console.cfg just get overwritten by bootupd with the static version that is in /usr/lib/bootupd/grub2-static/configs.d/30_console.cfg, thus losing the applied console settings?

We may need to adjust our strategy to have the static config be something like:

if [ -f console.cfg ]; then
  source console.cfg
fi

and then have our disk building processes (not bootupd) create console.cfg with:

# Any non-default console settings will be inserted here.
# CONSOLE-SETTINGS-START
# CONSOLE-SETTINGS-END

This ticket came out of a conversation I had with @travier

@cgwalters
Copy link
Member

bootupd doesn't support updating the static configs right now, though it should.

@dustymabe
Copy link
Member Author

bootupd doesn't support updating the static configs right now, though it should.

Right. I imagine a future where we want that in which case the current structure that we have (per the description above) is going to be lossy.

@travier
Copy link
Member

travier commented Feb 15, 2024

Ah, coreos/bootupd#609 only does the tracking, not the updating part. I had misunderstood that.

@dustymabe
Copy link
Member Author

dustymabe commented Feb 15, 2024

@travier right. Either way let's assume that one day the static grub configs will get updated. Since nothing has shipped that uses bootupd --with-static-configs yet let's go ahead and perform a little musical chairs so we'll succeed either way.

Here is one proposal:

Another proposal would be making console.cfg a more official thing within bootupd. by making the if exists then source console.cfg part one of bootupd's builtin static configs.

@travier
Copy link
Member

travier commented Feb 15, 2024

Making it part of the main bootupd config seems like a good idea as well as it's definitely something that will be used on all platforms.

@cgwalters
Copy link
Member

The second one seems sane to me. One thing to bear in mind is that bootupd is also now used by anaconda if present, and ultimately I think we want to align the behavior and logic of console configuration with that too (the overlap/dup between osbuild/anaconda is another thread).

@dustymabe
Copy link
Member Author

dustymabe commented Feb 19, 2024

OK. Copying forward the proposal and starting to work on the checklist:

dustymabe added a commit to dustymabe/coreos-installer that referenced this issue Feb 19, 2024
In coreos/fedora-coreos-tracker#1671
we decided to use a non-static grub file for console configuration
named console.cfg.
dustymabe added a commit to dustymabe/bootupd that referenced this issue Feb 19, 2024
This will allow users or distro builders place console settings
here that will get picked up on boot. This was discussed as part
of coreos/fedora-coreos-tracker#1671
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this issue Feb 19, 2024
See coreos/fedora-coreos-tracker#1671
where we discovered that having this be a static config delivered
by bootupd was a bad idea.

Instead we'll have something else create a file in /boot/grub2/console.cfg
(most likely osbuild/osbuild#1589) and we'll have
the bootupd static grub configs source it (coreos/bootupd#619).
dustymabe added a commit to dustymabe/coreos-assembler that referenced this issue Feb 19, 2024
In coreos/fedora-coreos-tracker#1671 we
decided to have this file be `console.cfg` and not `30_console.cfg`.
@dustymabe dustymabe self-assigned this Feb 19, 2024
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this issue Feb 21, 2024
See coreos/fedora-coreos-tracker#1671
where we discovered that having this be a static config delivered
by bootupd was a bad idea.

Instead we'll have something else create a file in /boot/grub2/console.cfg
(most likely osbuild/osbuild#1589) and we'll have
the bootupd static grub configs source it (coreos/bootupd#619).
dustymabe added a commit to dustymabe/coreos-installer that referenced this issue Feb 21, 2024
In coreos/fedora-coreos-tracker#1671
we decided to use a non-static grub file for console configuration
named console.cfg.
dustymabe added a commit to dustymabe/coreos-assembler that referenced this issue Feb 21, 2024
In coreos/fedora-coreos-tracker#1671 we
decided to have this file be `console.cfg` and not `30_console.cfg`.
dustymabe added a commit to dustymabe/coreos-assembler that referenced this issue Feb 21, 2024
In coreos/fedora-coreos-tracker#1671 we
decided to have this file be `console.cfg` and not `30_console.cfg`.
dustymabe added a commit to coreos/coreos-assembler that referenced this issue Feb 22, 2024
In coreos/fedora-coreos-tracker#1671 we
decided to have this file be `console.cfg` and not `30_console.cfg`.
dustymabe added a commit to coreos/fedora-coreos-config that referenced this issue Feb 22, 2024
See coreos/fedora-coreos-tracker#1671
where we discovered that having this be a static config delivered
by bootupd was a bad idea.

Instead we'll have something else create a file in /boot/grub2/console.cfg
(most likely osbuild/osbuild#1589) and we'll have
the bootupd static grub configs source it (coreos/bootupd#619).
dustymabe added a commit to marmijo/fedora-coreos-config that referenced this issue Feb 22, 2024
This has a backport of coreos/bootupd#619
to support GRUB console settings in console.cfg.

Seee coreos/fedora-coreos-tracker#1671
dustymabe added a commit to coreos/fedora-coreos-config that referenced this issue Feb 23, 2024
This has a backport of coreos/bootupd#619
to support GRUB console settings in console.cfg.

Seee coreos/fedora-coreos-tracker#1671
@dustymabe
Copy link
Member Author

I think I can close this out now.

aaradhak pushed a commit to aaradhak/fedora-coreos-config that referenced this issue Mar 18, 2024
See coreos/fedora-coreos-tracker#1671
where we discovered that having this be a static config delivered
by bootupd was a bad idea.

Instead we'll have something else create a file in /boot/grub2/console.cfg
(most likely osbuild/osbuild#1589) and we'll have
the bootupd static grub configs source it (coreos/bootupd#619).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants