Skip to content

Conversation

@ravanelli
Copy link
Member

  • Add a comment explaining that changes to this config file (grub.cfg) do not directly affect the system's GRUB configuration.
  • Bootupd uses this file as a reference to generate static GRUB config files, and the actual grub.cfg installed on the system comes from bootupd.
  • This clarification helps avoid confusion for those expecting changes here to take immediate effect.

@ravanelli ravanelli requested review from dustymabe and jlebon October 8, 2024 19:27
@ravanelli
Copy link
Member Author

When looking at the grub configs to test the VMware issue, I realized that even I needed more clarification on where the GRUB configurations are actually coming from.

jmarrero
jmarrero previously approved these changes Oct 11, 2024
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

src/grub.cfg Outdated
@@ -1,3 +1,6 @@
# Changes in this file won't take affect, unless you also
# update the Static GRUB configuration files in bootup
Copy link
Member

@HuijingHei HuijingHei Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one minor comment, bootup should be bootupd

@dustymabe
Copy link
Member

is this file even used anymore?

isn't the source of truth the ones from bootupd?

@ravanelli
Copy link
Member Author

ravanelli commented Oct 15, 2024

is this file even used anymore?

isn't the source of truth the ones from bootupd?

So, no, that's the reason we need to either clarify it or remove it. I added the comment here, since we have a reference for it in https://github.com/coreos/bootupd/blob/main/src/grub2/grub-static-pre.cfg#L1

To be honestly I don't know each one is better, because for those how don't know about bootupd, is hard to understand where this configs come from. If we decide to remove it, we need a better description in the bootupd file.

@dustymabe
Copy link
Member

is this file even used anymore?
isn't the source of truth the ones from bootupd?

So, no, that's the reason we need to either clarify it or remove it. I added the comment here, since we have a reference for it in https://github.com/coreos/bootupd/blob/main/src/grub2/grub-static-pre.cfg#L1

yeah. if this is dead code (essentially) then I would delete this file and update the comment in grub-static-pre.cfg to point to a permalink of the file at a previous point in time.

To be honestly I don't know each one is better, because for those how don't know about bootupd, is hard to understand where this configs come from. If we decide to remove it, we need a better description in the bootupd file.

It's definitely more confusing to have it here and not used than to not have it here at all IMO.

@ravanelli ravanelli changed the title grub.cfg: Clarify relationship with bootupd in comments grub.cfg: Remove grub.cfg in bootupd favor Oct 16, 2024
@ravanelli
Copy link
Member Author

is this file even used anymore?
isn't the source of truth the ones from bootupd?

So, no, that's the reason we need to either clarify it or remove it. I added the comment here, since we have a reference for it in https://github.com/coreos/bootupd/blob/main/src/grub2/grub-static-pre.cfg#L1

yeah. if this is dead code (essentially) then I would delete this file and update the comment in grub-static-pre.cfg to point to a permalink of the file at a previous point in time.

To be honestly I don't know each one is better, because for those how don't know about bootupd, is hard to understand where this configs come from. If we decide to remove it, we need a better description in the bootupd file.

It's definitely more confusing to have it here and not used than to not have it here at all IMO.

+1 removed it here, and will update the link in bootupd as well

- Bootupd used this file as a reference to generate static GRUB config
  files, the actual grub.cfg installed on the system comes from bootupd;
- Remove grub.cfg since this file is not used here anymore.

Signed-off-by: Renata Ravanelli <[email protected]>
Comment on lines -450 to -452
# Serialize our default GRUB config
with open("/usr/lib/coreos-assembler/grub.cfg") as f:
r['grub-script'] = f.read()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, just to confirm 100% - this definitely isn't used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not find any other place using it, looking at c9036fa it was needed for create_disk, what makes sense. So, I will say no

Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Yes, this should've probably been part of the same series as d37958a.

@jlebon jlebon enabled auto-merge (rebase) October 16, 2024 19:09
@dustymabe
Copy link
Member

/retest-required

@HuijingHei
Copy link
Member

@mike-nguyen
Copy link
Member

SSL Certificate failures are fixed for centos.org

@HuijingHei
Copy link
Member

/test rhcos

ravanelli added a commit to ravanelli/bootupd that referenced this pull request Oct 17, 2024
- grub.cfg was removed from the main branch in
  coreos/coreos-assembler#3900
- Updated the link to maintain reference to the file’s origin and history.

Signed-off-by: Renata Ravanelli <[email protected]>
@jlebon jlebon merged commit 70e9c90 into coreos:main Oct 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants