User Manual
Rev 2.0-3.0.0
Mellanox Technologies
213
A.9.1.1 Example: Adding an IB Driver to initrd (Linux)
Prerequisites
1. The FlexBoot image is already programmed on the HCA card.
2. The DHCP server is installed and configured as described in Section 4.3.3.1, “IPoIB Config-
uration Based on DHCP”, and is connected to the client machine.
3. An initrd file.
4. To add an IB driver into initrd, you need to copy the IB modules to the diskless image.
Your machine needs to be pre-installed with a Mellanox OFED for Linux ISO image that is
appropriate for the kernel version the diskless image will run.
Adding the IB Driver to the initrd File
Step 1. Back up your current initrd file.
Step 2. Make a new working directory and change to it.
Step 3. Normally, the initrd image is zipped. Extract it using the following command:
The initrd files should now be found under /tmp/initrd_ib
Step 4. Create a directory for the InfiniBand modules and copy them.
The following procedure modifies critical files used in the boot procedure. It must be
executed by users with expertise in the boot process. Improper application of this pro-
cedure may prevent the diskless machine from booting.
host1$ mkdir /tmp/initrd_ib
host1$ cd /tmp/initrd_ib
host1$ gzip -dc <initrd image> | cpio -id
host1$ mkdir -p /tmp/initrd_ib/lib/modules/ib
host1$ cd /lib/modules/`uname -r`/updates/kernel/drivers
host1$ cp infiniband/core/ib_addr.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/ib_core.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/ib_mad.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/ib_sa.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/ib_cm.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/ib_uverbs.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/ib_ucm.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/ib_umad.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/iw_cm.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/rdma_cm.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/core/rdma_ucm.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp net/mlx4/mlx4_core.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/hw/mlx4/mlx4_ib.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/hw/mthca/ib_mthca.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/ulp/ipoib/ipoib_helper.ko /tmp/initrd_ib/lib/modules/ib
host1$ cp infiniband/ulp/ipoib/ib_ipoib.ko /tmp/initrd_ib/lib/modules/ib