-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
overlay.d/40grub/usr/lib/bootupd/grub2-static/configs.d/30_console.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
# Any non-default console settings will be inserted here. | ||
# CONSOLE-SETTINGS-START | ||
# CONSOLE-SETTINGS-END |
18 changes: 18 additions & 0 deletions
18
overlay.d/40grub/usr/lib/bootupd/grub2-static/configs.d/40_coreos-ignition.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Remove soon when Ignition is providing this: | ||
# https://github.com/coreos/fedora-coreos-config/pull/2769#discussion_r1428152480 | ||
# | ||
# Determine if this is a first boot and set the ${ignition_firstboot} variable | ||
# which is used in the kernel command line. | ||
set ignition_firstboot="" | ||
if [ -f "/ignition.firstboot" ]; then | ||
# Default networking parameters to be used with ignition. | ||
set ignition_network_kcmdline='' | ||
|
||
# Source in the `ignition.firstboot` file which could override the | ||
# above $ignition_network_kcmdline with static networking config. | ||
# This override feature is also by coreos-installer to persist static | ||
# networking config provided during install to the first boot of the machine. | ||
source "/ignition.firstboot" | ||
|
||
set ignition_firstboot="ignition.firstboot ${ignition_network_kcmdline}" | ||
fi |
6 changes: 6 additions & 0 deletions
6
overlay.d/40grub/usr/lib/bootupd/grub2-static/configs.d/70_coreos-user.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
# Import user defined configuration | ||
# tracker: https://github.com/coreos/fedora-coreos-tracker/issues/805 | ||
if [ -f $prefix/user.cfg ]; then | ||
source $prefix/user.cfg | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters