From 9529191d95d25de391b7bbe7a688e84a51a45963 Mon Sep 17 00:00:00 2001 From: Lianbo Jiang Date: Thu, 16 May 2019 13:09:21 +0800 Subject: [PATCH] earlykdump: provide a prompt message after the rebuilding of kdump initramfs. 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 Acked-by: Dave Young --- 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 9af0ef1..b8cab6a 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 75eebac..72f9d7e 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 }