On 08/28/2017 at 10:59 PM, Xunlei Pang wrote:
Now dracut supports "--no-hostonly-default-device" which
enables
us to only add the kdump target, which can avoid needless devices
being recognized under kdump.
Signed-off-by: Xunlei Pang <xlpang(a)redhat.com>
---
kdump-lib.sh | 3 ++-
mkdumprd | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 19d749f..5feac42 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -192,7 +192,8 @@ get_kdump_targets()
# (say mounted to /boot, /boot/efi/, etc) plus the root device. Then kdump
# must wait for these devices if initramfs is built with
"--hostonly-cmdline".
#
- # We don't pass "--hostonly-cmdline" to dracut, so there's no
problem.
+ # We pass "--hostonly-cmdline" together with
"--no-hostonly-default-device"
+ # to dracut, so there's no problem.
echo "$kdump_targets"
}
diff --git a/mkdumprd b/mkdumprd
index 9f375e0..d68a441 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -448,6 +448,15 @@ then
add_dracut_arg "--add-drivers" "$extra_modules"
fi
+if !is_fadump_capable; then
Sorry, missed a whitespace between "!" and "is_fadump_capable".
+ add_dracut_arg "--hostonly-cmdline"
+ add_dracut_arg "--no-hostonly-default-device"
+
+ if is_dump_to_rootfs; then
+ add_dracut_arg "--add-device" "$(to_dev_name
$(get_root_fs_device))"
+ fi
+fi
+
dracut "${dracut_args[@]}" "$@"
_rc=$?
sync