How to set openBMC to use static address

Good number of openPOWER servers run openBMC. OpenBMC as of today does NOT support network IPMI but it does support host-BMC IPMI. We can use this to set static IP on BMC using standard IPMI tool commands

Set openBMC to static IP from Host / Petitboot:

To set the BMC running openBMC to static address, run following ipmitool commands from petitboot / host.

   ipmitool lan set 1 ipsrc static

   ipmitool lan set 1 ipaddr 10.127.xx.xx

   ipmitool lan set 1 netmask 255.255.252.0

   ipmitool lan set 1 defgw ipaddr 10.127.xx.xx

   ipmitool raw 0x06 0x40

You can print lan credentials using:

ipmitool lan print

Remember default credentials of BMC is    root   and 0penBmc

Set openBMC to get static IP from openBMC linux shell:

You can use standard linux “ip” command to set the IP address to static

To check interfaces
ip a
To force eth0 down
ip link set eth0 down
To force eth0 up
ip link set eth0 up
To set static ip
ip addr add 192.168.1.1 dev eth0
To set up routing:
ip route add 192.168.1.0/24 via 192.168.1.1 dev eth0

Advertisements
How to set openBMC to use static address

How to set OpenPOWER server to boot from any device

OpenPOWER servers have Petitboot bootloader to manage the bootup options / preferences.

Since petitboot is relatively new I am putting together this guide to help walk through on how to set up devices to boot from any device (network or disk).

Step 1. 

Power on the server and wait for Petitboot to come up via the VGA console (or OOB)

Step 2:

Select and click “system configuration” using the key-board arrows and enter key.

Screen Shot 2016-06-09 at 11.14.06 AM

Setup 3:

You will find below menu to customize the boot up options. In order to boot from any device, select and press enter on ” Clear and boot Any” option as below

Screen Shot 2016-06-09 at 11.29.28 AM

Setup 4:

Once you finish step 3, you will see that Boot Order in the first line of the screen short below changes to “(0) Any Device”

Screen Shot 2016-06-09 at 11.29.57 AM

Step 5:

Now let’s save this boot config. For saving the boot order we have to go all the way down to the boot menu with down arrow key and select and press enter on “OK”

Screen Shot 2016-06-09 at 11.30.27 AM

Step 6:

At this point you will be returned to petitboot menu and you have successfully set to boot from any device. From your next power on your server will automatically boot into an image that it finds first.

Power-off, Unrack and rack your server (or hard reboot) to test that “boot from any device” preference is working. When you un-rack and re-rack your server, you will have to wait few minutes (for BMC orange light to go off) before you press the host power on button.

Screen Shot 2016-06-09 at 11.31.40 AM

How to set OpenPOWER server to boot from any device

How to Install Ubuntu Xenial 16.04 on PPC64LE / OpenPOWER

Here’s how to install Ubuntu 16.04 on PPC64LE server. In my case Barreleye, our openPOWER server is running OPAL as BIOS firmware with Petitboot bootloader:

Here are steps through install:

1) Login to Out of band management and get into host console

  • Logging into host OOB console  is important since Ubuntu 16.04 PPC64EL installer doesn’t have  ASPEED VGA / Graphics drivers. So you cannot see the install progress through the VGA console.
  • In your case this might be a ipmi based command to get to host console
  • In my case since we are running a openBMC firmware for our out of band needs :
    • a) SSH into BMC
    • b) Typed the command:       obmc-console-client

2) Power on the server and get to Petitboot bootloader. Which should look like below:

Screen Shot 2016-05-06 at 1.37.12 PM

2) Now type “n” to have add a new boot option.

We are netboot installing 16.04. So let’s grab and add the kernel and initrd url’s for Xenial (16.04 code name) respectively:

Kernel:

http://ports.ubuntu.com/ubuntu-ports/dists/xenial/main/installer-ppc64el/current/images/netboot/ubuntu-installer/ppc64el/vmlinux

Initrd:

http://ports.ubuntu.com/ubuntu-ports/dists/xenial/main/installer-ppc64el/current/images/netboot/ubuntu-installer/ppc64el/initrd.gz

Your screen should look like this:

Screen Shot 2016-05-06 at 1.38.58 PM

3) Press OK and you should return to Petitboot main screen. The boot option you just added should come up as “User Item 1”:

Screen Shot 2016-05-06 at 1.39.25 PM

4) Select and enter “User Item 1” for starting the install. Following which you will go through standard Ubuntu Install process, that you should be familiar with.

 

Thanks I hope this post helps you Install not just Ubuntu 16.04 but any OS of your choice using Petitboot.

 

How to Install Ubuntu Xenial 16.04 on PPC64LE / OpenPOWER

How to build openBMC binary for Palmetto

Palmetto is the power server that Tyan built.

In my work at Rackspace, I often build custom openBMC builds for the sake of testing stability / new features. We have couple of Palmetto servers that we very occasionally play with.

Here’s how you can build your own openBMC binary for Palmetto.

If you are building on Ubuntu you need to install following packages before you build openBMC:

sudo apt-get install -y git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat

