Linux - Serial Console (Method 1 - Enable serial console on bootup)

Linux - Serial Console (Method 1 - Enable serial console on bootup)
Linux - Serial Console (Method 2 - Enable serial console on bootup)

Find Serial Port
# dmesg | grep tty
ttyS0 at 0x03f8 (irq = 4) is a 16550A

# setserial -g /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4

Configure inittab
# vi /etc/inittab
(add the lines)
# Run agetty on COM1/ttyS0 and COM2/ttyS1
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100

# vi /etc/issueserial
(add the lines)
Hello
Connected on \l at \b bps
\U

# init q

Check the availability of change
# ps -ef | grep agetty

Allow login as root via serial
# vi /etc/securetty
console
ttyS0
ttyS1
vc/1
...

(Optional) Configure serial port as system console
# vi /etc/grub.conf
# grub.conf generated by anaconda
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-24.9)
root (hd0,0)
kernel /vmlinuz-2.4.20-24.9 ro root=LABEL=/ console=ttyS0,9600
initrd /initrd-2.4.20-24.9.img

(Important!)
# chkconfig kudzu off
#sync;sync;reboot

Comments