I have been experimenting with trying to apply Ingo Molnar's reatime patch and came into a situation where I get a blank screen and no message at all. i.e. Kernel panic, or otherwise. Given, that I want to get involved into understanding the kernel better and the real time patch in particular, is there a set of methods I can follow to take information about what went wrong in this state? Are there perhaps a log written somewhere that I can study by plugging the disk to another Linux system, or a kernel configuration option that will make kernel more verbose and perhaps produce some sort of artifact oror a way to produce a memory dump?In fact, what do kernel developers use as a means to test and troubleshoot kernels?Thank you very much for your help!
How to troubleshoot a kernel not booting without producing a message on screen
kernel;boot;linux kernel;patch
One way of being sure of not missing any message from the kernel is to debug it in a virtual machine.For example, the following script uses qemu to start a virtual machine with a custom kernel:qemu-system-x86_64\    -kernel arch/x86/boot/bzImage\    -drive file=/home/lgeorget/VM/image.qcow2,if=virtio\    -append root=/dev/vda1\    -netdev user,id=mynet0 -device e1000,netdev=mynet0\    -enable-kvm\    -SThe important option here is -S which makes qemu start a GDB server and wait for the debugger to be ready before booting.In another console, go to your Linux development tree, where you compiled your custom kernel, and here start GDB with gdb vmlinux to load the kernel symbols. Next, on the prompt, type:target remote :1234This will connect to the gdb server that qemu started (on localhost, port 1234 by default). Then, you can use your debugger almost as for any program, set breakpoints, continue the execution with command continue, etc.You should be able to inspect and dump the memory, as well as copying logs if you want to analyze them. Note that this does not increase the verbosity of the kernel, though.There are a lot of tutorials on the web, as well as some official documentation. https://stackoverflow.com/questions/11408041/how-to-debug-the-linux-kernel-with-gdb-and-qemuhttp://wiki.osdev.org/Kernel_Debugginghttp://elinux.org/Debugging_The_Linux_Kernel_Using_Gdb