Skip to content

Instantly share code, notes, and snippets.

@ggiamarchi
Created May 23, 2017 13:27
Show Gist options
  • Save ggiamarchi/fb5458c15e242f403dc2664c74c0f950 to your computer and use it in GitHub Desktop.
Save ggiamarchi/fb5458c15e242f403dc2664c74c0f950 to your computer and use it in GitHub Desktop.
Install kernel modules and freeipmi tools for in-band management on OCP Windmill servers (for linux kernel < 3.19)
#!/bin/bash
#
# Description : Install kernel modules and freeipmi tools for in-band management on OCP Windmill servers
# (for linux kernel < 3.19). Tested on GRML 2014.11 (kernel 3.16.0-1-grml-amd64)
# Author : Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
# Date : May 23rd, 2017
#
set -ex
status='Failed'
finish() {
set +x
echo ""
echo "### ${status} ###"
echo ""
}
trap finish EXIT
#############################################################################
### Install prerequisites
#############################################################################
apt-get update
apt-get install -y --force-yes build-essential linux-headers-$(uname -r) dkms ipmitool
#############################################################################
### Install DCMI kernel module
#############################################################################
rm -f dcmi-dkms_2.1.6.28.MEI-0~9~ubuntu14.04.1_all.deb
wget https://launchpad.net/~opencompute-developers/+archive/ubuntu/ocp-certification-tools-ppa/+files/dcmi-dkms_2.1.6.28.MEI-0~9~ubuntu14.04.1_all.deb
dpkg -i dcmi-dkms_2.1.6.28.MEI-0~9~ubuntu14.04.1_all.deb
#############################################################################
### Load DCMI kernel module
#############################################################################
modprobe dcmi
#############################################################################
### Build and install freeipmi
#############################################################################
apt-get install -y --force-yes libgcrypt-dev
cd /tmp
rm -rf freeipmi-1.5.4 freeipmi-1.5.4.tar.gz
wget http://ftp.gnu.org/gnu/freeipmi/freeipmi-1.5.4.tar.gz
tar xzf freeipmi-1.5.4.tar.gz
cd freeipmi-1.5.4
./configure --prefix=/usr
make -j 15
make install
cd $HOME
status='Success'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment