How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal



How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
 (380) Click. Work. Collect
How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
Post Description:
Post Tags: how, to, configure, linux, console, terminal, serial, ports, unix, hyper, terminal
This Post Has Been Viewed 8835 Times Since Tue Nov 21, 2006 10:29 am Posted By unix with 5 replies
How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal
As you may or may not know, UNIX is a command line operating system. Most administrators (like me) have to use the shell on Linux/UNIX systems because they don't have a nice and pretty GUI (Graphical User Interface) A gui is something like windown. A command line doesn't have all the images, instead it only has a prompt, letters and numbers..

How to Configure Linux Console:
Follow these steps to configure the linux machine,box, server,computer or whatever you call it.

Step 1. MAKE BACKUP - You will need to make a backup copy of your inittab, so to do this, send this command.
     Code:
cp /etc/inittab /etc/inittab.org


Step 2. CHECK SERIAL PORTS ARE ENABLED: Send this comands to check you have console ports in your motherboard:


     Code:
dmesg | grep tty

You will see something like this:

     Code:
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A


Now send this command:

     Code:
setserial -g /dev/ttyS[01]


You should see somthing like this:

     Code:
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3


NOTE: Sometimes you will need to enable the serial port in your mother baord by going into the BIOS.

Step 3. EDIT INITTAB FILE - To edit the inittab file, execute this command:
     Code:
nano /etc/inittab
NOTE: For my example i used the nano text editor, you can use whatever text editor you prefer, like VI Editor.

The inittab file should look something like this:

     Code:
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
x:5:once:/etc/X11/prefdm -nodaemon


Search for the line where it says: 6:2345:respawn:/sbin/mingetty tty6 and add these line:


     Code:
# Run agetty on COM1/ttyS0 and COM2/ttyS1
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
s1:2345:respawn:/sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100
#s1:2345:respawn:/sbin/agetty -L -i 38400 ttyS1 vt100


so now your inittab file should look like this:


     Code:
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#

# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"

# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run agetty on COM1/ttyS0 and COM2/ttyS1
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
s1:2345:respawn:/sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100
#s1:2345:respawn:/sbin/agetty -L -i 38400 ttyS1 vt100


# Run xdm in runlevel 5
x:5:once:/etc/X11/prefdm -nodaemon


Step 4. ACTIVATE NEW CHANGES - to active the new changes, send this command:
     Code:
init q


Step 5. CONFIRM agetty IS LISTENING TO PORTS: send this command to confirm:
     Code:
ps -ef | grep agetty


The output should look like this:

     Code:
[root@ns3 ~]# ps -ef | grep agetty
root 3526 1 0 09:27 ttyS1 00:00:00 /sbin/agetty -L -f /etc/issueserial 38400 ttyS1 vt100
root 5337 3762 0 10:23 pts/0 00:00:00 grep agetty


Step 6. HOW TO CONNECT FROM PC TO SERVER CONSOLE: Now comes the good part, connecting to your console ports. Now that they have been enabled, you can connect to them. These are the parts (items) things you are going to need to connect:

1 roll-over cable
2 db-9 connectors
post picture

Step 7 - EMULATOR - for this tutorial guide, i will be using windows Hyper-Terminal. These are the step to take to start they hyper-terminal:

Give your connection a name, you can name it whatever you want:
post picture

Select the COM connection, in my exaple i am using COM1
post picture

Make sure to use these setting: 9600 8-N-1
post picture

Now you should be connected to the Shell
post picture

DONE

credit To Van Emery : http://www.vanemery.com/Linux/Serial/serial-console.html


     Quote:
cnosole, consoel, donsole, vonsole, xonsole, cinsole, clnsole, cpnsole, comsole, cohsole, cobsole, coneole, conaole, condole, conwole, consile, conslle, consple, consope, consome, consoke, termnial, treminal, rerminal, germinal, yerminal, teeminal, tetminal, tegminal, tefminal, terninal, terkinal, terjinal, termonal, termunal, termknal, termimal, termihal, termibal, terminsl, terminzl, terminql, terminap, terminam, terminak, sreial, eerial, aerial, derial, werial, seeial, setial, segial, sefial, seroal, serual, serkal, serisl, serizl, seriql, seriap, seriam, seriak, consol, teminal, linxu lniux, hiper, terminol, configu, configurar, configura, properties, defaults, term server, connections, howto, ports, port, scsi, ANSI, connection

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About How To Configure Linux Console Terminal Serial Ports UNIX Hyper-Terminal




:: 1 :: #618 - Reply By Feeyo On Tue Feb 27, 2007 11:16 am
Really good howto! =)
Although i was searching for how to connect to a terminal with my linux laptop. Anyone knows?

:: 2 :: #4879 - Reply By Iqbal On Wed May 30, 2007 6:52 pm
yeah, we are looking for linux/unix hyperterminal that support ctrl-z command. not this windows capitalist program...
:: 3 :: #23649 - Reply By GABRIEL On Wed Oct 10, 2007 6:04 am
dear sir,
i find your work very useful, but i would like you to recommend a terminal emulator
that can be run on a linux based system,just like windows hyper terminal. i will find it very rewarding to me if you can help me out in tthis area.
thanks
gabriel
:: 4 :: #34942 - Reply By Mahmoud Allathkani On Sat Jan 05, 2008 11:03 pm
good stuff
however why all this headech while you can get an external tool can connect to linux server using ssh or telnet.
unless you have no network connectivity and available console to the linux server then i would say, yes this is good way to get to the server console command line to manage it as this is will become the last resort.
:: 5 :: #50507 - Reply By sanwin On Thu Apr 17, 2008 7:36 am
testaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa