Traditional getty

Remote Serial Console HOWTO
Prev | Chapter 6. Configure getty | Next

# 6.2. Traditional getty

Traditional getty implementations include uugetty and getty_ps.

The traditional getty is listed in `/etc/inittab` with the name of a section in `/etc/gettydefs` to use for its configuration. Our example in Figure 6-3 used the section `CON9600`.

There is no `CON9600` in the standard `gettydefs`. This is deliberate, as serial consoles sometimes require slight tweaking. Copy the `DT9600` entry and use it as your model.

Figure 6-4. Define `CON9600` in `gettydefs`

    # Serial console 9600, 8, N, 1, CTS/RTS flow control
    CON9600# B9600 CS8 -PARENB -ISTRIP CRTSCTS HUPCL # B9600 SANE CS8 -PARENB -ISTRIP CRTSCTS HUPCL #@S @L login: #CON9600

Separate each line with a blank line.

Each configuration line has the syntax:

Figure 6-5. Syntax of entries in `/etc/gettydefs`, in EBNF

`<label>`# `<initial_flags>` # `<final_flags>` #`<login_prompt>`#`<next_label>`

The `<label>` is referred to on the getty command line.

The `<next_label>` is the definition used if a RS-232 Break is sent. As the console is always 9600bps, this points back to the original `label`. See Section 9.9 if you ever intend to have more one line for `CON9600` in `gettydefs`.

`<initial_flags>` are the serial line parameters used by getty. These are modeled on the stty(1) and termios(3) options and the full list varies depending upon your getty variant. The parameters in Figure 6-4 ensure that a line at 9600bps with eight data bits and no parity is configured.

`<final_flags>` are the serial line parameters set by getty before it calls login. You will usually want to set a 9600bps line, `SANE` terminal handling, eight data bits, no parity and to hang up the modem when the login session is finished.

The `<login_prompt>` for serial lines is traditionally the name of the machine, followed by the serial port, followed by `login:` and a space. The macro that inserts the name of the machine and the serial port varies, see the documentation for your getty.

Prev | Home | Next
init system | Up | agetty