FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-19-2008, 02:55 PM
David Knecht
 
Default Clean serial console setup when using an USB to serial converter

Hello all,

I'd like to connect to a CentOS 5.2 system's console through a
null-modem cable. An USB to serial converter is connected to that
system's USB port.


When using this configuration statement in "/etc/inittab"...

...
# Run gettys on serial line (that is, a serial line connected to USB0)
usb0:12345:respawn:/sbin/agetty -L ttyUSB0 9600 vt100
...

...I get these messages if (and only if) the converter is *not*
connected to the system (thus, if no ttyUSB0 device has been dynamically
created):


Nov 18 15:58:41 anyvizor init: Id "usb0" respawning too fast: disabled
for 5 minutes
Nov 18 16:05:22 anyvizor init: Id "usb0" respawning too fast: disabled
for 5 minutes
Nov 18 16:12:03 anyvizor init: Id "usb0" respawning too fast: disabled
for 5 minutes


Apart from that, connectivity to the serially attached console works
fine of the serial line is connected.


Obviously, I would like to have a clean setup without any errors where
this kind of console setup works like a charm.


As a workaround (since I did not get any further on an inittab-based
solution), I tried to configure udev to spawn "/sbin/agetty -L ttyUSB0
9600 vt100" once the converter gets connected. This is my udev
configuration:


[root@anyvizor rules.d]# pwd
/etc/udev/rules.d

[root@anyvizor rules.d]# cat 10-custom.rules
BUS=="usb", KERNEL=="ttyUSB*" SYMLINK+="usb_attached_console"
SUBSYSTEM=="usb_device", ACTION=="add",
RUN+="/etc/udev/scripts/respawn_usb_attached_console.sh"

[root@anyvizor rules.d]#

[root@anyvizor scripts]# pwd
/etc/udev/scripts

[root@anyvizor scripts]# cat respawn_usb_attached_console.sh
#!/bin/env sh

getty_command_line="/sbin/agetty -L usb_attached_console 9600 vt100"

while [[ -e /dev/usb_attached_console && $(/usr/bin/pgrep -xf
"${getty_command_line}" | /usr/bin/wc --lines) -eq 0 ]]

do
eval "${getty_command_line}"
done
[root@anyvizor scripts]#

Again, connectivity to the serially attached console works fine once the
system is up and running. However, the system does not pass the


Starting udev...

message displayed on the console (here, I mean the normal console
screen, not the serially attached console) if (and only if) the USB to
serial converter is connected when booting. The boot process continues
fine once the converter gets disconnected.


Any hints for an inittab-based as well as an udev-based solution (or
another concept to achieve the same result) is very welcome!


Thanks, David
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org