kdump-config(8)

โœจ kdump-config(8) โœจ

Linux System Administrator's Manual ๐Ÿ’…


๐ŸŽ€ NAME

kdump-config โ€” configure kdump, check status, or save a vmcore file ๐Ÿฆ‹

๐Ÿ”ฎ SYNOPSIS

kdump-config { help | test | show | status | load | unload | savecore |
      propagate | symlinks {kernel-version} }

๐Ÿ’– DESCRIPTION

okay so kdump-config is the manager for the kdump feature in the Linux kernel ๐Ÿ”ฅ When a kdump enabled kernel panics, it instantly boots into a clean kernel called the kdump kernel. The memory image of the panicked kernel shows up in /proc/vmcore while the kdump kernel (or "capture kernel") is running. iconic, right? ๐Ÿ˜ญ

kdump-config loads the kdump kernel into the current kernel, and after a kdump, it captures the vmcore image through the kdump kernel. It can take advantage of the linux-image-$(uname -r)-dbg package and will try to use makedumpfile to capture the vmcore. Then you can use the crash tool to analyze the vmcore later, no cap ๐Ÿงš

kdump-config exits with 0 on success and 1 on failure. Simple, clean, periodt โœจ

๐ŸŒธ COMMANDS

  • help โ€” prints a usage summary ๐Ÿ’œ
  • test โ€” figures out the parameters that would be used to load the kdump kernel, but doesn't actually load it. Super useful for checking your config settings before you commit ๐Ÿ™ˆ
  • show โ€” shows the current parameters and the saved kexec command from the last kdump-config load ๐Ÿ‘‘
  • status โ€” checks /sys/kernel/kexec_crash_loaded or /sys/kernel/fadump_register (depending on the dump mode) and prints a matching message ๐ŸŒˆ
  • load โ€” loads the kdump kernel, or registers it if you're using firmware assisted dump (fadump) ๐Ÿ”ฅ
  • unload โ€” unloads the kdump kernel, or unregisters it if you're using firmware assisted dump (fadump) ๐Ÿซถ
  • savecore โ€” if /proc/vmcore exists, saves it using makedumpfile ๐Ÿ“
  • propagate โ€” sends your public ssh key to a remote host so you can connect without a password ๐Ÿฆ‹
  • symlinks {kernel-version} โ€” verifies and creates the vmlinuz and initrd.img links in /var/lib/kdump for the kernel version you give it. If the target initrd.img file is missing, it creates that too โœจ

๐Ÿ“ FILES

  • /etc/init.d/kdump-tools โ€” the init script that automatically loads a kdump kernel, or saves a vmcore and reboots ๐Ÿ”ฎ
  • /etc/default/kdump-tools โ€” the configuration file ๐Ÿ’…
  • /var/crash/kernel_link โ€” a link to the current debug kernel ๐ŸŽ€
  • /var/crash/kexec_cmd โ€” the last kexec_cmd that kdump-config ran ๐ŸŒธ
  • /var/lib/kdump/vmlinuz โ€” a symbolic link pointing to the current kernel file in /boot ๐Ÿ’œ
  • /var/lib/kdump/initrd.img โ€” a symbolic link pointing to the initrd.img file with the current kernel version in /boot ๐Ÿงš

๐Ÿšจ DIAGNOSTICS

