User Manual

Rev 2.1-1.0.6
Mellanox Technologies
232
4. To add an Ethernet driver into initrd, you need to copy the Ethernet modules to the diskless
image. Your machine needs to be pre-installed with a MLNX_EN Linux Driver that is appro-
priate for the kernel version the diskless image will run.
echo “loading Mellanox ConnectX EN driver”
/sbin/insmod lib/modules/mlnx_en/mlx4_core.ko
/sbin/insmod lib/modules/mlnx_en/mlx4_en.ko
Adding the Ethernet 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_en
Step 4. Create a directory for the ConnectX EN modules and copy them.
Step 5. To load the modules, you need the insmod executable. If you do not have it in your
initrd, please add it using the following command:
Step 6. If you plan to give your Ethernet device a static IP address, then copy ifconfig. Other-
wise, skip this step.
Step 7. Now you can add the commands for loading the copied modules into the file init. Edit the
file
/tmp/initrd_en/init and add the following lines at the point you wish the Ethernet
driver to be loaded.
Step 8. Now you can assign a static or dynamic IP address to your Mellanox ConnectX EN network
interface.
Step 9. Save the init file.
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_en
host1$ cd /tmp/initrd_en
host1$ gzip -dc <initrd image> | cpio -id
host1$ mkdir -p /tmp/initrd_en/lib/modules/mlnx_en
host1$ cd /lib/modules/`uname -r`/updates/kernel/drivers
host1$ cp net/mlx4/mlx4_core.ko /tmp/initrd_en/lib/modules/mlnx_en
host1$ cp net/mlx4/mlx4_en.ko /tmp/initrd_en/lib/modules/mlnx_en
host1$ cp /sbin/insmod /tmp/initrd_en/sbin/
host1$ cp /sbin/ifconfig /tmp/initrd_en/sbin
The order of the following commands (for loading modules) is critical.