Posted by chantra on May 3rd, 2008
In the 2 previous articles, I explained how to set up a serial console on Ubuntu and Debian.
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 Debian and 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.
$ sudo minicom
And you should be connected!