|
Using Serial Consoles - (Solaris / Linux)
by Jeff Hunter, Sr. Database Administrator
Overview
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.
Connecting Using minicom
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:
Connecting Using UUCP
Here is an example:
To exit, just type "~.".
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):
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):
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.
To obtain a serial console connection to a Sun E450 you will need the
following:
To obtain a serial connection from a Sun E450 to another server (possibly
another Sun SPARC machine) you will need the following:
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):
To obtain a serial console connection to a Sun E250 you will need the
following:
To obtain a serial connection from a Sun E250 to another server (possibly
another Sun SPARC machine) you will need the following:
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):
To obtain a serial console connection to a Sun V100 you will need the
following:
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).
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.
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.
To obtain a serial connection from a Sun V100 to another server (possibly
another Sun SPARC machine) you will need the following:
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).
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):
Connect to a Sun Serial Console from 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=dialers:
UNIX-2400:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#2400:tc=dialers:
UNIX-9600:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#9600:tc=dialers:
UNIX-19200:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#19200:tc=dialers:
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
Linux provides two methods (programs) that can be used to connect to a serial console
of a Sun server.
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.
+-----------------------------------------------------------------------+
| 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.
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.
# 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.
Sun Blade 100/150
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.
# tip hardwire
Sun E450
Bits per second:
9600
Data bits:
8
Parity:
None
Stop bits:
1
Flow Control:
Hardware
# tip hardwire
Sun E250
Bits per second:
9600
Data bits:
8
Parity:
None
Stop bits:
1
Flow Control:
Hardware
# tip hardwire
Sun V100
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)
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)
Bits per second:
9600
Data bits:
8
Parity:
None
Stop bits:
1
Flow Control:
Hardware
Last modified on: Tuesday, 26-Jul-2005 13:31:40 EDT
Page Count: 143349