I would recommend saving kernel crash dump when kernel panics so as to find out the root cause of the panic.
Ubuntu relies on
kexec to generate kernel crash dump.
How does it work?
=> When a kernel panic occurs, the kernel relies on the kexec mechanism to quickly reboot a new instance of the kernel in a pre-reserved section of memory that had been allocated when the system booted (see below). This permits the existing memory area to remain untouched in order to safely copy its contents to storage.
Install the kernel crash dump utility (reboot required)
sudo apt-get install linux-crashdump
1st. boot parameter
BOOT_IMAGE=/vmlinuz-3.8.0-29-generic root=/dev/mapper/ubuntu-root ro crashkernel=384M-2G:64M,2G-:128M splash quiet vt.handoff=7
- if the RAM is smaller than 384M, then don't reserve anything (this is the "rescue" case)
- if the RAM size is between 386M and 2G (exclusive), then reserve 64M
- if the RAM size is larger than 2G, then reserve 128M
crashkernel=384M-2G:64M,2G-:128M this may cause problem on system with less than 2GB RAM
2nd after reboot verify
If 1 => the crash kernel has been loaded, if it is 0, then something went wrong.
The crash kernel can also be loaded by running:
sudo /etc/init.d/kdump start
NOTE: Since 13.04 Raring, the same behavior can be achieved by using the new
kdump-tools mechanism after modifying
/etc/default/kdump-tools by running (see Release specific notes):
sudo kdump-config load
Save a crash dump
Causing a crash is done by either pressing +c (
/proc/sys/kernel/sysrq needs to be 1) or
echo c | sudo tee /proc/sysrq-trigger (same as
echo c > /proc/sysrq-trigger).
If everything works, there should be some delay (depending on the memory size). Then the system reboots again into the normal mode. Once done, the system will reboot to its normal operational mode. Kernel Crash Dump file can be found in the /
Refer to Ubuntu Server => kernel crash dump
To inspect the crash dump refer to =>
Crash Dump Recipe