Operating System - Linux
1748031 Members
5150 Online
108757 Solutions
New Discussion юеВ

Re: DL380 G5 Serial Port Configuration

 
unagi24
New Member

DL380 G5 Serial Port Configuration

I have a handful of DL380 G5 servers that have their serial ports wired to out-of-band terminal servers. Can someone point me in the direction of the documentation that indicates what I need to do on the BIOS side and OS side (RH5) in order to get the serial connections up and operational? Please excuse my newness and thanks.
2 REPLIES 2
Alan_152
Honored Contributor

Re: DL380 G5 Serial Port Configuration

What brand of terminal servers? Depending on the manufacturer, you'll need to get the wiring just "so" before you'll get anything out of this...
Matti_Kurkela
Honored Contributor

Re: DL380 G5 Serial Port Configuration

As I recall, the DL380 G5 has only one physical serial port. However, the iLO2 contains a virtual serial port.

In the BIOS, you can enable/disable both the physical and virtual serial port and determine their ordering (which one is COM1/ttyS0 and which one is COM2/ttyS1).

If you have the PSP installed, you can use the "hpasmcli" command to change these BIOS settings at the OS level. The changes will take effect at next reboot. (See "man hpasmcli" and/or the help menus of the hpasmcli command for details.)

When the hardware side is configured, you can use "setserial -g /dev/ttyS*" to verify Linux has detected the serial port(s).

To make the serial port useful for logging in, you must set up a getty process in /etc/inittab for it. There are several getty programs available in RHEL, but /sbin/agetty is probably the simplest for serial port use.

Please be very careful when editing /etc/inittab: if you corrupt any of the existing entries, the system boot-up sequence may be severely impaired.

I'll assume here you've configured the physical serial port as ttyS0, and the virtual port as ttyS1.

Here are the lines to add to the end of /etc/inittab:

S0:S12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
S1:S12345:respawn:/sbin/agetty -L 115200 ttyS1 vt100

Here I've used the standard terminal speed of 9600 bps for the physical port. For the virtual port, there is no actual serial line with its technical limitations, so I'll usually run it as fast as it can go.

After editing /etc/inittab, run "telinit -q" to make the changes take effect.

Now the serial ports should print a login prompt just like on a text-based virtual console.

If you choose to allow direct root logins on the serial port, you must add the name of the serial port to /etc/securetty. If you don't do this, any attempt to log in directly as root will be refused: you must then log in using another user account and then use su or sudo to become root.

If you wish to control the GRUB boot loader using the serial port, you must add some lines near the beginning of /boot/grub/menu.lst file:

#splashimage=(hd0,0)/grub/splash.xpm.gz # splashimage commented out
# enable serial port
serial --unit=0 --speed=9600
terminal --timeout=5 serial console

When GRUB is starting up, it will wait 5 seconds for a keypress from either the PC keyboard or from the serial port and will give control of GRUB for the interface that sends the first keypress. If no keypress is received, the serial port is used by default (as it is mentioned first on the "terminal" line). Then GRUB displays the boot menu on the serial port and starts up as normal.

If you want to make the serial port the true *primary* system console, you will need to add some options to all the "kernel" lines of the /boot/grub/menu.lst file:

kernel /vmlinuz- ro root= console=tty0 console=ttyS0,9600

This sends the kernel boot messages to both the VGA display (tty0) and serial port ttyS0. The primary system console will be the one on the _last_ console= option, or ttyS0 in this case. The system startup scripts will output on the primary console only.

MK
MK