Skip to content

Commit

Permalink
grub: drop default rd.neednet=1 ip=dhcp,dhcp6 kargs
Browse files Browse the repository at this point in the history
We want to move to a model where networking isn't unconditionally
brought up, but instead only if Ignition requires it.

Works with:
coreos/fedora-coreos-config#321
coreos/ignition-dracut#164
coreos/ignition#956
  • Loading branch information
jlebon committed Mar 30, 2020
1 parent 951805e commit c2e0a69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/create_disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ s390x)
# stage on s390x, either through zipl->grub2-emu or zipl standalone.
# See https://github.com/coreos/ignition-dracut/issues/84
# A similar hack is present in https://github.com/coreos/coreos-assembler/blob/master/src/gf-platformid#L55
echo "$(grep options $blsfile) ignition.firstboot rd.neednet=1 ip=dhcp,dhcp6" > $tmpfile
echo "$(grep options $blsfile) ignition.firstboot" > $tmpfile

# ideally we want to invoke zipl with bls and zipl.conf but we might need
# to chroot to $rootfs/ to do so. We would also do that when FCOS boot on its own.
Expand Down
2 changes: 1 addition & 1 deletion src/gf-platformid
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ coreos_gf upload "${tmpd}"/bls.conf "${blscfg_path}"
if [ "$basearch" = "s390x" ] ; then
# Before we re-run zipl make sure we have the firstboot options
# A hack similar to https://github.com/coreos/coreos-assembler/blob/master/src/create_disk.sh#L381
sed -i -e 's,^\(options .*\),\1 ignition.firstboot rd.neednet=1 ip=dhcp\,dhcp6,' "${tmpd}"/bls.conf
sed -i -e 's,^\(options .*\),\1 ignition.firstboot,' "${tmpd}"/bls.conf
coreos_gf rename "${blscfg_path}" "${blscfg_path}.orig"
coreos_gf upload "${tmpd}"/bls.conf "${blscfg_path}"

Expand Down
3 changes: 1 addition & 2 deletions src/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ fi
# which is used in the kernel command line.
set ignition_firstboot=""
if [ -f "/ignition.firstboot" ]; then
# default to dhcp networking parameters to be used with ignition
set ignition_network_kcmdline='rd.neednet=1 ip=dhcp,dhcp6'
set ignition_network_kcmdline=''

# source in the `ignition.firstboot` file which could override the
# above $ignition_network_kcmdline with static networking config.
Expand Down

0 comments on commit c2e0a69

Please sign in to comment.