Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Enable Kernel Crash Dump (kdump) on Debian Linux

Table of Contents

When a Linux system crashes, the most valuable tool for troubleshooting is a kernel crash dump. A crash dump captures the contents of the system’s memory at the moment of failure, allowing administrators and developers to analyze the root cause using tools like crash or gdb.

On Debian Linux, the kdump service provides this functionality by reserving memory for a secondary kernel (called the dump-capture kernel) that boots when the primary kernel fails. In this guide, we’ll enable and configure Kernel Crash Dump on Debian Linux step by step.

Steps to Enable Kernel Crash Dump

Update your package list and install the kdump tools along with debugging support:

#apt-get update
#apt-get install kdump-tools crash kexec-tools makedumpfile "$(uname -r)-dbg"

you will be prompted with a configuration screen like this:

Select Yes → kdump-tools will be enabled immediately (USE_KDUMP=1 will be set).

2. Enable kdump

In order to enable the kdump manually; Edit the kdump configuration file:

#nano /etc/default/kdump-tools
Set:
USE_KDUMP=1

Save and exit.

3. Configure Bootloader (GRUB)

Reserve memory for the crash kernel by editing GRUB:

#vim /etc/default/grub

Modify the GRUB_CMDLINE_LINUX_DEFAULT line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet crashkernel=256M"

Update GRUB:

#update-grub

4. Reboot and Verify

Reboot your system:

After reboot, check kdump status:

#kdump-config show

You should see that the crash kernel is loaded. You can also verify with:

#cat /sys/kernel/kexec_crash_loaded

If it returns 1, the crash kernel is ready.

5. (Optional) Test a Crash

Warning: This will intentionally crash and reboot your system. Only test in a safe environment.

Enable sysrq:

#sysctl -w kernel.sysrq=1

Trigger a crash (do not do in servers in production):

#echo c | sudo tee /proc/sysrq-trigger

After reboot, inspect the crash dump in /var/crash/

Conclusion

By enabling kdump on Debian Linux, you equip your system with a powerful mechanism to capture kernel crash dumps for post-mortem debugging. With the crash dump files available, administrators can analyze the root cause of failures and ensure better stability for production systems.

Whether you’re running servers or development environments, setting up kdump is a best practice for diagnosing critical issues effectively.

If you’re facing challenges configuring or troubleshooting Kernel Crash Dump on Debian Linux, our experts can help. At Skynats, we provide reliable Linux server management services and 24/7 server support services to ensure your systems remain stable, secure, and resilient. Contact us today for professional assistance and seamless server management.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Let us know your requirement.

Can't get what you are looking for?

Get Support Right Away!

Thank You

We have received your query and will get back to you soon.