Thursday, September 2, 2010

How To Set Up a Serial Console Client Connection to Ubuntu using Minicom

In the previous article, I explained how to set up a serial console on Ubuntu.
This tutorial will now show how to connect to those serial console using another machine using a software called minicom.
minicom is a serial communication program that we will use in order to connect to a serial console. After a few configuration steps, we will be able to access the console as if we were connected through SSH or directly in front of a virtual console.


1. First Thing First...

We need to make sure that the two machine are connected using a so called null modem cable. Other standard serial cable will just not work !!!


2. Installing Minicom

minicom is already packaged for Ubuntu, so you simply need to fire:

# apt-get install minicom

3. Setting Up Minicom



In this tutorial, the serial port used to connect to the serial console is ttyS0 . You can find out the different serial port detected by your kernel with:

$ dmesg | grep ttyS

[ 12.282348] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 12.282928] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A


Now, let's start minicom as root:

$ sudo minicom

Now press Ctrl-A O, navigate to Serial port setup and hit Enter, type A and make sure the device is set to /dev/ttyS0, then hit Enter to validate.
Type E and make sure the value is 115200, press Enter to validate. Type Enter again to go back to the previous screen and finally navigate to Save setup as dfl, Enter to validate, Esc to go back to the first screen and Ctrl-A Q to quit.

Now, re-run:



$ sudo minicom


This time you will connect to the serial console on the Ubuntu server  set up on the previous post !!!

No comments:

Post a Comment