Hello,

I have a bunch of Debian Wheezy servers set up with the console available
via the serial port.  Generally, I just add this line to /etc/inittab:

    co:2345:respawn:/sbin/getty -L ttyS0 9600 vt102

And then run "kill -HUP 1" and the serial console works (I could also use
"telinit q" or "init q" instead of kill -HUP").  I just did this on a
Wheezy server to make sure, and checked the getty processes prior to making
the change:

# ps -ef | grep getty
root      2660     1  0 Jul24 tty1     00:00:00 /sbin/getty 38400 tty1
root      2661     1  0 Jul24 tty2     00:00:00 /sbin/getty 38400 tty2
root      2662     1  0 Jul24 tty3     00:00:00 /sbin/getty 38400 tty3
root      2663     1  0 Jul24 tty4     00:00:00 /sbin/getty 38400 tty4
root      2664     1  0 Jul24 tty5     00:00:00 /sbin/getty 38400 tty5
root      2665     1  0 Jul24 tty6     00:00:00 /sbin/getty 38400 tty6

And then after:

# ps -ef | grep getty
root      2660     1  0 Jul24 tty1     00:00:00 /sbin/getty 38400 tty1
root      2661     1  0 Jul24 tty2     00:00:00 /sbin/getty 38400 tty2
root      2662     1  0 Jul24 tty3     00:00:00 /sbin/getty 38400 tty3
root      2663     1  0 Jul24 tty4     00:00:00 /sbin/getty 38400 tty4
root      2664     1  0 Jul24 tty5     00:00:00 /sbin/getty 38400 tty5
root      2665     1  0 Jul24 tty6     00:00:00 /sbin/getty 38400 tty6
root     31705     1  0 11:33 ttyS0    00:00:00 /sbin/getty -L ttyS0 9600
vt102

And there's the getty on ttyS0 as expected.

That's all fine and good, but when I try to do this on my desktop PC
running Jessie, it doesn't work.  My PC is running an X server, Gnome,
etc., whereas the servers are not.  Also, on Wheezy, /sbin/getty and
/sbin/agetty seem to be two copies of the same file, wheras on Jessie,
/sbin/getty is a symlink to /sbin/agetty.

The PC is using the default /etc/inittab file.  When I check the list of
getty processes after a clean reboot, there's only this:

# ps -ef | grep getty
root      2092     1  0 11:50 tty1     00:00:00 /sbin/agetty --noclear tty1
linux

If I access the virtual consoles via CTRL-ALT-F1, etc., they show up in the
process list only after they have been accessed:

# ps -ef | grep getty
root      2092     1  0 11:50 tty1     00:00:00 /sbin/agetty --noclear tty1
linux
root      2998     1  0 11:56 tty2     00:00:00 /sbin/agetty --noclear tty2
linux
root      3001     1  0 11:56 tty3     00:00:00 /sbin/agetty --noclear tty3
linux

And still not in the same way that they appear on Wheezy ("/sbin/getty
38400 tty1", etc.).  If I add the line for the serial console to
/etc/inittab and reload the init deamon, or even reboot the PC, it simply
does nothing.  No getty process shows up on ttyS0, and no serial console is
available.

I know the serial port itself works, because I can connect to it from my
laptop, then do "screen /dev/ttyS0 9600" on the PC and see characters in
the screen session as I type them on the laptop.  So the serial port works,
and I/O seems to work, but I can't seem to start a persistent getty process
on that port and access the console through it.

Any ideas or suggestions are very much appreciated.

    Thanks!
    Dave

-- 
Dave Parker
Systems Administrator
Utica College
Integrated Information Technology Services
(315) 792-3229
Registered Linux User #408177

Reply via email to