Physical machines running Linux still exists for various reasons like applications performance is not optimal in a virtual machine just to mention one example but many others reasons can exist.
This post shows steps to get your Intel NIC driver to latest version available on Linux repo or Intel website.
In my case I had a CentOS7 with Intel NIC and needed to run latest driver to resolve known errors.
Ways to accomplish this driver update are
Use ‘ELRepo Project’ RPM repository
Using ELRepo to install the driver packaged with minimal intervention is the best way to achieve this quickly if desired driver version is available.
You can check the list of packages from your command line or browsing the files in the repo.
Open a terminal and run below commands to configure ELRepo
Import elrepo public key
# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# yum install https://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
Check ixgbe driver package info
# yum info kmod-ixgbe
Install ixgbe driver package
# yum install kmod-ixgbe
In case you want to check content of ELRepo before installing you can browse the repository content using this URL https://elrepo.org/linux/elrepo/ and search for package details.
In this example we are looking for latest Intel driver ixgbe and is available for download with this url https://elrepo.org/linux/elrepo/el7/x86_64/RPMS/kmod-ixgbe-5.6.3-1.el7_7.elrepo.x86_64.rpm
To browse the packages list and description open this URL and search the package
Download driver from Intel and compile the driver module
It may the case the driver version you need is unavailable in ELRepo or installation is failing.
Steps to compile and install the driver are
1. Download driver tar file
2. Change to the directory
# cd /tmp/
3. Untar/unzip the archive
# tar zxf ixgbe-<x.x.x>.tar.gz
4. Change to the driver src directory
# cd ixgbe-<x.x.x>/src/
5. Compile the driver module
# make install
6. Remove old driver module and load new one using the modprobe command
# rmmod ixgbe; modprobe ixgbe
7. Update initrd/initramfs to prevent the OS loading old versions
# dracut --force
Installation of kernel-devel package could be needed to run compile
# yum install kernel-devel
The binary will be installed as: /lib/modules//kernel/drivers/net/ixgbe/ixgbe.[k]o
The install location listed above is the default location. This may differ for various Linux distributions.
Once the driver is installed the initrd/initramfs file may need to be updated to prevent the OS loading old versions of the ixgbe driver. The dracut utility may be used on RedHat distributions:
You may want to install fs-snapshot plugin before installing updates with yum to be able to rollback changes on your filesystems if needed.
To achieve this you need to install and configure the plugin
yum-fs-snapshot(1) is a Yum plugin for taking snapshots of your filesystems before running a yum transaction. By default it will take a snapshot
of any filesystem that can be snapshotted, which currently is limited to BTRFS filesystems. However, all filesystems built on LVM logical volumes
may be snapshotted at the block level using LVM snapshots. LVM snapshot support is provided for the purpose of system rollback.
As such LVM snapshots will only be created if the kernel supports the "snapshot-merge" DM target.
# yum install yum-plugin-fs-snapshot
# vi /etc/yum/pluginconf.d/fs-snapshot.conf
# Example of /etc/yum/pluginconf.d/fs-snapshot.conf
enabled = 1
create_snapshots_in_post = 0
exclude = /home
enabled = 1
'lvcreate_size_args' option must specify the snapshot LV size using -L or -l
lvcreate_size_args = -l 25%ORIGIN