Compiling Debian Modules
Today, the kernel knows how build debian packages:
$ make deb-pkg LOCALVERSION=-XXXX KDEB_PKGVERSION=YYYY
netconsole
If you're trying to debug a crashing kernel, or generally manipulate the logs, it's handy to have those logs on a different system. netconsole1 to the rescue!
On the system you're debugging:
$ modprobe netconsole netconsole=@/,9876@10.0.0.2/
On your stable machine (here a Mac):
$ nc -u -l 9876
dmesg level
It's often helpful to crank up the debugging level:
$ sudo dmesg -n debug
Documentation
Free Electrons have a fine presentation2 on kernel hacking.
References
- 1. https://www.kernel.org/doc/Documentation/networking/netconsole.txt
- 2. http://free-electrons.com/doc/training/linux-kernel/linux-kernel-slides.pdf