Hi Lianbo,
On 05/16/19 at 01:09pm, Lianbo Jiang wrote:
Early kdump inherits the settings of normal kdump, so any changes
that
caused normal kdump rebuilding also require rebuilding the system initramfs
to make sure that the changes take effect for early kdump.
Therefore, when the early kdump is enabled, provide a prompt message after
the rebuilding of kdump initramfs is completed.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
early-kdump-howto.txt | 9 ++++++++-
kdumpctl | 10 ++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/early-kdump-howto.txt b/early-kdump-howto.txt
index 9af0ef1ad054..b8cab6aa2699 100644
--- a/early-kdump-howto.txt
+++ b/early-kdump-howto.txt
@@ -38,10 +38,17 @@ You can rebuild the initramfs with earlykdump support with below
steps:
3. add rd.earlykdump in grub kernel command line.
-Note: earlykdump initramfs size will be large because it includes vmlinuz and
+Note:
+[1]. Early kdump initramfs size will be large because it includes vmlinuz and
kdump initramfs. And for step 2 if you are sure to overwrite system initramfs
you can backup the original initramfs and use "--force" option.
+[2]. Early kdump inherits the settings of normal kdump, so any changes that
+caused normal kdump rebuilding also require rebuilding the system initramfs
+to make sure that the changes take effect for early kdump. Therefore, after
+the rebuilding of kdump initramfs is completed, provide a prompt message to
+tell the fact.
+
After making said changes, reboot your system to take effect. Of course, if you
want to disable early kdump, you can simply remove "rd.earlykdump" from
kernel
boot parameters in grub, and reboot system like above.
diff --git a/kdumpctl b/kdumpctl
index 75eebacef92b..72f9d7e46d91 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -110,6 +110,12 @@ rebuild_fadump_initrd()
return 0
}
+check_earlykdump_is_enabled()
+{
+ grep -q -w "rd.earlykdump" /proc/cmdline
+ return $?
+}
+
rebuild_kdump_initrd()
{
$MKDUMPRD $TARGET_INITRD $kdump_kver
@@ -118,6 +124,10 @@ rebuild_kdump_initrd()
return 1
fi
+ if check_earlykdump_is_enabled; then
+ echo "Tips: If early kdump is enabled, also require rebuilding the system
initramfs to make the changes take effect for early kdump."
+ fi
+
return 0
}
--
2.17.1
Looks good,
Ack
Thanks
Dave