Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- System Administration
- >
- Re: DL380 G5 Serial Port Configuration
System Administration
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-23-2009 09:29 AM
02-23-2009 09:29 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-24-2009 09:48 AM
02-24-2009 09:48 AM
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-01-2009 04:31 AM
03-01-2009 04:31 AM
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
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-
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
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP