Using Buildroot, I am trying to create my own kernel assembly. After creating the image and loading it in the VirtualBox environment, the kernel always panics after the GRUB stage. General summary of what I see:
] CPU: 0 PID: 1 ... ] Hardware name: innotek GmbH ... ] <some registers> ] Call Trace: ] [<c0a1c995>] dump_stack+... ] [<........>] panic+... ] [<........>] do_exit+... ] ... ] Kernel Offset: 0x0 from 0xc0400000 ... ] ---[ end Kernel panic - not syncing: Attempted to kill init! ...
Now I assume that this is only the tail of the message that I want to see, but I do not have the means to view it (for example: Shift-PageUp cannot). When a panic occurs, the above text is never displayed for a second on the screen.
I first came across the KernelDebuggingTricks page which says:
Slow kernel messages at boot
... [Create] a kernel with the option enabled:
CONFIG_BOOT_PRINTK_DELAY = y
And boot the machine with the following kernel boot option:
boot_delay = N
I confirmed that my kernel (3.16) was built with the CONFIG_BOOT_PRINTK_DELAY option and tried to set boot_delay to 10, 500 and 1000 milliseconds in my GRUB. Even with a set delay of 1000 milliseconds (and waiting for a good ~ 5 minutes), all the messages from the panic trap logs break out in no time.
Does anyone have any suggestions on how I can consider the root of a kernel panic? The only thing I’m thinking about right now is to manually add sones to the kernel code (which I would like to avoid).
source share