Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:

Integrating Fedora Core 2 on the Sun Fire v20z

by Antonello Piemonte on Aug 19, 2004 (UPDATED 2004-08-23)

In this article I would like to describe how to integrate Fedora Core 2 (x86_64) with the Sun Fire v20z on board hardware in order to have full control of it.

The Sun Fire v20z is a 1U dual Opteron server (details here) which sports an impressive set of features designed for what is called "out-of-band" management, which in simple words, means to be able to "talk" to the server hardware regardless of which OS you loaded on it. On the other end, you can also perform "in-band" management", which means, managing the hardware from whithin the loaded OS. In the Sun Fire v20z, this is done is through the Intelligent Platform Management Interface (IPMI).

For their good reasons, Sun supports only RHEL 3, SuSE SLES 8 or SuSE 9 on the v20z, but if you are in a situation where Fedora fits into your requirements, you can follows those steps to get complete control on the server hardware.

First an outline of the necessary steps:

  • Install a late vanilla 2.4 kernel. Why not 2.6? well, because the supported distro are all on 2.4, so there are better chances of success using that instead of 2.6
  • Install three custom kernel modules to properly hook on this specific server hardware
  • Install the userland tools to actually perform the hardware management itself
Now for the details:

Having a server in mind, I installed a minimal Fedora system on it, i.e. performed an installation from the first CD only, where I deselected all package groups (this will then load 227 packages on the server). Then I added the needed packages to have a working environment for compiling a new kernel (I have setup a yum repository beforehand):

# yum install patch gcc tk xorg-x11-xauth rpm-build
note that xorg-x11-xauth is needed because I want to work out the kernel configuration with make xconfig, which means having a working X forwarding via ssh (therefore the xauth). If you are happy with the ncurse based kernel configuration interface then you don't need xorg-x11-xauth. Also, the rpm-build is not strictly necessary, but I used it for the last step (userland tools installation).

Now I can build the kernel in the usual way (I used 2.4.26 patched for this security bug)

# make dep; make clean; make bzImage; make modules; make modules_install; make install
Concerning the kernel configuration, I had to remove the aic79xx (CONFIG_SCSI_AIC79XX), ftape (CONFIG_FTAPE), cpqphp (CONFIG_HOTPLUG_PCI_COMPAQ) and ibmph (CONFIG_HOTPLUG_PCI_IBM) kernel modules to make it build.

In the end the grub bootloader has been updated with an entry for the new kernel stanza and all the bits and bytes under /boot have been properly set. However, one more step is necessary: because the 2.4 kernels look for /etc/modules.conf, I had to create that file and rebuild the initrd:

# cp /etc/modprobe.conf /etc/modules.conf
# mkinitrd -v -f /boot/initrd-2.4.26.img 2.4.26
This way the initrd will include the proper modules to boot up the system.

Having completed the kernel installation, I then continued on the second step: for the kernel modules I fetched the openipmi driver package from the Support Files CDROM that came with the server (/path/to/cdrom/Support_Files/sysmgmt/redhat/rhel3/openipmi-1.1.8-27.noarch.rpm) and installed it with this command:

# rpm -ivh --nodeps openipmi-1.1.8-27.noarch.rpm
if you get an error like this
error: unpacking of archive failed: cpio: lsetfilecon
just run the rpm command again and it should install without further errors. It will then compile 3 kernel modules (ipmi_devintf, ipmi_msghandler and ipmi_kcs_drv) which have been especially setup by Sun to properly match the Sun Fire v20z hardware. Two of them will be loaded automatically
# lsmod |  grep ipmi
ipmi_devintf 5424 0 (unused)
ipmi_msghandler 26184 0 [ipmi_devintf]
but the third one fails to load, so I did it manually
# modprobe ipmi_kcs_drv
# lsmod | grep ipmi
ipmi_kcs_drv 12421 0 (unused)
ipmi_devintf 5424 0
ipmi_msghandler 26184 0 [ipmi_kcs_drv ipmi_devintf]
Eventually, correctly loaded modules will produce this entry in the system logs
 Aug 19 12:06:59 opteron kernel: ipmi_kcs: Acquiring BMC @ port=0xa2
also the file /etc/rc.local will be modified so that those modules are reloaded on next reboot.

Once I have got the above modules loaded without errors, I proceeded to the last step: installing the userland tool wich can be downloaded here (a slightly older version is also available on the CDROM). Before the compilation I had to do this:

# yum install gcc-c++ 
# cd /usr/src/
# ln -s linux-2.4.26 linux-2.4
because the openipmi tools are written in C++ and need the above symbolik link to build properly. Then I extracted the rpm spec file, put the tarball where the rpm build process expects to find it and built the package:
# tar xvzf ipmitool-1.5.9.tar.gz ipmitool-1.5.9/ipmitool.spec
# cp ipmitool-1.5.9.tar.gz /usr/src/redhat/SOURCES/
# rpmbuild -bb ipmitool-1.5.9/ipmitool.spec
# rpm -ivh /usr/src/redhat/RPMS/x86_64/ipmitool-1.5.9-1.x86_64.rpm
again, I got this error
error: unpacking of archive failed: cpio: lsetfilecon
but just repeating the rpm command succesfully installed the package. To test that all is right, try this command (it will scroll by for a while ..)
# ipmitool -I open sdr list
... [snip] ...
cpu1.dietemp | 30 degrees C | ok
ambienttemp | 21 degrees C | ok
cpu0.memtemp | 25.20 degrees C | ok
... [snip] ...
if you get all sort of hardware diagnostics, the you are in business, enjoy!