Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 2008 13:28:02 -0600
From:      Scott Long <scottl@samsco.org>
To:        Ed Schouten <ed@80386.nl>
Cc:        Thierry Herbelot <thierry.herbelot@free.fr>, hackers@freebsd.org, current ML <current@freebsd.org>
Subject:   Re: strange behaviour with /sbin/init and serial console
Message-ID:  <490B5C42.10200@samsco.org>
In-Reply-To: <20081031190614.GQ1165@hoeg.nl>
References:  <200810311746.23743.thierry.herbelot@free.fr> <20081031190614.GQ1165@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Ed Schouten wrote:
> Hello Theirry,
> 
> * Thierry Herbelot <thierry.herbelot@free.fr> wrote:
>> with the following patch on /sbin/init, I have two different behaviours 
>> depending on the console type (on a i386/32 PC) :
>> - on a video console, I see the expected two messages,
>> - on a serial console, the messages are not displayed (init silently finishes 
>> its job and gets to start /etc/rc and everything)
>>
>> I assume that the writev system call is implemented in 
>> src/sys/kern/tty_cons.c::cnwrite(), but I could not parse the code to find an 
>> explanation.
>>
>> 	any taker ?
>>
>> 	TfH
>>
>> PS : this is initially for a RELENG_6 machine, but the code is quite similar 
>> under RELENG_7 or Current
> 
> Any data written to /dev/console is not multiplexed to all console
> devices, but only the first active device in the list. The reason behind
> this, is because it adds a real lot of complexity to the console code,
> especially related to polling and reading on /dev/console.
> 
> This weekend I'm going to commit a replacement implementation of
> /dev/console, which also has this restriction.
> 

The multiplexed console feature is one thing that linux got right.  In a
corporate setting, you really need both a serial console and a video
console in order to effectively manage the machines, as you want to be
able to access them both remotely and locally.  While it might be hard
to build multiplexing into the console driver, do you think it would be
possible to layer a multiplexer on top of it, similar to how the kbdmux
driver works?

Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?490B5C42.10200>