2

My laptop is setup as a media server - when it boots up when plugged in to my TV via an HDMI cable, it generally kernel panics (although not always).

The kernel panic is:

enter image description here

Any ideas? I'm running Ubuntu 13.04, but it did the same on 12.04 and 12.10.

1

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

Verification

1st. boot parameter

cat /proc/cmdline 
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

Which means

  • 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

NOTE: crashkernel=384M-2G:64M,2G-:128M this may cause problem on system with less than 2GB RAM

2nd after reboot verify

cat /sys/kernel/kexec_crash_loaded

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 /var/crash directory.

Refer to Ubuntu Server => kernel crash dump

To inspect the crash dump refer to => Crash Dump Recipe

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.