Showing posts with label complete. Show all posts
Showing posts with label complete. Show all posts

Sunday, 22 May 2016

Dell 2950 Server - Fan Modification - Part 3

This is the software side of modifying my Dell Poweredge 2950 (Model II) servers to be much quieter.

It WORKS!  But please beware, THERE ARE POTENTIAL RISKS IN ALTERING YOUR BMS FIRMWARE, IF YOU ARE READING THIS, IT IS ADVICE ONLY, ALL AND ANY ACTIONS YOU PERFORM ARE AT YOUR OWN RISK!  Just because it worked for me, doesn't mean you will be successful.

Part 1, shows how I added 47ohm 0.5watt resistors to the power (red cables) on each of the four internal fans.  I'm yet to modify the power supply fans, but I will.

Part 2, is my success video recorded at 3am last night when I was very tired, and had everything working.

And this, Part 3 is to cover my complete solution in how to do the software (BMC) firmware flashing.


The Centos Linux OS was used for the change, specifically the older version 6.4, downloaded from Oxford University here http://mirror.ox.ac.uk/sites/mirror.centos.org/6.7/isos/i386/CentOS-6.7-i386-LiveCD.iso.

This was burned to a DVD ROM, and as you can see in the image, I had to re-fit a DVD into the server as I have three servers, but only one DVD drive... DOH!

Next, I booted into Text Mode, so when the boot menu appeared from the DVD, I pressed Escape before the auto boot timed out, and selected to boot in Text mode.  Once booted, the login is "root", with no password.

My first command is to ensure the ipmi tools are installed, python, wget and rpm are on that image, but for completeness to the source material I include them in the installation:

sudo yum install freeipmi freeipmi-tools openipmi ipmitools python wget rpm

Once complete you can check the ipmi sensors are working with:

ipmi-sensors

You will get a huge list of all the sensors on the board.

Next you need to download the BMC firmware, to anywhere on the machine, you don't need any storage, the Live CD boot you're using will work fine just with RAM in the server!.. So no worry about overwriting any disks or data!

wget http://downloads.dell.com/esm/BMC_FRMW_LX_R202152.BIN

Once this has downloaded, you need to make it executable

sudo chmod +x ./BMC_FRMW_LX_R202152.BIN

Now make a directory as root:

sudo mkdir bmc

And extract this firmware you've downloaded into that path:

sudo ./BMC_FRMW_LX_R202152.BIN --extract bmc

And change into that directory:

cd bmc

Now we need the path script, but as we're in a directory created with sudo, we need to also run wget with sudo:

sudo wget http://projects.nuschkys.net/downloads/dell-adjust-fan-thresholds.py

And make this executable:

chmod +x dell-adjust-fan-threaholds.py

To then extract the values from the firmware and edit them, we run the script against the payload dat file:

./dell-adjust-fan-thresholds.py payload/bmcflsh.dat

This will extract a load of information, then ask you how many fans, or what model to edit, for the 2950, with four system fans and two power supply fans, I selected option 3.  To give me six fans to modify.

It lists each fan and their threshold value, so now select the fan by entering it's number, so try 1 first.  Then enter a number, now if I recall the default 2250 threshold is a value of 25.  I tried various values, but the best I found to modify for the resistors I'm using was 22, this gives a new minimum RPM of 1650 for the fans.  And I never saw any fan drop below 1800 RPM.

23 is 1750 RPM as a threshold, but I thought that too close to the lowest RPM I'd observed before starting this software mod.

So, 1 through 6 all selected and 22 entered for each, you then write this file back with the 'w' command.  This will repack the payload/bmcflsh.dat file with your new values.

Armed with this modified dat file you therefore need to flash the firmware, THIS IS THE STEP WHICH CAN BRICK YOUR MACHINE, PROCEED AT YOUR OWN RISK!!!

We're still in the bmc folder created before, so change nothing after altering the payload with the script, and you type:

sudo LD_LIBRARY_PATH=./hapi/opt/dell/dup/lib:$LD_LIBRARY_PATH ./bmcfl32l
 -i=payload/bmcflsh.dat -f

And as you can see in my full video coverage, this worked for me.

I hope this helps, below are the references I went to, but I must have read about 15 different posts, dozens (if not hundreds) of the comments to piece this together.  The biggest problems I had from other posts was understanding the problems using Ubuntu and other distros, they don't work.  There are problems with the libstdc++ libraries, and then the i686 installation and all manner of hoops and tricks I tried.

Centos 6.4 i386, is the only live DVD image I've been able to use... and this all work easily.

The main instructions I followed were from Martin Denizet, however, even his post has issues and it not clear how to get the right distribution.

I also tried to follow RatzBlog, but was thwarted at every step by the OS's I was using, even trying to use Centos 6 didn't work with his instructions.

Monday, 28 September 2015

SDL2.0 Complete Installation on Ubuntu

I've just spent sometime, setting up SDL for development on my Ubuntu machine, and found that the Ubuntu library caches lack SDL v2.0, they have the older 1.2, but that wasn't good enough, so here is a little script I've put together, to get me all the dependencies (least what I think the dependencies are), download each part of SDL (SDL, TTF, Mixer & Image), extract them into folders, build and install them, and then delete the folder copy which was extracted.

cd ~
sudo apt-get install build-essential xorg-dev libudev-dev libts-dev libgl1-mesa-dev libglu1-mesa-dev libasound2-dev libpulse-dev libopenal-dev libogg-dev libvorbis-dev libaudiofile-dev libpng12-dev libfreetype6-dev libusb-dev libdbus-1-dev zlib1g-dev libdirectfb-dev
wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz
tar -xvzf SDL2-2.0.3.tar.gz
cd SDL2*
./configure
make
sudo make install
cd ~
rm -rf SDL2-2*
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.tar.gz
tar -xvzf SDL2_image-2.0.0.tar.gz
cd SDL2_image*
./configure
make
sudo make install
cd ~
rm -rf SDL2_image*
wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.12.tar.gz
tar -xvzf SDL2_ttf-2.0.12.tar.gz
cd SDL2_ttf*
./configure
make all
sudo make install
cd ~
rm -rf SDL2_ttf*
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.0.tar.gz
tar -xvzf SDL2_mixer-2.0.0.tar.gz
cd SDL2_mixer*
./configure
make all
sudo make install
cd ~
rm -rf SDL2_mixer*
sudo ldconfig

Once this is all done, you need to edit /etc/ld.so.conf adding to it, thus:

sudo nano /etc/ld.so.conf

And add:

include /usr/local/lib

Save the file, I can now create an empty C++ project, or just a main.cpp, and include the following files:

#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_mixer.h>

The libraries to link against are:

libSDL2.a
libSDL2_image.a
libSDL2main.a
libSDL2_mixer.a
libSDL2_test.a
libSDL2_ttf.a

(Each .a also has a static .so, alongside, if you prefer)

This, of course the linker options on the command line are:

g++ --std=c++11 main.cpp -llibSDL2.a -llibSDL2_image.a -llibSDL2main.a -llibSDL2_mixer.a -llibSDL2_test.a -llibSDL2_ttf.a