RND GROUP LIMITED HomeCapabilitiesAbout usContact us

How to redirect a Linux terminal to a serial port

January 18th, 2007

The following allows you to configure out of band management for Linux over a traditional serial port.

  1. Edit the /etc/grub.conf configuration file and comment out the following configuration

#splashimage=(hd0,0)/grub/splash.xpm.gz

#hiddenmenu

  1. Add the following configuration lines below the hidden menu line

serial –unit=0 –speed=9600 –word=8 –parity=no –stop=1

terminal –timeout=10 serial console

Note if you wish to increase the speed of the serial port you can modify 9600 to a higher speed; ensure that your serial port or device supports these speeds

  1. Add the following to the end of very kernel line in the configuration file

console=tty0 console=ttyS0,9600n8

Note if you wish to increase the speed of the serial port you can modify 9600 to a higher speed; ensure that your serial port or device supports these speeds

  1. If you wish to have post grub redirected to the serial port add the following

S0:12345:respawn:/sbin/agetty ttyS0 9600 linux

Note if you wish to increase the speed of the serial port you can modify 9600 to a higher speed; ensure that your serial port or device supports these speeds. If you have additional serial ports and wish to add those you can copy the line and increment the S0 prefix.

  1. To allow root to login add ttyS0 to the /etc/securetty configuration file
  2. To disable kudzu (if you have this enabled in the respective runlevel) from detecting the new serial port you can change BOOTUP=color to BOOTUP=serial in the /etc/sysconfig/init configuration file

Notes