Category Archives: OpenCompute

Using MAAS on OpenCompute – Setting up PXE for Serial Console

This article is using Ubuntu 13.10 (Saucy) as a base install.  One of the issues with using OpenCompute nodes is the fact that it is headless.  One of the issues that generally comes up with all tools, being it Cobler, Mirantis, or MAAS, is that the pxe config is not setup to actually show the serial information.  While playing with Ubuntu MAAS, I did figure out a way to redirect the console to serial to be viewed of SOL.

The first step is to install MAAS following the directions that are posted.  In this case I actually installed MAAS on a non-OpenCompute platform, in this case a laptop that I generally use as the controller.  The reasoning is that I don’t want to waste a power OpenCompute  node on what can easily be ran on a basic computer.

We are going to need to modify the templates that are located at /etc/maas/templates/pxe so that we can setup the bootloader and the kernel params so everything gets redirected to console.  If this is not setup, the lat thing you should see before funky characters would be:

Loading amd64/generic/saucy/xinstall/linux........
Loading amd64/generic/saucy/xinstall/initrd.gz.......................

We first will need to setup the boot loader on each image to redirect to the console.  This can be done by:

# cd /etc/maas/templates/pxe/
# sed -i '1iSERIAL 0 115200n8' config.commissioning.template
# sed -i '1iSERIAL 0 115200n8' config.install.template
# sed -i '1iSERIAL 0 115200n8' config.local.amd64.template
# sed -i '1iSERIAL 0 115200n8' config.local.i386.template
# sed -i '1iSERIAL 0 115200n8' config.local.template
# sed -i '1iSERIAL 0 115200n8' config.xinstall.template

The second piece we have to fix then is having the kernel direct to console also.  This is good for when MAAS does the automated install. This step is easier and what you need to do is go to the MAAS webpage, click on the gear on the top left, and scroll down to the “Global Kernel Parameters” section. Add “console=tty0 console=ttyS4,115200n8” in the text box and click the “Save” button.

OpenCompute IPMI with F11 / F12 Issues

These are more notes than a real blog post.  Working with IPMI on OpenCompute has weird quirks and one of those is the Serial BIOS with the F11 and F12 keys.

Here’s an example of using ipmitool to pull information remotely about the power status

$ ipmitool -C3 -I lanplus -H -U admin -P <password> power status

Using the Serial BIOS

The serial BIOS interface is a bit brain damaged in that it does not recognise the “F11”, and “F12” key escape codes that most terminal programs send, instead you can send “Esc-!”, and “Esc-@” (yes very logical, as long as the ‘@’ key is normally typed using ‘Shift-2’ – as on US keyboards, not miles away from the ‘2’ key, as on many non-US keyboards).  These escapes from HP, and Dell serial BIOS’ may or may not be useful:

Defined As     F1     F2     F3     F4     F5     F6     F7     F8     F9     F10    F11    F12
Keyboard Entry <ESC>1 <ESC>2 <ESC>3 <ESC>4 <ESC>5 <ESC>6 <ESC>7 <ESC>8 <ESC>9 <ESC>0 <ESC>! <ESC>@

Defined As     Home   End    Insert Delete PageUp PageDn
Keyboard Entry <ESC>h <ESC>k <ESC>+ <ESC>- <ESC>? <ESC>/

Use the <ESC><Ctrl><M> key sequence for <Ctrl><M> Use the <ESC><Ctrl><H> key sequence for <Ctrl><H> Use the <ESC><Ctrl><I> key sequence for <Ctrl><I> Use the <ESC><Ctrl><J> key sequence for <Ctrl><J> Use the <ESC><X><X> key sequence for <Alt><x>, where x is any letter key, and X is the upper case of that key