Install the latest hardware drivers from ELRepo on CentOS

2 minute read

If you build a PC using the latest motherboard and try to install CentOS, you may have trouble because there is no driver.

For example, the other day I assembled a PC with ASRock’s Z490M-ITX / ac and installed CentOS 7, but I had a hard time because the latest driver of Intel’s e1000e and the driver of NIC of Realtek’s 8125 2.5GbE Controller were not included. did.

It is good to compile the driver from the source code provided by the manufacturer, but considering that it will be moss in compilation and follow the driver version upgrade, I would like to be able to upgrade automatically.

  • If you can use WiFi, connect to the network once with WiFi
  • Temporarily add an old NIC supported by CentOS

It is convenient to install the driver from ELRepo with the network connected.

What is EL Repo

ELRepo is an RPM repository for enterprise Linux packages.
It is an abbreviation for Enterprise Linux Repository.
It supports Red Hat Enterprise Linux (RHEL) and its derivative distributions (Scientific Linux, CentOS, etc.).

ELRepo is said to consist of five members working in the RHEL, CentOS and Scientifc Linux communities.

  • Alan Bartlett (aka burakkucat)
  • Phil Perry (aka pperry)
  • Stephen Tindall
  • Dag Wieers
  • Akemi Yagi (aka toracat)

A Japanese person named Yagi Akemi is also participating.

Usage procedure

Public key installation

First, import the public key.

$ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

When installing on a system with Secure Boot enabled

If you want to use the ELRepo kernel module on a system with Secure Boot enabled, you need to add the ELRepo Secure Boot public key to the MOK (Machine Owner Key) list.

For this method, refer to the original SecureBootKey.

Install ELRepo

RHEL8、CentOS8

$ sudo yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm

RHEL7、Scientific Linux7、CentOS7

$ sudo yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm

With this alone, it will be installed from the original server, and it will take time to download.
Also execute the following command so that you can use the mirror.

$ sudo install yum-plugin-fastestmirror

RHEL6、Scientific Linux6、CentOS6

$ sudo yum install https://www.elrepo.org/elrepo-release-6.el6.elrepo.noarch.rpm

With this alone, it will be installed from the original server, and it will take time to download.
Also execute the following command so that you can use the mirror.

$ sudo install yum-plugin-fastestmirror

List of supported hardware drivers

You can find out what kind of hardware drivers are in the repository at Package on the original website.

Driver installation

On the main channel, el repo, it seems that it does not batting with the driver recorded in the distribution.
Be sure to do a yum update before using the repository.

$ sudo yum update

Then install the driver you want to install.
For example, with Intel’s e1000e

$ sudo yum install kmod-e1000e

With Realtek8125 2.5GbE Controller

$ sudo yum install kmod-r8125

Of course, please read the instruction manual of the motherboard to confirm the product number of the NIC you want to use in advance.

Depending on the installed packages and repository settings, you may need to disable repositories other than elrepo.

$ sudo yum --disablerepo=\* --enablerepo=elrepo install kmod-nvidia