[olug] Kernel Building

Phil Brutsche phil at brutsche.us
Fri Jun 11 21:51:32 UTC 2004


William E. Kempf wrote:

>> A serial console with a large scrollback buffer will help.
> And how would you accomplish something like that?

1) statically link the NS8250/16550 driver into the kernel
2) Make sure you have "Console on 8250/16550 and compatible serial port"
    selected
3) Boot with "console=ttyS0,9600" on the kernel command line

That will put your kernel messages on COM1 @ 9600 bps 8n1 rather than
output it to the video card.  If you put a line something like this:

T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100

in /etc/inittab you'll get a login prompt on the serial port, too.

Note #1: By doing the above your video card/keyboard will no be longer
your console.  You will not see any kernel messages!

Note #2: if you have the serial driver statically linked, and you boot
the kernel on a system without a video card, it will put the console on
the serial port automatically.

> I don't believe my problem is one of the log size.  There's messages
> in the middle that are not seen when running dmesg, though messages
> before and after are.

Dunno what would be causing it, then.

>> 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.
> 
> 
> Any info/docs on this topic?  I don't even have a clue what you mean
> by "serial console", considering how you seem to be using the term
> here, and I don't understand how it would help me to do remote
> testing?

I mis-worded what I said.  What's more accurate is: "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 keyboard."

Once you have the kernel dumping the kernel messages to a serial
port, you can connect another nearby machine to it with something like
Belkin part #F3X171-10 or one of these:

http://search.ebay.com/laplink-serial-cable_W0QQsofocusZbsQQsbrftogZ1QQfromZR10

SSH into the nearby machine, attach minicom or kermit to the approprate
serial port, and viola, instant serial console.

http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/index.html will help a 
lot.

-- 

Phil Brutsche
phil at brutsche.us


More information about the OLUG mailing list