Introduction

Kernel panics indicate critical system failures. Understanding how to capture and analyze crash dumps is essential for root cause analysis.

Symptoms

  • System completely freezes
  • Console displays 'Kernel panic' message
  • Automatic reboot or complete hang
  • Caps Lock key flashing

Step-by-Step Fix

  1. 1.Configure kdump to capture vmcore:
  2. 2.```bash
  3. 3.# Install kexec-tools
  4. 4.sudo apt install kdump-tools linux-crashdump

# Configure crashkernel memory reservation sudo nano /etc/default/grub.d/kdump.cfg GRUB_CMDLINE_LINUX_DEFAULT="crashkernel=512M"

sudo update-grub ```

  1. 1.Analyze crash dump with crash:
  2. 2.```bash
  3. 3.sudo crash /usr/lib/debug/boot/vmlinux-$(uname -r) \
  4. 4./var/crash/$(date)/vmcore

# In crash prompt bt # Backtrace log # Kernel log ps # Process state ```