Install stock kernel on new OVH servers. (Centos)
In this tutorial, I will describe how to install stock kernel on new OVH dedicated servers as new kernel does not come with the ethernet card driver preinstalled and custom OVH kernel wont let you install certain virtualization types.
The first step is to use ethtool, a command-line tool for checking or modifying PCI-based Ethernet card settings.
$ sudo yum install ethtool
To find Ethernet device driver and firmware information:
$ ethtool -i eth0
version: 2.1.6 < - Version of driver we need to install.
firmware-version: bc 5.2.3 NCSI 2.0.6
$ yum install kernel
$ rm -rf /etc/mtab
$ mount -o remount -a
$ new-kernel-pkg --mkinitrd --depmod --install 2.6.32-279.5.2.el6.i686 (You will get the
latest version after yum install kernel commnad)
(here grubby will give you an error skip it it is normal ...)
Do not reboot.
First, set up necessary developmen environment and install matching kernel headers.
$ sudo yum install gcc make
$ sudo yum install kernel-devel
Compile Ixgbe Driver
Download the latest ixgbe source code from the official site.
$ wget http://downloads.sourceforge.net/project/e1000/ixgbe stable/3.23.2/ixgbe-3.23.2.tar.gz
Be sure to check supported kernel versions. For example, the ixgbe driver 3.23.2 supports Linux kernel versions 2.6.18 up to 3.18.1. (Step One)
Reboot your machine and log in again trough IPMI KVM console as your eth0 card does not have driver under new kernel.
Extract the tarball and compile it.
$ tar -xvf ixgbe-3.23.2.tar.gz
$ cd ixgbe-3.23.2/src
If successful, the compiled driver (ixgbe.ko) will be found in the current directory.
You can check the information of the compiled driver by running:
$ modinfo ./ixgbe.ko
The output will show a list of available parameters of the ixgbe driver.
Load Ixgbe Driver
Now you are ready to load the compiled ixgbe driver.
If the stock ixgbe driver is already loaded on your system, you need to unload it first. Otherwise, you won't be able to load the new ixgbe driver.
$ sudo rmmod ixgbe.ko
Also, the latest ixgbe module may depend on other modules (e.g., ptp,dca,vxlan), so make sure to load all the modules listed in "depends:" section in the above modinfo output. For example:
$ sudo modprobe ptp
$ sudo modprobe dca
$ sudo modprobe vxlan
Then insert the compiled driver in the kernel by running:
$ sudo insmod ./ixgbe.ko
Optionally, you can supply any parameters while loading the driver.
$ sudo insmod ./ixgbe.ko FdirPballoc=3 RSS=16
To verify that the driver is loaded successfully, check the output of dmesg command.
Install Ixgbe Driver
Once you have checked that the driver is loaded successfully, go ahead and install the driver on your system.
$ sudo make install
ixgbe.ko will be installed in the following location.
At this point, the compiled driver will be loaded automatically upon boot, or you can load it by running:
$ sudo modprobe ixgbe
$ sudo modinfo ixgbe
Reboot your machine once again and you are good to go with the new stock kernel installed.