Kdump on CentOS 5.4

Updated: April 14, 2010

This article is a part of my Linux Kernel Crash Book. It is available for free download in PDF format!

Just recently, we have had a tutorial on how to configure Kdump on openSUSE 11.2, most notably listing several major differences compared to the original Kdump guide. In the latest article, we learned about some new functionality and syntax changes in the Kdump package used with openSUSE 11.2, the behavior on 32-bit and 64-bit systems and problems with memory allocation.

In today's article, we will briefly work our way through Kdump configuration on CentOS 5.4, the latest release of this excellent server distribution. In fact, we have already started our super-geeky journey when we configured the Debug repository on CentOS, as the initial preparatory step for kernel crash dump collection and analysis. Now, we will continue the setup, review the tools and options and compare the configuration to openSUSE.

Teaser

Preparations

In general, the basic configuration is no different than what I've already shown you. The basic rules still apply. The big difference is in the location and names of configuration files, as well as accompanying utilities that come with the operating system.

Enable Debug repositories

The repository is not enabled by default. You will have to add it by hand.

Install debug packages for your running kernel

Without it, you will not be able to process the dumped cores. You can do this later, after the system has been configured to dump cores on kernel crash, but you may as well do it now.

Debug packages

Comparison to openSUSE

Memory allocation

Like openSUSE, CentOS requires a change to the GRUB entry. However, unlike openSUSE, which uses a range specification in the latest version, CentOS sticks to the old version of crashkernel=XM@YM.

System scripts

Kdump uses the kdump script, like in older versions, whereas openSUSE now uses boot.kdump. You can verify by running chkconfig kdump.

chkconfig kdump

Or perhaps:

chkconfig --list | grep kdump

This allows Kdump changes to be affected without a reboot.

Working

However, any time you make a change, the initrd kdump file will be rebuilt.

Rebuilt

Kdump configuration file

Configuration file is located under /etc/kdump.conf. Unlike the openSUSE file, it lacks lots of the internal documentation and is just a line-separated listĀ of directives. Nothing major, but it's more difficult to use and read.

conf file

You can use the system-config-kdump GUI to setup Kdump, though:

GUI

Kdump in action

One more notable difference is that you will not be seeing the progress bar when Kdump is working on CentOS. This is a known fact and you should not be alarmed by it. You will see the usual boot process for the crash kernel, but not the minutes of the under-the-hood operation.

References

There's more to it, mostly small syntax changes. The general idea remains identical to the material presented in my Kdump tutorial. Nevertheless, if you really need the full official documentation, the please read this:

RedHat Knowledge Base: How do I configure kexec/kdump on RedHat 5?

Furthermore, please refer to the following articles for more information:

Collecting and analyzing Linux kernel crashes - Kdump

CentOS 5.3 - Serious Linux for serious people

How to enable Debug repository in CentOS Linux

Conclusion

There you go. Now, you have the right tools to get kernel crashes on CentOS, too. As you can see, there are some subtle changes compared to openSUSE. The basic functionality remains the same, but the way Kdump is used and enabled is different.

Very soon, we will focus on the crash analysis. Stay tuned for updates.

Cheers.

Download

This tutorial is a part of my Linux Kernel Crash Book. The book is available for free download, in PDF format. Please check the book article for more details.

Book preview