Saturday, April 26, 2008

Installing Broadcom drivers for xSeries Server with RedHat Enterprise Linux 4

This is the account of a problem i experienced in setting up an IBM x3650 server with linux enterprise 4 update 2(64-bit).The following problem occurs mostly if you are performing an install using 3rd party driver-detect option or using 'pci=nommconf' or even the generic 'noapic' option.But here, i had to comprehend it in a clean install too...This post is particularly helpful in many situations if you are doing linux install in IBM xseries where network device is not taken by default.

As we had completed install and tested network configuration, we could see that there were two network interfaces and both of them not being detected.

# ifconfig -a

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1

(No ethernet device showing up)


# service network restart

the following error comes up:

Bringing up interface eth0: 3com3c501 device eth0 does not seem to be present, delaying initialization. [FAILED]


We thought it as a classic PCI device detection problem since most network interfaces belong to PCI genre.But a close inspection revealed that this was not the actual cause.We could see a PCI device named '3Com3c501'.

This prompted me to search for drivers for that device name.But i was once again disheartened to find that the device was named obsolete in their homepage itself and that such drivers have not been in use since kernel 2.4 or Redhat 9x line of OS.

Then came the usual search for the problem in forums which have often come to my rescue in identifying which course to take.I found some useful posts here:

http://www.linuxquestions.org/questions/linux-networking-3/3c501-device-eth0-does-not-seem-to-be-present-230505/

It was telling that 3com drivers as shown here is the legacy driver which pops up when the destined driver for the actual device is not taken by default.This put me in one more question.How to detect the actual ethernet device if it has not been taken? The answer was another post on the same page.Just issue

# lspci -v

This showed up the actual PCI listing of the motherboard.Now in the head 'Network interface', i was seeing Broadcom NetXtreme II series of device.

I began search issuing "Broadcom NetXtreme II + EL4 driver".I could find them both in support site of IBM x series and Broadcom homepage.I downloaded the drivers as zip files,burned in into a CD,extracted them to the server and began installation as per the INSTALL.txt manual

I preferred the RPM source install method and the steps are as follows:

1. Install the source RPM package:

# rpm -ivh bnx2-.src.rpm


2. CD to the RPM path and build the binary driver for your kernel:

# cd /usr/src/{redhat,OpenLinux,turbo,packages,rpm ..}

# rpm -bb SPECS/bnx2.spec

or

# rpmbuild -bb SPECS/bnx2.spec (for RPM version 4.x.x)

Note that the RPM path is different for different Linux distributions.

The driver will be compiled for the running kernel by default. To build
the driver for a kernel different than the running one, specify the
kernel by defining it in KVER:

# rpmbuild -bb SPECS/bnx2.spec --define "KVER "


where in the form of 2.x.y-z is the version of another
kernel that is installed on the system.

3. Install the newly built package (driver and man page):

# rpm -ivh RPMS//bnx2-..rpm

where is the machine architecture such as i386:

# rpm -ivh RPMS/i386/bnx2-.i386.rpm


Note that the --force option may be needed on some Linux distributions
if conflicts are reported.

The driver will be installed in the following path:

2.4.x kernels:

/lib/modules//kernel/drivers/net/bnx2.o

2.6.0 kernels:

/lib/modules//kernel/drivers/net/bnx2.ko

2.6.16 and newer kernels:

/lib/modules//kernel/drivers/net/bnx2.ko
/lib/modules//kernel/drivers/net/cnic.ko

4. Unload existing driver if necessary:

# rmmod bnx2

If the cnic driver is loaded, it must be unloaded first before bnx2 can
be unloaded:

# rmmod cnic

5. Load the driver:

# insmod bnx2.o
or
# insmod bnx2.ko (on 2.6.x kernels)
or
# modprobe bnx2

To load the cnic driver:

# insmod cnic.ko
or
# modprobe cnic

6. To configure network protocol and address, refer to various Linux documentations

After the install was completed and system restarted, the Kudzu hardware configurator popped up and asked to add the new device with network settings.The network device was successfully configured for the rest.....

NOTE: Please check support available with the server before attempting these steps and also it is advisable to refer to documentation online.Some legacy drivers may not be enabled by this method.The outlined documentation is compatible with only Broadcom NetXtreme II onboard and we r not claiming it could work for any other custom drivers.

IBM, xSeries are trademarks or IBM Corporation, Worldwide. Broadcom,NetXtreme are trademarks of Broadcom Inc.