[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: console on Niagara in 6.0.1



From: Jurij Smakov <jurij@wooyd.org>
Date: Tue, 22 Mar 2011 09:34:32 +0000

> You may end up with console set to /dev/console if detection logic 
> failed and a fall-through value has been used here:
> 
> http://git.debian.org/?p=d-i/rootskel.git;a=blob_plain;f=src/sbin/reopen-console-linux;hb=HEAD
> 
> Can you post dmesg output from this machine, booted via a serial 
> console?

Device probing via dmesg parsing, wonderful... :-/ This really isn't
going to ever work reliably.

So this code is going to see "ttyHV0" get enabled:

[    0.000000] console [tty0] enabled, bootconsole disabled
[102839.004039] console [ttyHV0] enabled

But that doesn't tell you the serial device name under /dev

Not even close.

The device for console named ttyHV0 on this machine happens to be
/dev/ttyS0, but it could have been /dev/ttyS1, or /dev/ttyS2, or
similar depending upon the order in which the various serial drivers
probed.

Console name to serial device name is not a 1 to 1 relationship.
They can be, and are often, completely different.

The console name string is used for matching for kernel command
line directives, but that's it.  You cannot use it to determine
the /dev/* name for the underlying device.

As a result you now will have to add logic to this script so that it
knows that this "ttyHV?" thing allocates from the "ttyS?" space, and
then you will have to add code which figures out which index in the
ttyS? space it got.

And there are a bunch of other serial device drivers which have the
same issue.


Reply to: