You are on page 1of 10

Using Serial Consoles - (Solaris / Linux)

by Jeff Hunter, Sr. Database Administrator

Overview

The following article documents some of the tips for connecting the serial
port of a UNIX Server (Sun SPARC / Linux) to the serial port (console) of
a Sun Server. This is often helpful and even necessary when performing
routine administrative tasks or initiating critical and/or long running
processes. Access to the serial console for many Sun servers is the only
way to perform administrative tasks given these servers do not come with
a frame buffer (i.e. video card).

There are times when I need to initiate a long running job but cannot
remain connected to the network for the duration of its execution. In cases
like this, I can connect to the serial console of the Sun server, initiate the
job and disconnect. The job will remain running even when I drop my
connection to the serial port. I can, at a later time, reconnect to the serial
console to determine the results.

The first two sections of this article explain the applications (programs)
used from a Sun SPARC server and then a Linux server for obtaining a
serial console connection. The remainder of this article attempts to
describe the details (cables, connections, adapters) of obtaining a serial
console connection to/from different Sun SPARC servers.

Connect From Sun SPARC Serial Port

From a Sun machine, if you wanted to access the serial console of another
computer (ie. Linux, Sun, etc.), you would use the tip command. The
configuration file for tip is /etc/remote. In most cases, you will be
concerned with the hardwire entry in this file. First, connect the two
machines by their serial ports (null modem if required), and from the Sun
SPARC (Solaris) machine, type the following at the command-line to
connect to the serial console of the other machine (Solaris / Linux):

# tip hardwire

Below is an example /etc/remote file from the Sun SPARC (Solaris)


machine that contains the hardwire entry to go through serial port B
(/dev/term/b). If you wanted to change this entry to go out through serial
port A instead, change "/dev/term/b" to "/dev/term/a".

cuab:dv=/dev/cua/b:br#2400
dialup1|Dial-up system:\
:pn=2015551212:tc=UNIX-2400:
hardwire:\
:dv=/dev/term/b:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
tip300:tc=UNIX-300:
tip1200:tc=UNIX-1200:
tip0|tip2400:tc=UNIX-2400:
tip9600:tc=UNIX-9600:
tip19200:tc=UNIX-19200:
UNIX-300:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#300:tc=dialers:
UNIX-1200:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#1200:tc=dialer
s:
UNIX-2400:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#2400:tc=dialer
s:
UNIX-9600:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#9600:tc=dialer
s:
UNIX-19200:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#19200:tc=diale
rs:
VMS-300|TOPS20-300:\
:el=^Z^U^C^S^Q^O:du:at=hayes:ie=$@:oe=^Z:br#300:tc=dialers:
VMS-1200|TOPS20-1200:\
:el=^Z^U^C^S^Q^O:du:at=hayes:ie=$@:oe=^Z:br#1200:tc=dialers:
dialers:\
:dv=/dev/cua/b:
--------------------------------------------------------------------
The attributes are:

dv device to use for the tty


el EOL marks (default is NULL)
du make a call flag (dial up)
pn phone numbers (@ =>'s search phones file; possibly taken from
PHONES environment variable)
at ACU type
ie input EOF marks (default is NULL)
oe output EOF string (default is NULL)
cu call unit (default is dv)
br baud rate (defaults to 300)
fs frame size (default is BUFSIZ) -- used in buffering writes
on receive operations
tc to continue a capability
Connect to a Sun Serial Console from Linux

Linux provides two methods (programs) that can be used to connect to a


serial console of a Sun server.

Connecting Using minicom

The first application I'll talk about is "minicom". Most


Linux distributions (i.e. Red Hat) already include minicom.
If your particular distribution does not include minicom,
you can download it from the following URL:
http://www.pp.clinet.fi/~walker/mcdevel.html.

Once you have Minicom installed, start it up with the


command "minicom". Press "Ctrl-A Z" to get to the main
menu. Press "o" to configure minicom. Go to "Serial port
setup" and make sure that you are set to the correct "Serial
Device" and that the speed on line E matches the speed of
the serial console you are connecting to. (In most cases
with Sun, this is 9600.) Here are the settings I made when
using my Serial A / COM1 port on my Linux box:

+----------------------------------------------
-------------------------+
| A - Serial Device : /dev/ttyS0
|
| B - Lockfile Location : /var/lock
|
| C - Callin Program :
|
| D - Callout Program :
|
| E - Bps/Par/Bits : 9600 8N1
|
| F - Hardware Flow Control : Yes
|
| G - Software Flow Control : No
|
|
|
| Change which setting?
|
+----------------------------------------------
-------------------------+

After making all necessary changes, hit the ESC key to go


back to the "configurations" menu. Now go to "Modem and
dialing". Change the "Init string" to "~^M~". Save the
settings (as dflt), and then restart Minicom. You should now
see a login prompt.

Connecting Using UUCP

Another common application to use in Linux for


connecting to a serial console is UUCP. Most Linux
distributions include the UUCP application. Start UUCP
with the command "cu -l [device] -s [speed]", where
[device] is the serial port you are using, such as ttyS0
(COM1) or ttyS1 (COM2), and [speed] is the speed of the
serial console that you are connecting to.
Here is an example:

# cu -l /dev/ttyS0 -s 9600

You may need to hit enter before you see the login prompt.
If you see a bunch of weird characters, then you probably
specified the wrong speed.

To exit, just type "~.".

Sun Blade 100/150

• Connecting to a Blade 100/150

To obtain a serial console connection to a Sun Blade 100/150 you


will need the following (These procedures will work to an Ultra
5/10 as well):

o Connect the serial port of your local PC/workstation to the


DB9 Serial port on the back of the Sun Blade (or Ultra
5/10) using a serial cable (straight through).
o You will need to use a null modem adapter.
o Communication settings:

Bits per second: 9600


Data bits: 8
Parity: None
Stop bits: 1
Flow Control: Hardware
NOTE: You will not be able to make use of the serial console if the Sun server was booted
with the keyboard/mouse plugged in. In order to make use of the serial console, you will
need to disconnect the keyboard/mouse and reboot the Sun server. On the Sun Blade
100/150, if the keyboard/mouse are plugged in during the boot phase, all console output
will be redirected to the VGA console.

• Connecting from a Blade 100/150

To obtain a serial connection from a Sun Blade 100/150 to another


server (possibly another Sun SPARC machine) you will need the
following (These procedures will work from an Ultra 5/10 as well):

o On the back of a Sun Blade 100/150 (or Ultra 5/10) there is


only one serial port that is dedicated to serial A
(/dev/ttya). This serial port is typically being used by the
console and will often require you to use Serial B
(/dev/ttyb). This is where it gets fun. There is a second
serial port connector located on the motherboard (actually
the PCI riser card) labeled J13. The PCI riser card is a
PWA-GROVER-PLUS_RISERCARD 411707500011 and
requires a special cable. The special cable connects to the
PCI riser card (J13) on one end while the other end is a
DB9 male port that will use one of your available PCI dust
cover slots. This is the only way I have found to make a
connection from a Sun Blade (or Ultra 5/10); using serial
port B out which requires this special cable to be installed
in order to have access to serial port B.

Click here or here to see an exploded view of an Ultra 10


Workstation - System Breakdown. The special cable I am
refering to is Sun Manufacturing Part# 370-3165 - Serial B
and Parallel Cable Assembly - (Code 3a) in the Ultra 10
Workstation System Breakdown. I needed to order the
Ultra 10 Cable Service Kit/FRU (370-3267) in order to
obtain this cable. You can order this kit from Ajava,
Partsolver, Trident Computer Resources, Inc., Asset
Conversion Specialists, Inc., or Sun Microsystems.

o After installing the the Serial B and Parallel Cable


Assembly in your Sun Blade, you will have access to serial
port B (/dev/ttyb). Connect the new DB9 serial port
(serial B) from the Sun Blade to the back of the server
(Sun, Linux) you want to make a serial console connection
to. In most cases, this will be using a straight through serial
cable.
o For most connections to a Sun SPARC, you will need to
use a null modem adapter.
o From the Sun Blade (or Ultra 5/10) use the tip program to
initiate the serial console connection to the other server.
Ensure that you edit the /etc/remote file from the Sun
Blade you are connecting from and change the hardwire
entry to use serial B - /dev/term/b.

