Setup a serial Console

From Bitbull Wiki
Jump to navigation Jump to search

To setup a serial console, do the following: (Note: a more explicit explanation can be found at http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Remote-Serial-Console-HOWTO.html

  • Configure grub (Note: This assumes COM1(or ttyS0) will be used)

Add to /etc/grub.conf:

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

Comment out:

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

Append to kernel definition that should use serial console:

console=tty0 console=ttyS0,9600n8

Example configuration:

default=0
timeout=10
serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
terminal --timeout=10 serial console
#splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
        root (hd0,0)
        kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ console=tty0 console=ttyS0,9600n8
        initrd /initrd-2.4.18-14.img
title Red Hat Linux (2.4.18-14) Single User
        root (hd0,0)
        kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ console=tty0 console=ttyS0,9600n8 s
        initrd /initrd-2.4.18-14.img
  • Turn on a getty

Add to /etc/inittab

# Used for remote console
ko:2345:respawn:/sbin/agetty -h ttyS0 9600 xterm

Change initdefault to 3

id:3:initdefault:
  • Allow root to login from serial console

Add to /etc/securetty

ttyS0
  • Remove saved console settings
rm /etc/ioctl.save
  • Alter target of /dev/systty

Change stty entry in /etc/makedev.d/linux-2.4.x to l systty ttyS0

Recreate systty device

cd dev
rm systty
./MAKEDEV systty
  • Changed the variables in /etc/sysconfig/init to:
BOOTUP=serial
PROMPT=no
  • Change variable in /etc/sysconfig/kudzu to
SAFE=yes

Reboot....

When kudzu asks:

"Keep" the mouse configuration
"Configure" the serial console port