![]()
|
SysAdmin Topics
|
Sun Fire X Servers - ILOM Serial Console Configuration (Linux) by Joseph Kwan OverviewThe Sun Fire X servers have Service Processor (SP) for managing the server,independent of the OS. This is also known as the Integrated Lights Out Management (ILOM) module. With it you can power down and reset your system, without ever having to touch the hardware. A physical KVM can be connected to the system for the system console (connection with a monitor on the video port, and USB mouse and keyboard on the USB ports). Alternatively via the SP the KVM can be redirected remotely over the network using the Sun ILOM Remote Console. This is a Java application that needs to be run on the remote end. It opens a rather large window on the remote end, and full graphics support is available. This Remote Console will allow you to redirect all the BIOS/system initialization output. Another option is redirect the console to a serial console with the ILOM so a real KVM console doesn't need to be used. Redirecting the console to the 'serial' port allows you to use the standard ILOM connection to access the console. You won't be able to see graphics on it but it's a lightweight way to access the console, particularly on servers that don't have graphics consoles. You can use ssh to the ILOM and then start /SP/console to access the serial console (similar to the traditional Sun SPARC servers with serial consoles). Serial console support is part of grub, so configuration with other Linux distributions using grub will probably work similarly. This method has been implemented on Sun Fire X4150, X4200 and X4600 servers running Centos Linux. NOTE: the standard BIOS/system initialization process still goes to the kvm console (or the Sun ILOM Remote Console if that's being used). These aren't redirected to the serial console. Only the grub boot loader and the Linux OS can be redirected to the serial console. Part 1 - SP serial port configurationWeb/GUIOn the system ILOM web page, configure the internal serial port baud rate (this is in the Configuration -> Serial Port tabs). The external serial port doesn't need to be changed. I believe this is the physical serial port on the server marked SER MGT (RJ45 serial connector). For my configuration I'm using the 38,400 baud rate. Any baud rate can be used, but all must be set the same for this work properly. Connecting to that port gets you an ILOM connection, at which point you can do the start /SP/console to get the console. Command LineTo change the serial baud rate using the SP command line interface, use the commands show /SP/serial/host to display the current settings and set pendingspeed=... and set commitpending=true to commit the change. castlebay) ssh -x -l root ilom.lmcqueen
Password:
Sun(TM) Integrated Lights Out Manager
Version 2.0.2.5
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
-> show /SP/serial/host
/SP/serial/host
Targets:
Properties:
commitpending = (Cannot show property)
pendingspeed = 9600
speed = 9600
Commands:
cd
set
show
-> cd /SP/serial/host
/SP/serial/host
-> set pendingspeed=38400
Set 'pendingspeed' to '38400'
-> set commitpending=true
Set 'commitpending' to 'true'
-> show
/SP/serial/host
Targets:
Properties:
commitpending = (Cannot show property)
pendingspeed = 38400
speed = 38400
Commands:
cd
set
show
Part 2 - grubIn the grub.conf file, add the following at the top of the file: serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1 terminal serial This sets grub to use the serial port specified (unit=0 is the first serial port). The baud rate should match the internal one configured on the ILOM web interface. The second line configures grub to use the serial line for the console. Note: as noted in the grub documentation, grub assumes the terminal type is VT100 compatible (if not you can add the --dumb option). However, a more useful configuration: serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1 terminal --timeout=10 serial console This configures grub to use either the serial port for the console or the KVM console. During boot, grub comes up and prints Press any key to continue on both the serial port console and the KVM console. Grub continues to print that message one per second until the time out period is reached or a key is pressed. If a key is pressed, grub will switch to responding to that device (serial or kvm) as the console device. If no key is pressed during the time out period (10 seconds in this configuration), the serial port will be the default console (since it's listed first). Part 3 - grub kernel configurationFor the serial console, on the kernel configuration line add to the kernel line: splash console=tty1 console=ttyS0,38400n8 For example: title lmcqueen CentOS serial console root (hd0,0) kernel (hd0,0)/vmlinuz ro root=LABEL=SYS rhgb quiet splash console=tty1 console=ttyS0,38400n8 initrd (hd0,0)/initrd-lmcqueen.img title lmcqueen CentOS KVM console root (hd0,0) kernel (hd0,0)/vmlinuz ro root=LABEL=SYS rhgb quiet initrd (hd0,0)/initrd-lmcqueen.img The first configuration is for the serial console and the second one is the standard KVM console. The first configuration should be configured the default boot configuration (the grub default=0) to match the serial console default configuration. If a key is pressed on the kvm console, the second configuration should be selected to boot that configuration. You should now be able to get the server console from the ILOM after the system starts booting into Linux. It appears there's still a part of the Linux boot that writes directly the the KVM console, but this is only a small portion of the boot (this is nash part of the initrd in Red Hat/Centos Linux). To start the console after connecting to the ILOM, start /SP/console. After the system boots, this becomes /dev/ttyS0. The KVM console remains /dev/tty1 and gettys are run on both. Note 1: doing the above also updates /etc/inittab adding co:2345:respawn:/sbin/agetty ttyS0 38400 vt100-nav Note 2: only one session may connect to the console with start /SP/console. sample boot logssh <ilom IP address/host name> [-l root]
Password:
Sun(TM) Integrated Lights Out Manager
Version 2.0.2.10
Copyright 2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
> start /SP/console
Are you sure you want to start /SP/console (y/n)? y
Serial console started. To stop, type ESC (
...
Press any key to continue.
Press any key to continue.
Press any key to continue.
...
Booting lmcqueen CentOS 5.2 ROOT0 (2.6.18-92.1.13.el5) in 4 seconds...
...
GNU GRUB version 0.97 (623K lower / 3668928K upper memory)
+-------------------------------------------------------------------------+
| lmcqueen CentOS serial console |
| lmcqueen CentOS KVM console |
| |
| |
| |
| |
| |
+-------------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted.
Press enter to boot the selected OS, 'e' to edit the
commands before booting, 'a' to modify the kernel arguments
before booting, or 'c' for a command-line.
SummaryConfiguring the ILOM SP serial console allows you to have an additional "lightweight" method of accessing a Linux console. This involves a few configuration steps in the ILOM SP and configuring GRUB to to provide the serial port as an additional output console. Coupled with the SP (where you can reset, power on/off the system) you have full remote hands off management of a Linux system. The methods described above are what I've implemented on our Sun Fire X servers, all of which runs Linux. These should all be similarly configurable for Solaris/OpenSolaris but unfortunately, I don't have such systems running Solaris. |