What does early mean exactly?
For this article, early means before userspace comes up. Once userspace is available, there are many more options for saving the kernel panics, and this can also be used for panics that happen while initializing.
Getting more information
A common situation is to see the tail end of a kernel panic but not enough of it. You can add options to the kernel command line to see what else is going on.
First, you need to get the lpj
(loops per jiffie) of your system:
$ dmesg | grep lpj [ 0.000062] Calibrating delay loop (skipped), value calculated using timer frequency.. 5387.31 BogoMIPS (lpj=2693655)
The lpj
value from this example is 2693655
. Your lpj
will probably be different.
Append the following to the kernel command line of the kernel you want to debug:
lpj=<value you extracted> loglevel=7 boot_delay=<delay in ms>
For details: lpj
sets the loops per jiffie - this is used to have delays early. loglevel=7
ensures all kernel messages get printed. boot_delay=<delay in ms>
adds a delay after each kernel message. The result is that all kernel messages should be printed out at a rate that can be read. You will have to experiment with the value for boot_delay
. Try starting with 50 and adjusting it up or down, depending on your needs.
NOTE using boot_delay
requires the kernel to be built with the CONFIG_BOOT_PRINTK_DELAY
option enabled, and using this kernel boot parameter will significantly slow down your system startup. You may see a long delay before the kernel messages come out. Be patient!