A while back I posted a Netconsole tutorial for
how to capture Linux kernel debugging messages from a crashing machine. I've
refined the instructions down to three scripts and three commands, which are
after the break.
| link | 4 comment(s)
Netconsole is a powerful Linux kernel debugging tool. The
dmesg output from a machine under test is transferred over an ethernet link (via
UDP packets) to another machine. That means that you can see the debugging
messages from the test machine on the screen of another machine. Netconsole
isn't good for debugging early kernel panics, but it is very useful if your new
kernel driver hangs your system.
I used it to debug an oops in the xHCI driver that was caused by a NULL pointer access in a kernel linked list -- I should have used list_empty(). It took four hours to get netconsole working, even with three people who were clueful about Linux. (A big thank you goes out to Jamey Sharp and Josh Triplett for their help with this.)
At the time, there was no good tutorial that talked about all the basics and gotchas, so I decided to create one. This tutorial walks you through configuring both machines to be on the same network subnet, configuring the target machine to listen to UDP packets from the source, and configuring the source to send the kernel debugging messages over UDP.
UPDATE: My latest scripts for setting up Netconsole are here.
| link | 11 comment(s)

