Linux serial console

Written by James McDonald

June 26, 2008

I had to test a console cable to see if it was indeed a console cable. The piece of equipment I was connecting to was outputting a garbled console leading me to wondering if I had a bad cable or a bad piece of equipment.

Using the serial-console howto at http://www.vanemery.com/Linux/Serial/serial-console.html

I simply added the following to /etc/inittab:

# run agetty on COM1
# un comment this and run init q to get a linux serial terminal
s0:2345:respawn:/sbin/agetty -L -f /etc/issue 9600 ttyS0 vt100

and then ran:
init q

Which launched the agetty process to listen to COM1 for serial connections.

Then from a Windows box using hyperterm I connected.

The good news is my cable is OK and I get a Linux prompt. Another piece of good news is I was setting hyperterm to the wrong speed which upon setting it to 19200bps 8N1 fixed the garbled console. The bad news is when I finally got the text of the console up my 2500$ piece of kit had a corrupt file system so needed replacing anyway.

If you then comment the init line back out and run init q again it removes your agetty process ready for next time.

cat /etc/redhat-release
Fedora Core release 1 (Yarrow)

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

Docker on Fedora 32

Docker on Fedora 32

Commands to run to get moby-engine running on Fedora 32 # as root or sudo'd dnf install grubby grubby...

PDF Poster

PDF Poster

Start with a wide long image. This is just a screen shot of my desktop. widescreen.png Convert it to postscript using...