Chapter 18. Monitoring Bering through a terminal console

Revision History
Revision 0.22002-04-14JN
initial revision

Table of Contents

Objectives
Step 1: Modify /etc/inittab and /etc/securetty files
Step 2: Modify your syslinux.cfg file
Step 3: reboot...

Objectives

We assume here that you want to monitor Bering through - say - a minicom terminal attached to the first serial port of your router (com1/ttyS0). That is a frequent situation with LEAF routers which, very often, do not have a screen attached to them.

Comments on this section should be addressed to its maintainer: Jacques Nilo .

Step 1: Modify /etc/inittab and /etc/securetty files

Through the LEAF configuration menu type 2) to get access to the "System configuration" menu:


                        System configuration menu

        1) Master LRP settings. (lrp.conf)
        2) POSIXness settings (POSIXness.conf)
        3) File system mounts. (fstab)
        4) Lowest level boot-up configuration (inittab)
        5) System wide profile (profile)
        6) Ports root is allowed to login to. (securetty)
        7) System logging configuration. (syslog.conf)
        8) Service name to number translation (services)
        9) Local timezone TZ setup (tzvalue)

  q) quit
  ----------------------------------------------------------------------------
        Selection:

Enter 4) to edit inittab. Comment out getty's on tty1 and tty2 and uncomment getty on ttyS0 (com1). For access through com2, com3 or com4 replace by ttyS1, ttyS2 and ttyS3 respectively.

Your inittab file will look like:

<snip>
# Format:
#  <id>:<runlevels>:<action>:<process>
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
T1:23:respawn:/sbin/getty -L ttyS0 19200 vt100
<snip>

Enter 6) to edit /etc/securetty to add ttyS0. Your file will look like:

# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
#
# Include ttyp0, ttyp1, etc to allow telnet access. *NOT RECOMMENDED*
ttyS0
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8

Important

Once this is done, backup etc.lrp

Step 2: Modify your syslinux.cfg file

Edit the syslinux.cfg file on your floppy and add the two following statements:

  • serial 0 19200 at the top of your file

  • append console=ttyS0,19200

The syntax of the serial statement is as follows:

SERIAL port [baurate]. This enables a serial port to act as the console. "port" is a number (0 = ttyS0 = com1, etc.). If "baurate" is omitted, the baud rate defaults to 9600 bps. The serial parameters are hardcoded to be 8 bits, no parity, 1 stop bit.

The append statement add one or more options to the kernel command line.

Your syslinux.cfg file will look like:

serial 0 19200
display syslinux.dpy
timeout 0
append console=ttyS0,19200
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 boot=/dev/fd0u1680:msdos PKGPATH=/dev/fd0u1680 LRP=root,etc,local,modules,iptables,pump,keyboard,shorwall,ulogd,dnscache,weblet

Step 3: reboot...

Connect a cable to the serial port of your router and open a terminal on your monitoring machine. You should be then able to control your Bering router from that console.

One application you can use to connect to your router's serial port is minicom, but you'll need to change the default settings since you won't be talking to a modem. As root, launch 'minicom -s'. Change the speed (in serial port setup) to 19200. Then change the modem init string (in modem and dialing) to "~^M~". Save the settings as something other than df1 (I use "leaf"), quit, and relaunch (not as root) using 'minicom leaf'.