Hi Kairui Song,
Thanks for the review..
On 30/01/19 2:59 PM, Kairui Song wrote:
On Tue, Jan 29, 2019 at 1:36 PM Hari Bathini hbathini@linux.ibm.com wrote:
When a network-based dump target is configured, the interface name is prefixed with 'kdump-'. While this has no consequence for production kernel when kdump is configured, the network interface name is changed for production kernel as well when fadump is configured. Avoid that and ensure network interface is renamed only while capturing vmcore.
Signed-off-by: Hari Bathini hbathini@linux.ibm.com
Changes in V2:
kdump cmdline hook priority adjusted
dracut-kdump-boot.sh | 12 ++++++++++++ dracut-module-setup.sh | 1 + kexec-tools.spec | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 dracut-kdump-boot.sh
diff --git a/dracut-kdump-boot.sh b/dracut-kdump-boot.sh new file mode 100644 index 0000000..ba205dc --- /dev/null +++ b/dracut-kdump-boot.sh @@ -0,0 +1,12 @@ +#!/bin/sh
+# An Initrd with dump capturing support can boot a production kernel +# as well (FADump). In such scenario, avoid enforcing such parameters +# in production kernel that make sense only while capturing dump. +[ ! -f /etc/fadump.initramfs ] && return
+if [ ! -f /proc/device-tree/rtas/ibm,kernel-dump ]; then
- rm -f /etc/cmdline.d/40kdump-ip.conf
- rm -f /etc/cmdline.d/60kdumpnic.conf
- rm -f /etc/cmdline.d/70kdump-bootdev.conf
+fi
dracut-module-setup.sh may also setup following files: /etc/cmdline.d/{41bridge.conf,42bond.conf,43vlan.conf,44team.conf} that will still contain reference to old kdump-* ifname, you may need add prefixes and delete them as well.
Ah! right.. I think I overlooked a few kind of interfaces. Will fix and post..
And another problem is if you deleted the network related cmdline.d files, dracut will not setup the network in early bootup stage, but
Dump capture capability is added to the default initrd. So, the initrd would be used to boot the production kernel as well as capture kernel. Deleting these files when the initrd is used for booting production kernel (firmware exports /proc/device-tree/rtas/ibm,kernel-dump node in capture kernel). where network setup for dump target would not be necessary..
dracut will still try to setup the network dump target and then fail. This may not fail the boot progress, but it generates an extra error message.
-- Best Regards, Kairui Song _______________________________________________ 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