Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to enable kernel crash dumps for my Debian 5.0.7 machine. The kernel version is 2.2.26 amd64.

How can I configure this?

share|improve this question

migrated from May 8 '11 at 16:37

This question came from our site for professional and enthusiast programmers.

I don't remember Kernel 2.2.x having AMD64 support... I this version number correct? – Turbo J May 15 '11 at 8:08

A short answer, but...

Go to your kernel source (E.g. cd /usr/src/linux/ ) and configure the options for the next kernel (make menuconfig). Go to "Processor type and features". Enable "kernel crash dumps". (CONFIG_CRASH_DUMP=y)

Build new kernel, install.

Then read these for more background information: Linux-Crash-HOWTO.pdf and lkcd utils

share|improve this answer
And to check if it's already enabled: grep CONFIG_CRASH /boot/config-$(uname -r) – Matthew Flaschen Feb 13 '14 at 20:21

You may also want to look at Debian's kdump-tools package to automate some of the necessary boot-time steps.

The steps are roughly,

  1. sudo apt-get install kdump-tools
  2. Set USE_KDUMP=1 in /etc/defaults/kdump-tools
  3. Add crashkernel=128M to the kernel command-line given in bootloader configuration (e.g. /etc/defaults/grub). It also doesn't hurt to pass nmi_watchdog=1 as well to ensure that hard hangs are caught.
    • Note that 128MB is merely a ballpark figure. It needs to be large enough to accomodate the kernel image and the associated init ramdisk.
    • If your initram disk is large, you might be able to shrink it by tweaking /etc/initramfs-tools/initramfs.conf
  4. Ensure that your boot loader configuration is updated (e.g. sudo update-grub)
  5. Ensure your kernel is built with,
  6. Reboot
  7. Verify that the crash kernel is loaded, cat /sys/kernel/kexec_crash_loaded
  8. Optional: Test that all of this worked,
    1. sudo sync; echo c | sudo tee /proc/sysrq-trigger
    2. Use the crash tool to look at the resulting crash dump
  9. Find a handle of good whiskey to ease the pain of your future in kernel debugging.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .