[olug] Kernel Building

Phil Brutsche phil at brutsche.us
Fri Jun 11 19:42:28 UTC 2004


William E. Kempf wrote:

> I started down this path in the very early days, and genkernel (for
> those not running Gentoo, this is a script that automates kernel
> building for Gentoo) was in flux and not really usable for 2.6.  So,
> I managed to get a kernel that mostly worked by doing things by hand.
> By mostly work, I mean that all my programs/servers appear to run
> with out issue, but there are errors at boot time (mostly, I believe,
> issues with devfs).

devfs is considered depreciated in kernel 2.6.x by the kernel 
developers.  It's not well maintained and has crashing issues on 64-bit 
architectures.

The replacement is a combination of the /sys file system and the udev 
program.  The system should mount /sys by default, and udev should be in 
the Portage someplace.

Incidentally, Gentoo was the only "major" distribution to enable devfs 
by default.

> I want to learn how to handle this, but there are a few things
> standing in my way, so I'm hoping someone can help me out.  First, is
> there any way to read all of the messages sent to the terminal during
> a boot?

You already know that one...

A serial console with a large scrollback buffer will help.

> I'm aware of both /var/log/messages and dmesg, but neither of these
> seem to be complete, and are certainly not the exact same output seen
> during boot. This is making it difficult to diagnose issues for me.

You can also increate the size of the buffer the kernel stores messages 
in.  Look for CONFIG_LOG_BUF_SHIFT, aka "Kernel log buffer size" under 
"General setup".

> Second, is there any way to test a kernel remotely?  It's not always 
> possible for me to be at the physical terminal when I'm administering
> the box, for numerous reasons.  I do most everything remotely via
> ssh, but testing the kernel this way is problematic.  Rebooting, if
> the kernel doesn't boot properly, renders it impossible to recover
> remotely.  Seems there should be a way to test this remotely, even if
> it's in an emulated environment.

Serial console.  Provided the kernel doesn't completely hard lock you 
should be able to do almost anything through the serial port that you 
can through the console.  Oh, and make sure you enable "Magic SysRq" 
support.

-- 

Phil Brutsche
phil at brutsche.us


More information about the OLUG mailing list