How to redirect a Linux terminal to a serial port
January 18th, 2007The following allows you to configure out of band management for Linux over a traditional serial port.
- Edit the /etc/grub.conf configuration file and comment out the following configuration
|
#splashimage=(hd0,0)/grub/splash.xpm.gz #hiddenmenu |
- 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
- 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
- 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.
- To allow root to login add ttyS0 to the /etc/securetty configuration file
- 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
- Much of the information in this document was taken from the following article
