[clue-tech] linux ethernet tty-console?

Ken MacFerrin lists at macferrin.com
Tue Sep 26 18:25:22 MDT 2006


Ken MacFerrin wrote:
> Jim Ockers wrote:
>> Hi Ken,
>>
>> Thanks for the reply.
>>
>> Ken MacFerrin wrote:
>>> Jim Ockers wrote:
>>>> Hi CLUEbies,
>>>>
>>>> Does anyone know of a way to get the Linux kernel to provide a
>>>> console tty-style device over ethernet?  Sort of like telnet or 
>>>> ssh daemon but built into the kernel.
>>>>
>>>> Yes I know there are security issues.  We're talking LAN only.
>>>> I've seen stuff like this  http://www.selenic.com/netpoll/netconsole.patch
>>>> which lets you see kernel printk() messages on another system via
>>>> ethernet using a utility like netcat or tcpdump or something.
>>>>
>>>> We have a curses application which is the very first thing init
>>>> runs during boot-up.  Unfortunately if there is something wrong
>>>> with the system the curses application requires user interactive
>>>> input (type stuff in dialog boxes, move the cursor between boxes 
>>>> using the arrow keys, etc.).
>>>>
>>>> Unfortunately this is on a headless server.  Yes we have a
>>>> serial console.  Unfortunately these systems are deployed in remote
>>>> locations and the serial console cable keeps getting mis-placed
>>>> and delivery of a new one is not possible (plus they are $70 a
>>>> whack, for the industrial strength explosion proof cable).
>>>>
>>>> The ethernet cable is always connected and we're wondering if
>>>> there is some way to get a tty console right from the kernel via
>>>> ethernet so we can access the curses application over the
>>>> network instead of just via the serial cable which we usually
>>>> don't have.
>>> I used to do something similar with my transparent pf firewall box so I
>>> could still access it from my LAN even though it didn't have an IP
>>> address.  In this case I hooked a null modem serial cable from the
>>> firewall box to my home server and would then ssh into my home server
>>> and use minicom to access the firewall console across the serial connection.
>>>
>>> There's a good article about a similar setup using minicom and conserver
>>> here:
>>> http://www.linux.com/article.pl?sid=06/08/29/1316246
>> In this case our problem is caused by the lack of the null modem serial 
>> cable.  We always seem to have a network cable connected but no serial
>> console cable.
>>
>> We have the agetty running on the linux box but without a null modem
>> serial cable connected we cannot access the console, so we are trying
>> to figure out if we can do something like that using just the ethernet
>> cable.
>>
> 
> I can't think of a way this would be possible from boot without remote
> management/IPMI hardware already built in or added.  The problem is that
> the target machine's pci drivers and tcp stack are not going to be setup
> until well into the boot process so even if you could access the tty
> from the network device, the ethernet card still wouldn't have a way to
> communicate this externally until networking is setup.
> 
> If you're okay with waiting until networking comes up, then conserver
> (www.conserver.com) should meet your needs.  
[snip]

As a follow-up for the list (and to save anyone else the hassle of
trying to set this up down the road) it turns out conserver is not the
right answer here after all (aka: I was wrong).  conserver can provide
network access to the serial consoles of other machines connected to
it's serial ports but _not_ to itself (in short, you can't "loopback"
the I/O on /dev/ttyS0)..
-Ken





More information about the clue-tech mailing list