Okay, these are the error messages you might run into, and what they actually mean. Don't panic, bestie ๐Ÿ™ˆ

  • USE_KDUMP is not set or zero โ€” the variable USE_KDUMP in /etc/default/kdump-tools is 0. To use kdump, open the file and change the value to 1 ๐Ÿ’–
  • kdump is not supported by this kernel โ€” the file /sys/kernel/kexec_crash_loaded doesn't exist. This means the running kernel either wasn't configured to support kdump, or it was booted without a crashkernel= commandline parameter ๐Ÿ’€
  • no crashkernel= parameter in the kernel cmdline โ€” a crashkernel= commandline parameter wasn't used when the running kernel booted. You'll need to add a crashkernel= parameter to your /etc/lilo.conf, /etc/elilo.conf, or grub /boot/grub/menu.lst file and reboot before kdump will work. Check the installed READMEs for suggestions ๐Ÿ“š
  • KDUMP_KERNEL does not exist: $KDUMP_KERNEL โ€” a KDUMP_KERNEL was set in /etc/default/kdump-tools, but it can't be found ๐Ÿ˜ญ
  • KDUMP_INITRD does not exist: $KDUMP_INITRD โ€” a KDUMP_INITRD was set in /etc/default/kdump-tools, but it can't be found ๐Ÿ˜ญ
  • no KDUMP_KERNEL in $KDUMP_DEFAULTS and can't find a kdump package directory in /usr/lib โ€” no kdump kernel could be found anywhere ๐Ÿซ 
  • found a linux-kdump package in $KDUMP_PKG_DIR but can't find a kdump kernel in $KDUMP_PKG_DIR โ€” this one means the linux-kdump package is broken or installed wrong ๐Ÿ”ง
  • no kdump initrd image: $KDUMP_INITRD โ€” an initrd will not be used: a kdump kernel was found, but its matching initrd wasn't ๐Ÿฅบ
  • kdump kernel relocation address does not match crashkernel= parameter โ€” on non-relocatable architectures, the kdump kernel has to be built with a predetermined start address. This message means that start address doesn't match the one in the crashkernel= parameter ๐Ÿ™…โ€โ™€๏ธ
  • failed to load kdump kernel โ€” kexec said it couldn't load the kdump kernel ๐Ÿ’”
  • failed to unload kdump kernel โ€” kexec said it couldn't unload the kdump kernel. Run kexec -u directly for more details ๐Ÿ”
  • makedumpfile failed, falling back to 'cp' โ€” the kdump-tools init script tried to save /proc/vmcore with makedumpfile, the save failed, and it's trying cp instead ๐ŸŒธ
  • failed to save vmcore in $KDUMP_STAMPDIR โ€” both makedumpfile and the cp fallback failed. This usually happens when pathnames are wrong or the disk is full ๐Ÿ’€
  • Invalid argument : missing kernel version โ€” the symlinks command was used with a kernel version that isn't installed on this server ๐Ÿ™ˆ
  • Invalid symlink : {symbolic link} โ€” the listed symbolic link is missing, broken, or pointing at the wrong version ๐Ÿ”—
  • Cannot change symbolic links when kdump is loaded โ€” the defined symbolic links are already in use. You have to unload kdump before using the symlinks command ๐Ÿšซ
  • Unable to locate kernel hook โ€” the kdump-tools script that creates the smaller initrd.img files is missing from /usr/kernel/postinst.d ๐Ÿงฉ
  • Invalid kernel version : {kernel version} โ€” the kernel version you gave the symlinks command doesn't exist ๐Ÿคทโ€โ™€๏ธ
  • fadump is not configured in this kernel. โ€” Firmware Assisted Dump (fadump) isn't available on this platform ๐Ÿฅ€
  • SSH and NFS cannot be defined concurrently โ€” both variables are set in /etc/default/kdump-tools. You have to pick one or the other ๐Ÿ™…โ€โ™€๏ธ
  • Unable to mount remote NFS directory {directory}. Cannot save core โ€” the remote NFS server isn't letting this server mount the directory to save the crash dump ๐Ÿšซ
  • Unable to write to the remote NFS directory {directory}. Cannot save core โ€” the remote NFS directory mounts fine, but this server can't write files to it ๐Ÿ˜ญ
  • makedumpfile --dump-dmesg failed. dmesg content will be unavailable โ€” the command to capture the dmesg buffer failed, so it won't show up in the crash directory ๐Ÿฅบ
  • Unable to reach remote server {server}. No reason to continue โ€” kdump-tools is set up for a remote dump, but the remote server can't be reached ๐Ÿ“ก
  • makedumpfile scp failed. The vmcore file will not be available โ€” makedumpfile worked, but the resulting file couldn't be copied over SSH to the remote server ๐Ÿ’”
  • Remote ssh dump is not configured. No reason to propagate" โ€” you ran the propagate command, but kdump isn't set up for a remote dump ๐Ÿ™ƒ

๐Ÿ”— SEE ALSO

๐Ÿ‘‘ AUTHOR

Written by Terry Loftin <terry.loftin@hp.com> and Louis Bouchard <louis.bouchard@ubuntu.com> ๐Ÿซถ


kdump-tools v1.6.7-2 ยท Jul 2020 ยท kdump-config(8) ๐ŸŒธโœจ๐Ÿ’… bestie, you're officially a kdump expert now ๐Ÿฆ‹