This is a short document about how to setup kdump on live images. All steps were tested on Fedora 25 Alpha LiveCD and saved vmcore captured by kdump to a USB stick successfully.
Signed-off-by: Tong Li tonli@redhat.com --- kexec-tools.spec | 3 +++ live-image-kdump-howto.txt | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 live-image-kdump-howto.txt
diff --git a/kexec-tools.spec b/kexec-tools.spec index 8063078..315c29a 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -28,6 +28,7 @@ Source23: kdump-anaconda-addon-005-19-g6577df4.tar.gz Source24: kdump-lib-initramfs.sh Source25: kdump.sysconfig.ppc64le Source26: kdumpctl.8 +Source27: live-image-kdump-howto.txt
####################################### # These are sources for mkdumpramfs @@ -133,6 +134,7 @@ rm -f kexec-tools.spec.in # setup the docs cp %{SOURCE10} . cp %{SOURCE21} . +cp %{SOURCE27} .
make %ifarch %{ix86} x86_64 ppc64 s390x ppc64le @@ -305,6 +307,7 @@ done %doc TODO %doc kexec-kdump-howto.txt %doc kdump-in-cluster-environment.txt +%doc live-image-kdump-howto.txt %ifarch %{ix86} x86_64 ppc64 s390x ppc64le %{_libdir}/eppic_makedumpfile.so /usr/share/makedumpfile/eppic_scripts/ diff --git a/live-image-kdump-howto.txt b/live-image-kdump-howto.txt new file mode 100644 index 0000000..e0bc9f1 --- /dev/null +++ b/live-image-kdump-howto.txt @@ -0,0 +1,23 @@ +Kdump now works on live images with some manual configurations. Here is the step +by step guide. + +1. Enable crashkernel reservation + +Since there isn't any config file that can be used to configure kernel +parameters for live images before booting them, we have to append 'crashkernel' +argument in boot menu every time we boot a live image. + +2. Change dump target in /etc/kdump.conf + +When kdump kernel boots in a live environment, the default target /var/crash is +in RAM so you need to change the dump target to an external disk or a network +dump target. + +3. Start kdump service + + $ kdumpctl start + +4. Trigger a kdump test + + $ echo 1 > /proc/sys/kernel/sysrq + $ echo c > /proc/sysrq-trigger