To get a virtual serial console, you need to enable the iLO virtual serial port. I had mine set up like this:
- iLO 2 Virtual Serial Port: COM2 0x2F8 IRQ 3
I also enabled ssh access in the iLO web interface. This way I can ssh into the iLO and see all BIOS messages using the “vsp” command. I can even go to the BIOS setup (RBSU) by pressing “ESC-9″.
To be able to control GRUB via the virtual serial port, it has to be configured. I changed the following lines in /etc/default/grub:
GRUB_CMDLINE_LINUX="text console=tty0 console=ttyS1,115200n8"
You must run “update-grub” after editing that file to generate the boot configuration.
The GRUB_HIDDEN_TIMEOUT is the number of seconds to wait for ESC before booting the default kernel. You can press ESC and select another kernel using the virtual serial console.
The GRUB_HIDDEN_TIMEOUT_QUIET=false shows a countdown, so you know when exactly to press ESC.
The GRUB_CMDLINE_LINUX directs Linux kernel messages to both console (tty0) and serial port COM2 (ttyS1). You can configure the speed (115200) in the iLO setup.
To get a login prompt after boot, I added a file named /etc/init/ttyS1.conf with the following contents:
# ttyS1 - getty
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL= and (
container CONTAINER=lxc or
stop on runlevel [!2345]
exec /sbin/getty -8 115200 ttyS1
That will start a getty on the virtual serial port.
Now I can log in via the iLO if I mess up the network configuration. I can also perform salvage operations at boot time in case filesystem checks fail.
This has been tested on Ubuntu Server 12.04.2 LTS x86_64.