From d6e71d7d07342b6554b7338ac9d9a5318dfbcd55 Mon Sep 17 00:00:00 2001 From: Kelvin Fan Date: Mon, 19 Oct 2020 15:43:44 -0400 Subject: [PATCH] troubleshooting: Add instructions for enabling kdump --- modules/ROOT/nav.adoc | 1 + .../ROOT/pages/debugging-kernel-crashes.adoc | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 modules/ROOT/pages/debugging-kernel-crashes.adoc diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index bcd1c019..df426c0a 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -34,6 +34,7 @@ *** xref:access-recovery.adoc[Access Recovery] *** xref:emergency-shell.adoc[Emergency Shell Access] *** xref:debugging-with-toolbox.adoc[Debugging with Toolbox] +*** xref:debugging-kernel-crashes.adoc[Debugging Kernel Crashes] * Migration notes ** xref:migrate-ah.adoc[Migrating from Atomic Host] ** xref:migrate-cl.adoc[Migrating from Container Linux] diff --git a/modules/ROOT/pages/debugging-kernel-crashes.adoc b/modules/ROOT/pages/debugging-kernel-crashes.adoc new file mode 100644 index 00000000..b086e9d8 --- /dev/null +++ b/modules/ROOT/pages/debugging-kernel-crashes.adoc @@ -0,0 +1,32 @@ += Enabling kdump to debug kernel crashes + +. Memory must be reserved for the crash kernel during booting of the first kernel. Kernel arguments can be provided like this: ++ +[source, bash] +---- +sudo rpm-ostree kargs --append='crashkernel=256M' +---- +xref:kernel-args.adoc[More information] on how to modify kargs via `rpm-ostree`. + +. Make sure the path in which the vmcore will be saved is somewhere in the `/var` directory of the FCOS stateroot. It is also possible to write the dump over the network; for additional information, consult the mkdumprd man page and the comments in /etc/kdump.conf. ++ +[source, bash] +---- +sed -i "s/^path.*/path \/sysroot\/ostree\/deploy\/fedora-coreos\/var\/crash/" /etc/kdump.conf +---- + +. Enable the kdump systemd service. ++ +[source, bash] +---- +sudo systemctl enable kdump.service +---- + +. Reboot your system. ++ +[source, bash] +---- +sudo systemctl reboot +---- + +TIP: For additional information on how to test that kdump is properly armed and how to analyze the dump, refer to the https://fedoraproject.org/wiki/How_to_use_kdump_to_debug_kernel_crashes[kdump documentation for Fedora].