Skip to content

Commit b40f727

Browse files
committed
overlay.d: add 40grub overlay
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
1 parent 53f319c commit b40f727

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

manifests/fedora-coreos-base.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ ostree-layers:
1818
- overlay/20platform-chrony
1919
- overlay/25azure-udev-rules
2020
- overlay/30lvmdevices
21+
- overlay/40grub
2122

2223
# Be minimal
2324
recommends: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
# Any non-default console settings will be inserted here.
3+
# CONSOLE-SETTINGS-START
4+
# CONSOLE-SETTINGS-END
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Remove soon when Ignition is providing this:
2+
# https://github.com/coreos/fedora-coreos-config/pull/2769#discussion_r1428152480
3+
#
4+
# Determine if this is a first boot and set the ${ignition_firstboot} variable
5+
# which is used in the kernel command line.
6+
set ignition_firstboot=""
7+
if [ -f "/ignition.firstboot" ]; then
8+
# Default networking parameters to be used with ignition.
9+
set ignition_network_kcmdline=''
10+
11+
# Source in the `ignition.firstboot` file which could override the
12+
# above $ignition_network_kcmdline with static networking config.
13+
# This override feature is also by coreos-installer to persist static
14+
# networking config provided during install to the first boot of the machine.
15+
source "/ignition.firstboot"
16+
17+
set ignition_firstboot="ignition.firstboot ${ignition_network_kcmdline}"
18+
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
# Import user defined configuration
3+
# tracker: https://github.com/coreos/fedora-coreos-tracker/issues/805
4+
if [ -f $prefix/user.cfg ]; then
5+
source $prefix/user.cfg
6+
fi

overlay.d/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,9 @@ pre-existing LVM devices attached. See the tracker issue [1] for more
9393
information.
9494

9595
[1] https://github.com/coreos/fedora-coreos-tracker/issues/1517
96+
97+
40grub
98+
------
99+
100+
Add in static grub configs that will be leveraged by bootupd when
101+
managing bootloaders. See https://github.com/coreos/bootupd/pull/543

0 commit comments

Comments
 (0)