From adc431a5e1e9fec2538e3d13ce73067e6b826137 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Jun 12 2019 15:14:29 +0000 Subject: Backport PR #578 to fix RHBZ #1719057 (installer boot bug) --- diff --git a/578.patch b/578.patch new file mode 100644 index 0000000..e9bd5ec --- /dev/null +++ b/578.patch @@ -0,0 +1,92 @@ +From 319b21b51e7dc9343d4200e34252fc2e4d942c1f Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 27 May 2019 12:44:17 +0200 +Subject: [PATCH 1/3] network-manager: also read out next-server from NM state + +--- + modules.d/35network-manager/nm-run.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index 0f9436316..c77f6074e 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -11,7 +11,7 @@ do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) + grep -q connection-uuid= $state 2>/dev/null || continue + ifname=$(basename $_i) +- sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts ++ sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p' <$state >/tmp/dhclient.$ifname.dhcpopts + source_hook initqueue/online $ifname + /sbin/netroot $ifname + done + +From ab24d818e206ab443d71194365d1d50c673a86e4 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 27 May 2019 12:43:59 +0200 +Subject: [PATCH 2/3] network-manager: generate configuration with netroot= + +If the root is on network, let nm-initrd-generator create configuration +even if none was explicitly specified on the command line. + +Also do the same if /tmp/net.ifaces exists, because the anaconda plugin +creates an empty file in that location in hopes that will make us +configure the network. +--- + modules.d/35network-manager/nm-config.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh +index 1339ebe76..1efa737c5 100755 +--- a/modules.d/35network-manager/nm-config.sh ++++ b/modules.d/35network-manager/nm-config.sh +@@ -1,3 +1,7 @@ + #!/bin/sh + ++if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then ++ echo rd.neednet >> /etc/cmdline.d/35-neednet.conf ++fi ++ + /usr/libexec/nm-initrd-generator -- $(getcmdline) + +From 9a9c061fd70ce83191c6df5846bcb84559f46bf6 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 27 May 2019 11:12:22 +0200 +Subject: [PATCH 3/3] network: parse root=dhcp also with network-manager module + +Move the logic from network-legacy to common network code. +--- + modules.d/35network-legacy/module-setup.sh | 1 - + modules.d/{35network-legacy => 40network}/dhcp-root.sh | 0 + modules.d/40network/module-setup.sh | 1 + + 3 files changed, 1 insertion(+), 1 deletion(-) + rename modules.d/{35network-legacy => 40network}/dhcp-root.sh (100%) + +diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh +index 71abda36d..5a82e998c 100755 +--- a/modules.d/35network-legacy/module-setup.sh ++++ b/modules.d/35network-legacy/module-setup.sh +@@ -36,7 +36,6 @@ install() { + inst_simple -H "/etc/dhclient.conf" + cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf" + inst_hook pre-udev 60 "$moddir/net-genrules.sh" +- inst_hook cmdline 91 "$moddir/dhcp-root.sh" + inst_hook cmdline 92 "$moddir/parse-ibft.sh" + inst_hook cmdline 95 "$moddir/parse-vlan.sh" + inst_hook cmdline 96 "$moddir/parse-bond.sh" +diff --git a/modules.d/35network-legacy/dhcp-root.sh b/modules.d/40network/dhcp-root.sh +similarity index 100% +rename from modules.d/35network-legacy/dhcp-root.sh +rename to modules.d/40network/dhcp-root.sh +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index e8541636b..8e2a74a34 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -28,6 +28,7 @@ install() { + inst_script "$moddir/netroot.sh" "/sbin/netroot" + inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh" + inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" ++ inst_hook cmdline 91 "$moddir/dhcp-root.sh" + + dracut_need_initqueue + } diff --git a/dracut.spec b/dracut.spec index 2efb5d6..3a6e78a 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 26.git20181204 +%define dist_free_release 27.git20181204 Name: dracut Version: 049 @@ -56,6 +56,11 @@ Patch24: 0024.patch # dracut-install crash during kernel scriptlets Patch100: 541.patch +# https://github.com/dracutdevs/dracut/pull/578 +# Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1719057 +# installer boot fails if network is required during initramfs +Patch101: 578.patch + Source1: https://www.gnu.org/licenses/lgpl-2.1.txt BuildRequires: bash @@ -500,6 +505,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* Wed Jun 12 2019 Adam Williamson - 049-27.git20181204 +- Backport PR #578 to fix RHBZ #1719057 (installer boot bug) + * Thu Feb 14 2019 Adam Williamson - 049-26.git20181204 - Backport PR #541 to fix RHBZ #1676357 (crasher bug)