...advanced dreams

28 September 2008

IPMI in Ubuntu 8.04

I've recently added Dell's PowerEdge T300 to my collection of 'computer power'. This machine comes with support for IPMI2.0. This is a brief tutorial how to take full advantage of IPMI2.0 in Ubuntu 8.04.

You'll need ipmitool package (universe repository);

sudo apt-get install ipmitool

then you'll need to load all the modules:

sudo modprobe ipmi_devintf
sudo modprobe ipmi_si
sudo modprobe ipmi_msghandler

Next step is to add a user. Since we'll be setting other things too, best thing to do is to start an ipmitool shell:

sudo ipmitool -E shell

then add a user:

user set name 2 USERNAME
user set enable 2
user set password 2 PASSWORD
channel setaccess 1 2 ipmi=on link=on privilege=4

Next stop; setting up IP address:

lan set 1 static
lan set 1 ipaddr IPADDRESS

lan set 1 netmask NETMASK

lan set 1 defgw GATEWAY

lan set 1 access on

lan set 1 user


On T300, all this can be done without ipmitool and operating system at all. During booting, there's a nice 'Hit Ctrl+E to configure remote management' message. After that, we should be able to ping IPADDRESS. Now we are able to connect to this server from another client which has ipmitool:

ipmitool -U USERNAME -H IPADDRESS -I lan -E shell

server will ask us for a password (PASSWORD). Easy check if everything is ok:

power status

First part is over. We are now able to shutdown and power up our server. But, the real fun is console redirection! This task depends on two things; Console redirection on serial port in BIOS and console redirection in operating system. First one depends on your server, and one should check it's manual for correct settings. On T300, console should be redirected to COM2 with enabled redirection during booting. Second part is easy. In /boot/grub/menu.lst we need to enable redirection. This is done with 'defoptions':

# defoptions=quiet serial console=ttyS1,57600n8

Note that there's no 'splash', cause splash screen wouldn't look good on terminal :) Second, baud rate and serial port depend on settings in BIOS. In this case, I used 57.6k and ttyS1. Next stop is upstart. That's an easy one. Create a file in /etc/event.d (I choosed console-redirect), but it isn't important how you call it (I would sugest something unusal, so it doesn't get ovewrriten by some Ubuntu package), containing this:

start on stopped rc2
start on stopped rc3

start on stopped rc4

start on stopped rc5


stop on runlevel 0

stop on runlevel 1

stop on runlevel 6


respawn

exec /sbin/getty 57600 ttyS1


Yes, exactly the same port and baud rate as in grub and BIOS. Now, reboot your server and fire up:

ipmitool -U USERNAME -H IPADRESS -l lanplus -E sol activate

and watch your server boot ;)

I've packaged ipmitool with additional support for Dell's functions, go grab it from launchpad:

https://edge.launchpad.net/~ivoks/+archive

Functions are under 'delloem' command.

Labels:

26 September 2008

Ubuntu 8.04 @ PowerEdge T300

I haven't posted anything for... a long time. So, here it is, almost like a fresh start :)

I have a new server! Yay, finally I'll be able to setup some real environments for Ubuntu testing/development and other, business related stuff :D


The installation? Without a single problem.

Labels: