Setting up a serial console

Setting up a serial console

Post by Damian Ivereig » Fri, 06 Sep 1996 04:00:00



Does anyone have any pointers as to how to setup a serial console on a
PC running Linux. We have many Linux servers in a remote office and want
to be able to connect to a 'console' through the serial port (COM1).

I have tracked down an option for LILO that allows a serial port to type
commands at LILO. However as soon as Linux is started, the output goes
to
the (disconnected) PC video controller. I was expecting to find some
option
that is given to the kernel to make it write its startup info to the
serial
port, however I can't find one in the bootparam man page.

Any ideas?

Damian

_____________________________________________________________________________
* Damian Ivereigh        *                        * Cisco Systems,
Inc.     *
* MIS/ECS Printer Admin  *      ||        ||      * 150 Tasman
Dr.          *
* Unix System Admin      *    .||||.    .||||.    * San Jose, CA
95134     *
* Phone: 408-526-4413    * ..:||||||:..:||||||:..
*                         *
* Fax:   408-526-8220    *   cisco Systems, Inc.  *

* Toll Free 800-800-1180 *                      
*                         *
*          Ext. 4413     *                      
*                         *
*___________________________________________________________________________*

 
 
 

1. ttyS0, serial settings, talking to a UPS, arrrrgh

Google and the various FAQs/HOWTOs all talk about getting the serial
port to be happy with modems, FAX machines, and other assorted devices;
likewise for the mgetty documentation.  Those haven't helped so far.

I'm trying to connect a UPS (specifically, the little Back-UPS "simple
signalling" model) via its serial cable, so that when the building gets
hit by lightning the next time, the Linux servers will shut themselves
down nicely.  (Same as all the Suns do right now, using the same software --
APC is a nice company.)

Anyhow, APC provides a little test program to verify communication with the
UPS, but I'm not even getting that far; its test program tells me that the
serial port is incorrectly configured, and that I have work to do before
trying to communicate with the UPS.  All the examples it can give me are for
other flavors of Unix; for Linux I've heard of mgetty but otherwise don't
know much.  There's nothing in inittab mentioning ttyS0 (yet).  Trying to
run mgetty with various options (I'll get the options right eventually if
I try all the combinations....) gives me this in /var/log/messages:

Jul 24 22:19:53 acorn mgetty[1771]: mgetty: experimental test release 1.1.22-Aug17: Success
Jul 24 22:19:53 acorn mgetty[1771]: can't create pid file /var/run/mgetty.pid.ttyS0: File exists
Jul 24 22:19:53 acorn mgetty[1771]: check for lockfiles: File exists
Jul 24 22:19:53 acorn mgetty[1771]: locking the line: No such file or directory
Jul 24 22:19:54 acorn mgetty[1771]: lowering DTR to reset Modem: No such file or directory
Jul 24 22:19:55 acorn mgetty[1771]: send: : No such file or directory
Jul 24 22:19:55 acorn mgetty[1771]: waiting for ``OK'': No such file or directory

I probably need to get rid of the DTR and OK crap; that's for later.
What's with all the "no such file" stuff?  There is most definitely a
/dev/ttyS0, and /proc/tty/driver/serial lists its settings.  The kernel
is finding it okay... what am I missing here?

The last time I had to mess with serial ports was setting up a null modem
to play Diablo some five years ago.  Before that I plugged a serial mouse
into ttyS0 and it just worked... help?

Phil

2. Help on panic: "closef: starting count < 1" on 4.2bsd (Vax 750)

3. serial console - lilo serial= no serial port input

4. scanners

5. Shape Ups,Men's Shape Ups,Men's Skechers Shape Ups - new styles!

6. Adaptec 2940

7. Setting up Linux with a serial Console

8. Direct connection between two hosts w/crossover cable

9. URGENT!!! Need help on Freebsd serial console setting

10. Serial Console - setting up

11. Can't set serial console line speed higher than default

12. Set console to serial port

13. Serial console in loader.rc - speed settings?