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 <lijiang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
Lianbo Jiang 2019-05-16 13:09:21 +08:00 committed by Kairui Song
parent 8d4db658fd
commit 9529191d95
2 changed files with 18 additions and 1 deletions

View File

@ -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.

View File

@ -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
}