diff --git a/Makefile b/Makefile index 3fe8bbb275..a471fa5275 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,9 @@ install: all ln -sf ../lib/dracut/modules.d/30ignition/ignition $(DESTDIR)/usr/libexec/ignition-apply ln -sf ../lib/dracut/modules.d/30ignition/ignition $(DESTDIR)/usr/libexec/ignition-rmcfg +install-grub-for-bootupd: + install -D -t $(DESTDIR)/usr/lib/bootupd/grub2-static/configs.d grub2/ignition.cfg + .PHONY: vendor vendor: @go mod vendor diff --git a/grub2/ignition.cfg b/grub2/ignition.cfg new file mode 100644 index 0000000000..9861bed4dd --- /dev/null +++ b/grub2/ignition.cfg @@ -0,0 +1,15 @@ +# 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