agetty problems...

Thomas Mondoshawan Tate plug-discuss@lists.PLUG.phoenix.az.us
Sun, 30 Sep 2001 06:57:06 -0700


--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Sep 30, 2001 at 12:42:43AM -0700, Nathan England wrote:
> I keep noticing my server making hard drive noises every few seconds,
> when there should not be any activity..
> I look at /var/log/messages and I get this

<snip>

> Sep 30 00:43:36 carthage /sbin/agetty[21435]: /dev/tty6: cannot open as
> standard input: No such device
>=20
> I wasn't aware that agetty needed a 'device' for input..?  is it looking
> for a mouse or something?

To generate that "carthage login:" prompt on each of the virtual consoles,
the agetty program has to open the tty associated with each. These happen to
be the /dev/tty?? devices.

You can test this by executing a "cat < /dev/tty9 > /dev/tty9" as root,
switching to console 9 (Alt-F9), and typing out some characters. You'll
notice that you can see the characters you're typing. Then go back to the VC
you executed the aforementioned command at and kill it with a Ctrl-C. Go
back to VC 9 again and try typing -- it won't work.

> I've never had this problem before. I just rebuilt the kernel, so I'm
> assuming it's something in it that I've screwed up, but I can't for the
> life of me figure out what it is.  Or what I've done differently from
> any other kernel for my other systems..  Except this server has no
> keyboard or mouse attached to it.
>=20
> any ideas? =20

Yep. Sounds to me like you disabled the virtual consoles on the machine, but
forgot to update your inittab to reflect it as such. I would suggest
removing all lines referencing the /sbin/agetty program and adding these tw=
o:

1:2345:respawn:/sbin/agetty ttyS0 9600
2:2345:respawn:/sbin/agetty ttyS1 9600

This will stop _all_ login prompts from appearing on the monitor, and you
will be unable to login via a keyboard attached to the machine. You will,
however (if you have the serial ports enabled in the kernel), be able to
attach a null-modem cable to one of the serial ports and login at 9600 bps.

The question is: why do you want to do this? Setting up a system with this
configuration is just screaming for trouble. You no longer have direct
control of the system unless you have an easy to setup laptop or desktop
with good serial ports and a null modem cable, or network cards go out, or
if the system hangs you can't use the "Magic SysRq" key combinations to syn=
c,
umount, and reboot safely. (aagh... please excuse my engrish -- it's early
in the morning.)

Usually the only place this kind of configuration is used is in embedded
systems and servers where security is of the utmost importance (but then,
usually those kinds of servers are locked in a vault to prevent physical
access, too). Unless this server is in this kind of situation, I would
suggest turning on the virtual consoles in the kernel again and leaving at
least one agetty login prompt available. This way, if the afore mentioned
problems _do_ occur, you'll have a _much_ easier time troubleshooting them.
You don't have to leave the keyboard attached 24/7 -- just attach one when
you have a serious problem you can't deal with via telnet or ssh.

Hope that helps!

--=20
Thomas "Mondoshawan" Tate
phoenix@psy.ed.asu.edu
http://tank.dyndns.org

--WIyZ46R2i8wDzkSu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7tySyYp5mUsPGjjwRAt5gAJ9ZE4dS1/EpoxZS+5OOcVrgrp6qUACffKzI
A/p2vK4kc+ZbKjt6hMHie3U=
=p/Gh
-----END PGP SIGNATURE-----

--WIyZ46R2i8wDzkSu--