serial login and login from console

Hello,

my servers are located a few kilometers away from my office. Last week I’ve got a bunch of nport express terminal converters and now I am trying to bring them into operation. I’ve an old testserver which sometimes boots into single user mode without network due to an old hd and that’s why I can’t access this server with ssh (The server is too old to fix it, but sometimes it is good enough for some tests). My idea is to activate the serial line and connect to the server with putty over the nport adapter. So I could fix the hd issue and start the server form single user mode.

For this I made some changes in Grub (menu.lst) and /etc/inittab. In priniciple it is working, but from my point of view not in an optimal way. First I show you the changes I made in meu.lst:

Modified by YaST2. Last modification on Thu Jan 19 21:58:07 CET 2012

THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader

Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 2
timeout 8
##YaST - generic_mbr


#gfxmenu (hd0,1)/message
serial --unit0 --speed=115200
terminal --timeout=15 serial console***
##YaST - activate
###Don’t change this comment - YaST2 identifier: Original name: linux###

title openSUSE 11.3 - 2.6.34.10-0.6 (default)
root (hd0,1)
kernel /vmlinuz-2.6.34.10-0.6-default root=/dev/system/root repair=1 resume=/dev/system/swap showopts vga=0x34b console=tty0 console=ttyS0,38400
initrd /initrd-2.6.34.10-0.6-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.3 - 2.6.34.10-0.6 (default)
root (hd0,1)
kernel /vmlinuz-2.6.34.10-0.6-default root=/dev/system/root showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x34b
initrd /initrd-2.6.34.10-0.6-default

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Desktop – openSUSE 11.3 - 2.6.34.10-0.6
root (hd0,1)
kernel /vmlinuz-2.6.34.10-0.6-desktop root=/dev/system/root repair=1 resume=/dev/system/swap vga=0x34b console=tty0 console=ttyS0,115200 initrd /initrd-2.6.34.10-0.6-desktop

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.3 - 2.6.34.10-0.6 (desktop)
root (hd0,1)
kernel /vmlinuz-2.6.34.10-0.6-desktop root=/dev/system/root showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x34b
initrd /initrd-2.6.34.10-0.6-desktop

###Don’t change this comment - YaST2 identifier: Original name: Linux other 1 (/dev/sda1)###
title Linux other 1 (/dev/sda1)
root (hd0,0)
configfile /boot/grub/menu.lst–

In /etc/inittab I commented out and changed the line:

S0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt102

Now I have some issues that I would like to resolve.

1: During boot I can see all bootmessages on the serial line connected terminal (putty) but not on the localy attached console (vga monitor/keyboard) anymore. On the vga monitor only the messages from dmesg are displayed but no information about starting and stopping the services. After the system is completely booted I can login from form local console and from serial line. I would prefer to see all messages on both consoles, because sometimes I am working at the servers location and sometimes at the office location.

2: If I am connected via putty to the serial line and I press some special keys (cursors keys, tab key and so on) I see the escape sequences on the screen but the cursor is not moving. Also inputs are echoed and after command execution the prompt is displayed twice.

Example:

atom:~ # ls -al
ls -al
total 784
drwx------ 49 root root 4096 Jan 21 12:45 .
drwxr-xr-x 27 root root 4096 Jan 21 15:51 …
-rw------- 1 root root 6542 Aug 31 2010 .ICEauthority
-rw------- 1 root root 387 Jul 28 2010 .Xauthority

***atom:~ #
atom:~ #


atom:~ #
*atom:~ #This test^[D^[[Dshould move ^[[C^[[C teh cursor^I or autocomplete^[[D the command[/b]
atom:~ #

If I use the special keys during a ssh session everything works in the expected way (Tab = Autocompletition …)

Has anyone an idea how I can fix this issues?*

Welcome here (I see this is your first post). Please next time copy/paste your computer text between CODE tags and not QUOTE tags: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html
That will conserve the computer lay-out.

Also, I am not sure that changing computer text into bold and italics where there is none is a good idea because it destroys character positions within the lines ( some use red colour to emphasize parts of the text).

In the mean time, I will go and compare your configs with mine. I have a system running an async console. Will be back in an hour or so.

As you are aware there are three things configured here independant of each other.

  1. GRUB is configured to use the async line and not the graphics card/monitor. I do not think you can have them both at the same time. Thus your wish to have the GRUB conversation (mainly to choose what to boot) can be done from both devices at the same boot.
  2. The Kernel is configured to use the async device as console. Again, I do not think you can have both at the same time, but you can create two entries in menu.lst
    , each with the other device. Then at boot you can choose on which the boot messages will be shown. But because of #1, I do not know if this is a real solution. 1. Is the configuration to make the async device usable as a login terminal.

I guess I have at least partly answered your first question.

On you second question, what I see from your listing and description, one of the partners between you typing and the async line connected to the system seems to buffer the typing until a CR is hit. This is combined with showing what you are typing (in fact adding to the buffer) directly on your screen, else you would not see anything you type until you hit CR. The system does echo every character it gets and thus you get, after hitting the CR, once again the line you typed. Also, when you hit a special key, this is simply put into the line buffer and never sended to the system until you hit CR.

In other words, for an async terminal to function you need a complete async connection that sends every character immediatly to the endpoint. You should therefore look at every in-between element to see who buffers and if you can eliminate that.

In such a buffered system, the remote echo should of course be switched. This will remove the double echo. But it will do nothing to better the systems reaction on individual typed characters (special or not).

On 2012-01-21 19:36, hcvv wrote:
> In other words, for an async terminal to function you need a complete
> async connection that sends every character immediatly to the endpoint.
> You should therefore look at every in-between element to see who buffers
> and if you can eliminate that.

The buffering part would normally be the converter to telnet.

I remember once where we were working on a big installation. The machine
did not have any tcp/ip capacity, all were serial terminals and printers.
We used a Cisco router to convert the serial terminals to telnet, and thus
have remote monitoring capacity. The router echoed every single character,
which is fine for terminals used by humans, but not for the remote printers
if busy. Converting each char to a tcp/ip package apparently increased so
much the network traffic that the network people thought of it as an abuse
and firewalled our traffic, leaving us instantly out of contact with our
very expensive machines. Without warning! There was a big row.

We convinced them to allow traffic back so that we could reconfigure the
cisco to send line by line, buffered.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)