If you are building on Fedora 23 you need to install the following packages before you build openBMC

sudo dnf install -y git patch diffstat texinfo chrpath SDL-devel bitbake
sudo dnf groupinstall "C Development Tools and Libraries"

 

Build Process:

First, clone the openBMC repository from github. If you are cloning form master this is how you’d do it:

git clone https://github.com/openbmc/openbmc

Then run the following commands for Palmetto:

cd openbmc
TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf . oe-init-build-env
bitbake obmc-phosphor-image

 

If you run it a laptop with decent power, it takes about 2-3 hours.

If you wanna rebuild your binary, then you will have to first clear your config before you run above 3 commands again.

This is the command to clear the config:

rm -rf build/conf

Comment here for any issues you run into, while building the binary or if you want a link to a latest binary.

How to build openBMC binary for Palmetto

How to build openBMC binary for Barreleye

Barreleye is the openPOWER server that Rackspace helped build.  It runs openBMC for it’s management.

In my work at Rackspace, I often build custom openBMC builds for the sake of testing stability / new features.

Here’s how you can build your own openBMC binary for Barreleye.

If you are building on Ubuntu you need to install following packages before you build openBMC:

sudo apt-get install -y git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat

If you are building on Fedora 23 you need to install the following packages before you build openBMC

sudo dnf install -y git patch diffstat texinfo chrpath SDL-devel bitbake
sudo dnf groupinstall "C Development Tools and Libraries"

 

Build Process:

First, clone the openBMC repository. If you are cloning form master this is how you’d do it:

git clone https://github.com/openbmc/openbmc

Then run the following commands:

cd openbmc
TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rackspace/meta-barreleye/conf . oe-init-build-env
bitbake obmc-phosphor-image

 

If you run it a laptop with decent power, it takes about 2-3 hours. If you run it on a Barreleye (this is where I make you jealous) it takes about 35 minutes to build the binary.

The built binaries are in openbmc/build/tmp/deploy/images/barreleye location

In my case I use the barreleye-20160818194255.all.tar image and untar it to get an file named ‘image-bmc’ about 32MB in size .

You can  use a flash programmer to flash your BMC chip with this new version or use the openBMC online upgrade process.

If you wanna rebuild your binary, then you will have to first clear your config before you run above 3 commands again.

This is the command to clear the config:

rm -rf build/conf

Comment here for any issues you run into, while building the binary or if you want a link to a latest binary.

 

How to build openBMC binary for Barreleye

How to update Mellanox Firmware on OpenPower Servers

Mellanox Technologies being a openPOWER foundation member, has worked towards providing support towards Little Indian POWER based distros.

Mellanox supports the their cards (has official drivers) following ppc64LE OS:

Ubuntu, Fedora, SLES, PowerKVM, RHEL and CentOS

If you have multiple mellanox adapters in the same box, it can get tricky to find the exact device ID and flash the firmware to adapter.

Step1 : Grab the model number (PSID) of Mellanox Nic you have in your server

a) mst start

b) mst status 

c) mstflint -d <PCI-device-id-of-adapter> q

where PCI device id can be gotten from command:   b)  and is of the example format: 0002:01:00.0

d) Find the PSID   (Format of PSID : MT_1270116023)

Output from c) contain the PSID

 

Step2: 

Find and download the latest firmware for the adapter in below webpage using above found PSID

http://www.mellanox.com/page/firmware_download

Step3:

Unzip the firmware binary image (.zip file) from Step 2

Burn the FW image. Enter:

flint -d <device_name> -i <binary image> burn

Exact device name can be gotten from: mst status

Format of device name: /dev/mst/mt<dev_id>_pci{_cr0|conf0}

Either cro or conf0 string will work in above command.

Step4:

reboot

Step5:

check if your firmware is updated with below command

ibstat

How to update Mellanox Firmware on OpenPower Servers

OS support for Linux on Power (Little Endian)

OpenPOWER movement is gaining pace. Linux community has been overwhelmingly supportive of Little Indian port of Power (PPC64LE).  As a result, most of the leading Linux server distributions have built server images in the past couple of years.

Through this post I want to aggregate the installer links to server install images for PPC64LE. Where available I also listed cloud images used to boot up VM’s / (OpenStack guests).

OS Hypervisor Install image Guest Installer Image
Fedora 23 Refer to Link Link
Fedora 22 Refer to Link Link
Fedora 24 Refer to Link Link
Ubuntu 15.10 Refer to Link Link
Ubuntu 15.04 Refer to Link Link
Ubuntu  14.04 LTS Refer to Link Link
Centos 7.2 Refer to Link NA (But you can use init from RHEL)
OpenSUSE 13.2 Refer to Link Link
Debian 8 Refer to Link NA
PowerKVM 3.1 Refer to Link NA
Ubuntu 16.04 Refer to Link Link
RHEL 7.2 Refer to Link (Needs Login) Link
SLES 12 Refer to Link (Needs Login) Link

Hopefully this table helps the audience who are just getting started on power servers, to finish a quick install.

OS support for Linux on Power (Little Endian)