The Geekess   Linux, bicycling, open source, gardening, amateur rockets, and other seemingly unrelated hobbies.

Update for Netconsole Tutorial

Image Copyright pfly -- http://www.flickr.com/photos/pfly/130659908/ 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.

Read more »

Tags: , , | link | 3 comment(s)


Debugging with printks over Netconsole

Image Copyright saschaaa -- http://flickr.com/photos/saschaaa/152502539/ 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.

Read more »

Tags: , , | link | 9 comment(s)