Enable serialConsole on boot

De Wiki Clusterlab.com.br
Revisão de 14h06min de 18 de agosto de 2017 por Damato (discussão | contribs)
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)
Ir para navegação Ir para pesquisar

RedHat 5.11 - Kerel 2.6xxx


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

1) Configure grub (Note: This assumes COM1(or ttyS0) will be used)
Added 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

2) Turn on a getty 
Added to /etc/inittab
	# Used for remote console
	ko:2345:respawn:/sbin/agetty -h ttyS0 9600 xterm

Change initdefault to 3
	id:3:initdefault:

3) Allow root to login from serial console
Added to /etc/securetty
	ttyS0

4) Remove saved console settings
	rm /etc/ioctl.save

5) 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

6) Changed the variables in /etc/sysconfig/init to:
	BOOTUP=serial
	PROMPT=no

7) Change variable in /etc/sysconfig/kudzu to
	SAFE=yes

Reboot.... 

When kudzu asks:
	"Keep" the mouse configuration
	"Configure" the serial console port