Currently, while building the initrd with dump capture support, if a network-based dump target is specified, network is configured in the initial ramdisk which includes an interface name change if necessary.
When fadump is configured, the initrd used for booting production kernel is rebuilt with dump capturing support. This initrd applies the network configuration changes, intended for capturing a dump, while booting the production kernel as well, potentially changing the network interface name in production kernel. Avoid enforcing kdump specific network parameters while boot production kernel to tackle that problem. The first patch in this patch-set prefixes all network related cmdline conf files with 'kdump' for graceful handling. The second patch adds a dracut cmdline hook in the initrd to remove network cmdline conf files while booting production kernel. The last patch reverts an old commit that is no longer relevant with the change in second patch.
---
Hari Bathini (3): add kdump prefix to network cmdline config files fadump: avoid renaming network interface name during regular boot avoid network interface rename when unnecessary
dracut-kdump-boot.sh | 12 ++++++++++++ dracut-module-setup.sh | 13 +++++-------- kexec-tools.spec | 3 +++ 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 dracut-kdump-boot.sh
Prefix 'kdump-' to cmdline config files used for bringing up network. This gives flexibilty in handling network configuration gracefully in different scenarios.
Signed-off-by: Hari Bathini hbathini@linux.ibm.com ---
Changes in V2: * kdump cmdline hook priority adjusted
dracut-module-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index db7cd23..003845c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -346,7 +346,7 @@ kdump_setup_netdev() { _proto=dhcp fi
- _ip_conf="${initdir}/etc/cmdline.d/40ip.conf" + _ip_conf="${initdir}/etc/cmdline.d/40kdump-ip.conf" _ip_opts=" ip=${_static}$(kdump_setup_ifname $_netdev):${_proto}"
# dracut doesn't allow duplicated configuration for same NIC, even they're exactly the same. @@ -415,9 +415,9 @@ kdump_install_net() { # call kdump_install_net again and we don't want eth1 to be the default # gateway. if [ ! -f ${initdir}/etc/cmdline.d/60kdumpnic.conf ] && - [ ! -f ${initdir}/etc/cmdline.d/70bootdev.conf ]; then + [ ! -f ${initdir}/etc/cmdline.d/70kdump-bootdev.conf ]; then echo "kdumpnic=$(kdump_setup_ifname $_netdev)" > ${initdir}/etc/cmdline.d/60kdumpnic.conf - echo "bootdev=$(kdump_setup_ifname $_netdev)" > ${initdir}/etc/cmdline.d/70bootdev.conf + echo "bootdev=$(kdump_setup_ifname $_netdev)" > ${initdir}/etc/cmdline.d/70kdump-bootdev.conf fi }
Please ignore this..
On 29/01/19 11:00 AM, Hari Bathini wrote:
Currently, while building the initrd with dump capture support, if a network-based dump target is specified, network is configured in the initial ramdisk which includes an interface name change if necessary.
When fadump is configured, the initrd used for booting production kernel is rebuilt with dump capturing support. This initrd applies the network configuration changes, intended for capturing a dump, while booting the production kernel as well, potentially changing the network interface name in production kernel. Avoid enforcing kdump specific network parameters while boot production kernel to tackle that problem. The first patch in this patch-set prefixes all network related cmdline conf files with 'kdump' for graceful handling. The second patch adds a dracut cmdline hook in the initrd to remove network cmdline conf files while booting production kernel. The last patch reverts an old commit that is no longer relevant with the change in second patch.
Hari Bathini (3): add kdump prefix to network cmdline config files fadump: avoid renaming network interface name during regular boot avoid network interface rename when unnecessary
dracut-kdump-boot.sh | 12 ++++++++++++ dracut-module-setup.sh | 13 +++++-------- kexec-tools.spec | 3 +++ 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 dracut-kdump-boot.sh _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org