How to update openPOWER BIOS / host flash / boot firmware (without wiping boot preferences)

There are 2 ways you can update host / boot firmware in openPOWER machines

a) Via BMC console

b) Via BMC REST API

In this post we will see the steps for updating the host firmware via BMC console:

Step1: Get to the BMC console (via ssh)

ssh root@<openBMC IP>

Step2: Now we want to make sure host power is off

obmcutil poweroff

Step3: Get the host flash binary into  /tmp location on BMC

cd /tmp

wget <link to host firmware>

Step4:  Start flashing the new firmware using ‘pflash’ utility. Once you know for sure host power is off ( you can check it via <obmcutil state>)

pflash -E -f -p  <flash-binary-name>.pnor

Step5: Once you see the flash progress reach 100% and complete, try to get the power on

obmcutil poweron

Step6: Check the console , if your host is booting successfully

obmc-console-client

 

Above steps (specifically the pflash command above) completely wipe out your flash chip (including boot preferences) and replace it with new host firmware. If you, instead wanted to save boot preferences then you need to back up the NVRAM partition using the flow below:

cd /tmp

pflash -P NVRAM -r nvram

pflash -E -f -p <flash-binary-name>.pnor  

pflash -e -P NVRAM -p nvram

rm -rf nvram

Advertisement

How to mine Ethereum on Rackspace BarreleyeG2 OpenPOWER server with Nvidia P100 GPUs

OpenPOWER CPUs and Nvidia GPUs represent the best in class computing Power per $

To test that, I thought I’ll give compiling Ethereum mining suite a try on our Barreleye G2 server. As background information Barreleye G2 is a server Rackspace is building in collaboration with Google, IBM and Ingrasys

Screen Shot 2017-09-02 at 9.56.50 PM

To compile Ethereum on Power9 with Nvidia P100 GPUs you have 2 options:

A)  Compile it for CUDA

B)  Compile it for OpenCL

In this post we will go with Option A (Compile it with CUDA). To do this you need to first get Nvidia Drivers and CUDA working on your openPOWER server. The link to blog post on how to get these working is here:

Once you have CUDA working (run an example CUDA application to make sure), install the build dependencies necessary for compiling ethereum. We will use cmake to configure and build.

sudo apt-get install libleveldb-dev libmicrohttpd-dev cmake

After looking around I realized that main github source for ethereum “ethereum/cpp-ethereum” no longer supports mining for GPUs. So instead I used: https://github.com/ethereum-mining/ethminer for my mining experiments with Nvidia P100 GPUs. I found the release “0.12.0.dev2” to be stable.

Download the latest official release zip and unzip

wget https://github.com/ethereum-mining/ethminer/archive/v0.12.0.dev2.zip

unzip v0.12.0.dev2.zip

cd ethminer-0.12.0.dev2/

Make a build directory for your build activities and make that your current directory

mkdir build
cd build

Since I’m building for CUDA and NOT OpenCL, I made sure, my cmake configuration reflects that. This step 3-4 minutes on Barreleye G2 server

cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF

Once cmake configure is done, we get to the fun part, building:

cmake –build .

If your build from source looks good, your screen should roughly look like this:

Screen Shot 2017-09-02 at 8.00.00 PM

Make install the ethminer binary

sudo make install

At this point you have successfully built your ”ethminer” binary and it should reside in “/usr/local/bin/ethminer”

Play around with your newly built binary with command-line options:

/usr/local/bin/ethminer –help

Before actually mining you can benchmark / simulate to see how many Hash Rate (MH/s) can you hit

/usr/local/bin/ethminer -M -U

Screen Shot 2017-09-02 at 9.22.26 PM

Once you have simulated and your expected MH/s match your expectations. Its time to actually mine ethereum.

You need to create a ethereum wallet and get your own address to send your mined coins to. Go to the below address, create and save your credentials safely

https://www.myetherwallet.com/

Once you have you created <ethereum address> and think of <miner tag> to identify your machine (helpful you are mining via multiple machines)

/usr/local/bin/ethminer –farm-recheck 200 -U -S us1.ethermine.org:4444 -FS eu1.ethermine.org:4444 -O <wallet address>.<tag>

/usr/local/bin/ethminer –farm-recheck 200 -U -S us1.ethermine.org:4444 -FS eu1.ethermine.org:4444 -O 0x4ff2de61282aa5da02E5F8399DB7d47A66Be1465.barreleyeg2

Soon your will receive console output indicating completed shares and your Hash rate:

Screen Shot 2017-09-02 at 9.44.26 PM

Now how do you confirm / check the number of shares / amount of ethereum you have mine ? Got to below website and look up your wallet address from above:

https://ethermine.org

You will be able to see details like below:

Screen Shot 2017-09-02 at 9.48.41 PM

You can use below command to check how much power your nvidia GPUs are consuming

nvidia-smi

Please comment below if you have questions or are interested in price of this server / setup OR profitability.