For When You Can't Have The Real Thing
[ start | index | login ]
start > RedHat > Serial Grub and Serial Console

Serial Grub and Serial Console

Created by dave. Last edited by dave, 12 years and 252 days ago. Viewed 3,675 times. #1
[edit] [rdf]

Getting A Grub Menu Via The Serial Port

Add either of the two lines to /boot/grub/grub.conf in order to make grub's interface available on the serial port. Obviously change the parameters to match your equipment, these values are rather default.

# for serial and console
serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1 terminal --timeout=10 serial console

# just serial
serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1 terminal serial

Serial Console

Just for reference if you want a console on the serial port after grub (for times sshd isn't working).

Disclaimer: I have been using these notes without revision for many years, they have worked from 7.3 to RHEL4-U3 but it is quite possible some steps are no longer necessary or considered the "best" solution.

  1. add
    console=tty0 console=ttyS0,9600n81
    to the end of your kernel line in /boot/grub/grub.conf.
  2. add
    ST:12345:respawn:/sbin/mgetty /dev/ttyS0 -s 9600 -r
    to /etc/inittab
  3. add the following 5 lines to /etc/mgetty+sendfax/mgetty.config
# serial console
    port ttyS0
        direct y
        speed 9600
        toggle-dtr n

You might have to modify /etc/securetty (ie add "ttyS0") to permit root logins.

Depending on circumstances you may want to also enable the magic sysreq key in /etc/sysctl.conf to permit remote reboots (among other things) when the system is too locked up for a regular /sbin/reboot. Read the documentation before doing this, there is a reason it is called "magic."

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt