Installing a Main-line Kernel on Scientific Linux 6.4 or CentOS 7.2 64-bit

To install a main-line kernel kernel is as simple as putting in place the correct elrepo-release. See details at

Scientific Linux 6.x

  • yum install elrepo-release-6-4.el6
  • yum install elrepo-release.noarch
  • yum --enablerepo=elrepo-kernel install kernel-ml-devel

!CentOS 7.x

Get the following repo in place. It will come disabled so you need to use the --enablerepo option. Build and install Mellanox software on Scientific Linux 6.x
  • tar -zxvf MLNX_OFED_LINUX-3.4-
  • tar -zxvf mlnx-en-3.4-
To build the Mellanox Ethernet driver:
  • yum -y install createrepo
  • cd mlnx-en-3.4-
  • ./install --add-kernel-support
To build for a specific kernel version:

./install --add-kernel-support -k 4.8.11-1.el6.elrepo.x86_64 -s /lib/modules/4.8.11-1.el6.elrepo.x86_64/build

These are the 5 RPMs that get installed:

[root@umfs16 mlnx-en-3.4-]# rpm -qa | grep mlnx

  1. mlnx-fw-updater-3.4-
  2. mlnx-en-doc-3.4-
  3. mlnx-en-utils-3.4-
  4. mlnx_en-3.4-
  5. mlnx-en-sources-3.4-
Only the first 4 are required to run.

To install Mellanox OFED instead do:
  • yum -y install createrepo python-devel gcc-gfortran tk
  • cd MLNX_OFED_LINUX-3.4-
  • ./mlnxofedinstall --add-kernel-support
Build and Install Mellanox Software on CentOS 7.2
  • cd mlnx-en-3.4-
  • yum install createrepo gcc
  • ./install -k 4.8.7-1.el7.elrepo.x86_64 -s /usr/src/kernels/4.8.7-1.el7.elrepo.x86_64 --add-kernel-support
  • awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
  • grub2-set-default 0
  • grub2-editenv list
  • reboot

Install OpenAFS

First we need to get the most recent source RPM from I got 1.6.19


Install this and make sure you have all the components needed to build (See OS specific info below).

OpenAFS on SL6.x

I needed the following to get it built:

yum -y install pam-devel flex bison ncurses-devel autoconf automake fuse-devel krb5-devel perl-ExtUtils-Embed.x86_64

Then (as 'root') I ran:

rpm -Uvh openafs-1.6.19-1.src.rpm

rpmbuild -bb --define "build_userspace 1" --define "build_modules 1" SPECS/openafs.spec

NOTE: the above builds for the currently running kernel. I installed all the built RPMS except openafs-kpasswd since that is not needed when running Kerberos 5. The /usr/vice/etc/ThisCell needed to be updated to have '' instead of ''. On AGLT2 this should be handled by CFEngine.

The kernel specific build for the kmod looks like:

rpmbuild -bb --define "build_userspace 0" --define "build_modules 1" --define "kernvers 2.6.32-642.6.2.el6.x86_64" SPECS/openafs.spec

This gives us /root/rpmbuild/RPMS/x86_64/kmod-openafs-1.6.19-

And a debug RPM as well.

-- ShawnMcKee - 27 Nov 2016
Topic revision: r5 - 28 Nov 2016, ShawnMcKee
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback