The serial console is helpful in troubleshooting difficult problems. This is useful if you are remotely administrate the Linux server even if the network has failed or crashed. In order to use serial console you need to configure GRUB boot loader and make changes to /etc/inittab file. Following instructions are tested on :
|Estimated completion time||N/A|
 Cent OS version 4/5
 Redhat Enterprise Linux (RHEL) version 3/4/5
 Debian version 3/4/5/6
Step # 1: Serial redirection in the GRUB
Open the grub configuration file /boot/grub/menu.lst (Debian / Ubuntu Linux) or /boot/grub/grub.conf (Redhat/CentOS/Fedora Core Linux), enter:
# vi /boot/grub/grub.conf
Append the following lines below "hiddenmenu" option:
serial --unit=1 --speed=19200 terminal --timeout=8 console serial
- The first line tells GRUB to use the first serial port at a baud rate of 19200
- The second line gives the user 9 seconds to decide where GRUB should output it's information.
- Please adjust port number and speed as per your setup.
Next make sure splashimage options is disabled as graphics can't be displayed across the serial port. Remove splashimage line or just comment it out by prefixing # symbol:
Step # 2: Enabling serial output from the Linux kernel
Find the kernel line (grub config file) which corresponds to your currently running kernel. Add the following at the end of that line - console=tty0 console=ttyS0,9600n8:
title Red Hat Enterprise Linux ES (2.6.9-42.0.10.ELsmp) root (hd0,0) kernel /vmlinuz-2.6.9-42.0.10.ELsmp ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 initrd /initrd-2.6.9-42.0.10.ELsmp.img
Save and close the file. When multiple console= options are listed, the Linux kernel will output (tty0, ttyS1) to both when possible. Now the kernel errors get logged with on both the normal VGA console and on the serial console.
Step #3: Logging in via the serial console
Finally open the /etc/inittab file, enter:
# vi /etc/inittab
Append the following line:
1:23:respawn:/sbin/agetty -h -L ttyS1 19200 vt100
Save and close the file. The above line allows you to login via the serial device. You are attaching agetty process to serial consol. Your Linux distribution may have the above line.
Step # 4: Test your setup
Next, reboot the server. Make sure you connect to the serial console using IPMI Java client or IPMIView Linux client. Finally, you should see the following message on screen:
Press any key to continue.
Now hit any key to launch GRUB on the serial console. Please note that if you do nothing, it will open server's VGA console.
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop