I’m trying to login to a server through the serial port using agetty. When I start agetty and open the serial connection, I see the login prompt but as soon as I enter the username (in my case
root), agetty gets killed. Not only that, along with agetty, it’s parent shell is also being terminated. The following command sequence illustrates this. After starting agetty(the second line), I try to login through the serial port but end up losing the connection as below.
ROOT@dir1(~) (0)#agetty 115200 /dev/ttyS0 Connection to dir1 closed.
Any suggestions on why this might be happening? I’m using SLES version 10 and the serial port is connected to a terminal server that is being accessed through a web browser. I’m not sure if rebooting the server with an entry in inittab would make a difference but I’m not inclined towards that as this is a production server and down-times are expensive.
You should have this in
inittab, and you don’t have to reboot. Just
As for agetty in a shell, it really was not designed to run in the foreground and control some other terminal; while you could pass it a tty argument of
-, this would cause it to print a login prompt in your terminal, rather than on the serial port, which isn’t what you want.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.