A friend of mine was getting rid of a really old laptop (ten year old Celeron 333 with no working hard drive or ethernet port), so I picked it up, figuring it would work as a dedicated console for my CentOS server.  Here are the steps I took to hook it up through a serial interface to my CentOS server.

First, you need to setup the serial console on the CentOS box (basically the same as RHEL or RedHat). There’s a nice tutorial online, the gist of which is:

1. Check serial ports:

[root@navi root]# dmesg | grep tty
ttyS0 at 0×03f8 (irq = 4) is a 16550A
ttyS1 at 0×02f8 (irq = 3) is a 16550A

[root@navi root]# setserial -g /dev/ttyS[01]
/dev/ttyS0, UART: 16550A, Port: 0×03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0×02f8, IRQ: 3

2. Configure agetty in /etc/inittab:

# 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

3. Create the /etc/issueserial file to be used by agetty (more info):

Welcome to \n.\o
Connected on \l at \b bps

4. Reload inittab with the following command:

[root@navi root]# init q

5. Check to make sure agetty is running. You should see two agetty processes running, one on ttyS0 and one on ttyS1, with the command:

[root@navi root]# ps -ef | grep agetty

6. Finally, if you want to allow root to login through the serial console, you need to modify /etc/securetty to include the serial devices after the “console” line:


That takes care of setting up the CentOS server to allow serial console logins. Now we need to setup the laptop.

The laptop was given to me by a friend, so I can’t really complain about its specs:

  • 333 MHz Celeron
  • 18-bit color 800×600 screen (important to note later on)
  • NM2160, 2 MB video card
  • 96 MB RAM
  • No hard drive (it used to have a 4GB HDD, but that died, and I have no replacement)

Given these specs, I decided to use DSL (Damn Small Linux), since it can run off a CD and is very lightweight. Because the native screen specs are a bit unconventional, you can’t just simply boot up DSL, otherwise you’ll get a faded green screen with blurry, illegible text. Instead, at the boot screen you need to set the correct video mode with:

> dsl 2 vga=788

Once you’re at the shell prompt, run microcom to connect to the server (more info):

root@tty1[/]# microcom -D/dev/ttyS0

If all is well, you should get a login prompt for your server. We’re now able to use a ten year old laptop with no hard drive or ethernet port to manage a CentOS server.