I have a HP ProLiant Microserver Gen9. It has HP ILO version 4, but the Java based Remote Console doesn't work reliably and I can't use it after the POST screen in the free version of ILO (asks me to buy an ILO Advanced license). So I want to use the serial console instead to get a login on the server.
What do I have to do on an Ubuntu system to get all phases (POST, BIOS configuration, GRUB's output, the eventual login prompt) of the boot process in a serial console via the server's ILO network port? How do I connect to it?
The ILO port on the HP server by default asks for an IP via DHCP. So you just need to plug it into a network that has a DHCP server running. It will announce itself with a host name like
ILOCZ12345678
which should make it easier to find in your router's DHCP lease table, or in e.g.journalctl
/syslog
if you run a DHCP server (e.g.isc-dhcp-server
) on a system like Ubuntu.After you've found the IP (say
1.2.3.4
), you can connect to ILO's GUI interface viahttps://1.2.3.4
. But that's not what we're looking for, we want the serial console. So instead, use ILO's SSH interface:ssh [email protected]
. The default password is on the little paper tag that comes with the Microserver.Note this also works when the server is shut down as long as it has a power cable stuck into it (that is the point of ILO).
In there, type
?
to see all options. Excerpt:We choose
VSP
to get the serial port;TEXTCONS
would probably also be nice, but you'd have to buy the Advanced ILO license to use it.Now, once we do that, with a running system, it just hangs at
That's because by default, Ubuntu (I'm using 16.04 here) doesn't make a login prompt available via the serial port. We'll change that later. First we reboot to see that the BIOS config already works.
Seeing it boot via the serial port
In another ILO ssh session, reboot using:
After some waiting time, you'll notice that the session in which
VSP
is running has cleared its screen.Then appears:
That's the POST screen. Wait a bit and see:
If you want to configure the BIOS, now is your time: This screen appears only for 1 second or so. The F* keys typically don't work, they need to be escaped: You literally have to press the
ESC
key and then the number/symbol as it says above. E.g.ESC
and then5
is forF5
.Now, without further settings, we get silence at the serial port, because as mentioned above, neither GRUB2 nor the Ubuntu login terminals output by default to the serial port in 16.04.
So we configure the server (now via SSH) to use the serial port.
Making GRUB2 use the serial port
I follwed the instructions at https://www.hiroom2.com/2016/06/06/ubuntu-16-04-grub2-and-linux-with-serial-console/ changing
/etc/default/grub
as described (-
means comment out the line with#
,+
means add the line):The timeout of 10 seconds is set because the serial connection redraws the screen extremely slowly, and we want enough time to be able to cancel the timeout by pressing e.g. key-down in GRUB.
After changing the file as described, run
sudo update-grub
, and reboot.You should now see in your
VSP
session the following after the POST screen:We ignore this (if you know how to get rid of this, please comment). After a shor time, this appears:
That's a normal GRUB screen, and you can move the
*
pointer with the up and down keys.Making the Ubuntu login use the serial port
The following bits are inspired by http://0pointer.de/blog/projects/serial-console.html
Now edit
/etc/systemd/system/[email protected]
:Change the line
to
We especially care to set the mode
vt100-nav
-- I found that the login doesn't appear without this change.I'm not sure why we have to use
ttyS1
here while in GRUB we configuredttyS0
-- but it doesn't work for me to useS0
here. If somebody knows why, please comment.Start the tty via:
You should now see a login prompt in your
VSP
session. Make this happen automatically at boot using:And reboot. You should now see all the output in
VSP
, from POST to GRUB2 to the login prompt.Use
textcons
from the ILO ssh interface. This may require the ILO Advanced license, but at the same time, there's a very low barrier to obtaining one.Most organizations aren't interested in making the virtual serial port work because it's time consuming.
Google for an ILO license
or obtain a demo license from HP
or just pay $25 for an ILO key from Amazon
In RHEL7 "error: terminal `serial' isn't found" is due to the fact that Anaconda does not place a "serial" device driver in the RAM image. It is possible to rebuild the RAM disk with the missing driver but Grub seems to function sufficiently without it.