# tip hardwire
Sun E450

• Connecting to a Sun E450

To obtain a serial console connection to a Sun E450 you will need


the following:
o Connect the serial port of your local PC/workstation to the
DB25 Serial A/B port on the back of the Sun E450 using a
serial cable (straight through). There is only one serial port
on the back of an E450 that contains both Serial A and
Serial B. When you plug directly into the serial port on the
back of the E450, you are accessing Serial A.
o You will need to use a null modem adapter.
o Communication settings:
Bits per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: Hardware
• Connecting from a Sun E450

To obtain a serial connection from a Sun E450 to another server


(possibly another Sun SPARC machine) you will need the
following:

o On the back of a Sun E450, there is only one DB25


(female) serial port (labeled Serial A/B) that is used to
contain wiring for both Serial A and Serial B. The system
provides two serial communications ports through a single,
shared DB25 connector located on the rear panel. If you are
to plug a serial cable directly into the DB25 serial port on
the back of an E450, you will only be accessing the primary
port (Serial A). This will not work to get a serial connection
out from since it is reserved for the console of the machine.
You will need to obtain access to Serial B (which is
contained within the shared Serial A/B port) by using a
special Y-Cable (serial splitter). In order to access the
secondary port (Serial B), a serial port splitter cable (Sun
Part#: X985A or 530-1869) must be attached to the rear
panel serial port A/B connector. The serial splitter connects
to the Serial A/B - DB25 (female) connection on the back
of the E450 to give you two DB25 (female) connections -
one for Serial A and the other for Serial B. Here are several
places where I found the serial splitter:
 Sun Store - (Spare Parts)
 Ultra Spec Cables
 Computer Giants
 anything & everything 4 SUN Microsystems
Computers
 Sun E450 Serial Port and Cable Pinouts (From
Stokely Consulting)
You will need to use Serial Port B to make a connection
from the E450 to another server. Connect the Sun E450
from its Serial B to the back of the other server (Sun,
Linux) you want to make a serial console connection to. In
most cases, this will be using a straight through serial
cable.

If you are connecting from the Sun E450 to another


machine (i.e. Sun Blade, Sun Ultra, etc) that has a normal
DB9 male port, you can use a Belkin F2L088-06 DB9
Female/DB25 Male Modem Cable (often with a null
modem adapter):

 Belkin Pro Series AT Serial Modem Cable 6ft


 Belkin PRO Series - Serial cable - DB-9 (F) - DB-
25 (M) - 6 ft
 Belkin F2L088-06 DB9 Female/DB25 Male
Modem Cable
 Belkin Pro Series AT Serial DB9F to DB25M 6'
Modem cable
o For most connections to a Sun SPARC, you will need to
use a null modem adapter.
o From the E450 use the tip program to initiate the serial
console connection to the other server. Ensure that you edit
the /etc/remote file from the machine you are connecting
from (the E450) and change the hardwire entry to use
serial B - /dev/term/b.

# tip hardwire
Sun E250

• Connecting to a Sun E250

To obtain a serial console connection to a Sun E250 you will need


the following:

o Connect the serial port of your local PC/workstation to the


DB25 Serial A port on the back of the Sun E250 using a
serial cable (straight through). There are two DB25 serial
ports on the back of an E250. Make sure you connect to
Serial A.
o You will need to use a null modem adapter.
o Communication settings:
Bits per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: Hardware
• Connecting from a Sun E250

To obtain a serial connection from a Sun E250 to another server


(possibly another Sun SPARC machine) you will need the
following:

o On the back of a Sun E250, there are two DB25 (female)


Serial Ports for Serial A and Serial B. Serial A is used for
other machines to obtain a serial console connection into
the E250. You will need to use Serial Port B to make a
connection from the E250 to another server. Connect the
Sun E250 from its second serial port (serial B) to the back
of the server (Sun, Linux) you want to make a serial
console connection to. In most cases, this will be using a
straight through serial cable.

If you are connecting from the Sun E250 to another


machine (i.e. Sun Blade, Sun Ultra, etc) that has a normal
DB9 male port, you can use a Belkin F2L088-06 DB9
Female/DB25 Male Modem Cable (often with a null
modem adapter):

 Belkin Pro Series AT Serial Modem Cable 6ft


 Belkin PRO Series - Serial cable - DB-9 (F) - DB-
25 (M) - 6 ft
 Belkin F2L088-06 DB9 Female/DB25 Male
Modem Cable
 Belkin Pro Series AT Serial DB9F to DB25M 6'
Modem cable
o For most connections to a Sun SPARC, you will need to
use a null modem adapter.
o From the E250 use the tip program to initiate the serial
console connection to the other server. Ensure that you edit
the /etc/remote file from the machine you are connecting
from (the E250) and change the hardwire entry to use
serial B - /dev/term/b.

# tip hardwire
Sun V100

• Connecting to a Sun V100

To obtain a serial console connection to a Sun V100 you will need


the following:
o Connect the serial port of your local PC/workstation to the
serial port (serial port B) on the back of the Sun V100. The
Sun V100 has two serial ports on the back of it. To make a
serial connection to the Sun V100, you will be connecting
to Serial A (LOM A). This is the "Lights Out Management"
port used for issuing LOM commands.

Depending on the type of device you use to connect to the


Sun V100 server, you may need to use either a DB25 or
DB9 serial adapter (both included with the Sun V100).

o Connecting Sun SPARC to Sun V100

To connect to a Solaris tip session or to a VT100 terminal,


you need to use either the DB25 (25-Pin DSUB Male to 8-
POS RJ-45 Female) adapter that is supplied by Sun (Sun
Part# 530-2889) with the V100, or an alternative adapter
that performs the same pin crossovers. The Sun-supplied
DB25 adapter (530-2889) enables you to connect to any
Sun system.

Insert one end of the standard RJ-45 patch cable supplied


with the Sun Fire V100 server into Serial A (LOM). Insert
the other end of the RJ-45 patch cable into the supplied
DB25 adapter. Finally, attach the adapter to the appropriate
port in your serial device.

Pin Crossovers in the Sun DB-25 (25-Pin) Adapter


Serial Port (RJ-45 Connector) Pin 25-Pin Connecter
Pin 1 (RTS) Pin 5 (CTS)
Pin 2 (DTR) Pin 6 (DSR)
Pin 3 (TXD) Pin 3 (RXD)
Pin 4 (Signal Ground) Pin 7 (Signal Ground)
Pin 5 (Signal Ground) Pin 7 (Signal Ground)
Pin 6 (RXD) Pin 2 (TXD)
Pin 7 (DSR) Pin 20 (DTR)
Pin 8 (CTS) Pin 4 (RTS)

o Connecting PC, Laptop or handheld computer to Sun


V100

Some devices, such as a PC, laptop or handheld computer,


require you to use either a male or female DB-9 adapter.
The Sun DB9 adaptor (Sun Part: 530-3100-xx) is a 9-Pin
DSUB female to 8-POS RJ-45 female adapter included
with the Sun V100. The following table is the pin
crossovers:

Insert one end of the standard RJ-45 patch cable supplied


with the Sun Fire V100 server into Serial A (LOM). Insert
the other end of the RJ-45 patch cable into the supplied
DB9 adapter. Finally, attach the adapter to the appropriate
port in your serial device.

Pin Crossovers in the DB-9 (9-Pin) Adapter


Serial Port (RJ-45 Connector) Pin 9-Pin Connector
Pin 1 (RTS) Pin 8 (CTS)
Pin 2 (DTR) Pin 6 (DSR)
Pin 3 (TXD) Pin 2 (RXD)
Pin 4 (Signal Ground) Pin 5 (Signal Ground)
Pin 5 (Signal Ground) Pin 5 (Signal Ground)
Pin 6 (RXD) Pin 3 (TXD)
Pin 7 (DSR) Pin 4 (DTR)
Pin 8 (CTS) Pin 7 (RTS)

o You will NOT need to use a null modem adapter for either
the DB25 or DB9 connections.
o Communication settings for both DB25 and DB9
connections:
Bits per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: Hardware
• Connecting from a Sun V100

To obtain a serial connection from a Sun V100 to another server


(possibly another Sun SPARC machine) you will need the
following:

o ...
o ...
o ...

You might also like