- Chapter 13. Updating drivers during installation
- 13.1. Overview
- 13.2. Types of driver update
- 13.3. Preparing a driver update
- 13.4. Performing an automatic driver update
- 13.5. Performing an assisted driver update
- 13.6. Performing a manual driver update
- 13.7. Disabling a driver
- How to install a device driver on Linux
- Two approaches to finding drivers
- 1. User interfaces
- 2. Command line
- Check if a driver is already installed
- Add the repository and install
- For more information
Chapter 13. Updating drivers during installation
This section describes how to complete a driver update during the Red Hat Enterprise Linux installation process.
This is an optional step of the installation process. Red Hat recommends that you do not perform a driver update unless it is necessary.
Prerequisites
- You have been notified by Red Hat, your hardware vendor, or a trusted third-party vendor that a driver update is required during Red Hat Enterprise Linux installation.
13.1. Overview
Red Hat Enterprise Linux supports drivers for many hardware devices but some newly-released drivers may not be supported. A driver update should only be performed if an unsupported driver prevents the installation from completing. Updating drivers during installation is typically only required to support a particular configuration. For example, installing drivers for a storage adapter card that provides access to your system’s storage devices.
Driver update disks may disable conflicting kernel drivers. In rare cases, unloading a kernel module may cause installation errors.
13.2. Types of driver update
Red Hat, your hardware vendor, or a trusted third party provides the driver update as an ISO image file. Once you receive the ISO image file, choose the type of driver update.
Types of driver update
Automatic The recommended driver update method; a storage device (including a CD, DVD, or USB flash drive) labeled OEMDRV is physically connected to the system. If the OEMDRV storage device is present when the installation starts, it is treated as a driver update disk, and the installation program automatically loads its drivers. Assisted The installation program prompts you to locate a driver update. You can use any local storage device with a label other than OEMDRV . The inst.dd boot option is specified when starting the installation. If you use this option without any parameters, the installation program displays all of the storage devices connected to the system, and prompts you to select a device that contains a driver update. Manual Manually specify a path to a driver update image or an RPM package. You can use any local storage device with a label other than OEMDRV , or a network location accessible from the installation system. The inst.dd=location boot option is specified when starting the installation, where location is the path to a driver update disk or ISO image. When you specify this option, the installation program attempts to load any driver updates found at the specified location. With manual driver updates, you can specify local storage devices, or a network location (HTTP, HTTPS or FTP server).
- You can use both inst.dd=location and inst.dd simultaneously, where location is the path to a driver update disk or ISO image. In this scenario, the installation program attempts to load any available driver updates from the location and also prompts you to select a device that contains the driver update.
- Initialize the network using the ip= option when loading a driver update from a network location.
Limitations
On UEFI systems with the Secure Boot technology enabled, all drivers must be signed with a valid certificate. Red Hat drivers are signed by one of Red Hat’s private keys and authenticated by its corresponding public key in the kernel. If you load additional, separate drivers, verify that they are signed.
13.3. Preparing a driver update
This procedure describes how to prepare a driver update on a CD and DVD.
Prerequisites
- You have received the driver update ISO image from Red Hat, your hardware vendor, or a trusted third-party vendor.
- You have burned the driver update ISO image to a CD or DVD.
If only a single ISO image file ending in .iso is available on the CD or DVD, the burn process has not been successful. See your system’s burning software documentation for instructions on how to burn ISO images to a CD or DVD.
- Insert the driver update CD or DVD into your system’s CD/DVD drive, and browse it using the system’s file manager tool.
- Verify that a single file rhdd3 is available. rhdd3 is a signature file that contains the driver description and a directory named rpms , which contains the RPM packages with the actual drivers for various architectures.
13.4. Performing an automatic driver update
This procedure describes how to perform an automatic driver update during installation.
Prerequisites
- You have placed the driver update image on a standard disk partition with an OEMDRV label or burnt the OEMDRV driver update image to a CD or DVD. Advanced storage, such as RAID or LVM volumes, may not be accessible during the driver update process.
- You have connected a block device with an OEMDRV volume label to your system, or inserted the prepared CD or DVD into your system’s CD/DVD drive before starting the installation process.
- When you complete the prerequisite steps, the drivers load automatically when the installation program starts and installs during the system’s installation process.
13.5. Performing an assisted driver update
This procedure describes how to perform an assisted driver update during installation.
Prerequisites
- You have connected a block device without an OEMDRV volume label to your system and copied the driver disk image to this device, or you have prepared a driver update CD or DVD and inserted it into your system’s CD or DVD drive before starting the installation process.
If you burned an ISO image file to a CD or DVD but it does not have the OEMDRV volume label, you can use the inst.dd option with no arguments. The installation program provides an option to scan and select drivers from the CD or DVD. In this scenario, the installation program does not prompt you to select a driver update ISO image. Another scenario is to use the CD or DVD with the inst.dd=location boot option; this allows the installation program to automatically scan the CD or DVD for driver updates. For more information, see Performing a manual driver update.
- From the boot menu window, press the Tab key on your keyboard to display the boot command line.
- Append the inst.dd boot option to the command line and press Enter to execute the boot process.
- From the menu, select a local disk partition or a CD or DVD device. The installation program scans for ISO files, or driver update RPM packages.
- Optional: Select the driver update ISO file.
This step is not required if the selected device or partition contains driver update RPM packages rather than an ISO image file, for example, an optical drive containing a driver update CD or DVD.
- Use the number keys on your keyboard to toggle the driver selection.
- Press c to install the selected driver. The selected driver is loaded and the installation process starts.
13.6. Performing a manual driver update
This procedure describes how to perform a manual driver update during installation.
Prerequisites
- You have placed the driver update ISO image file on a USB flash drive or a web server and connected it to your computer.
- From the boot menu window, press the Tab key on your keyboard to display the boot command line.
- Append the inst.dd=location boot option to the command line, where location is a path to the driver update. Typically, the image file is located on a web server, for example, http://server.example.com/dd.iso, or on a USB flash drive, for example, /dev/sdb1 . It is also possible to specify an RPM package containing the driver update, for example http://server.example.com/dd.rpm.
- Press Enter to execute the boot process. The drivers available at the specified location are automatically loaded and the installation process starts.
Additional resources
13.7. Disabling a driver
This procedure describes how to disable a malfunctioning driver.
Prerequisites
- From the boot menu, press the Tab key on your keyboard to display the boot command line.
- Append the modprobe.blacklist=driver_name boot option to the command line.
- Replace driver_name with the name of the driver or drivers you want to disable, for example:
How to install a device driver on Linux
One of the most daunting challenges for people switching from a familiar Windows or MacOS system to Linux is installing and configuring a driver. This is understandable, as Windows and MacOS have mechanisms that make this process user-friendly. For example, when you plug in a new piece of hardware, Windows automatically detects it and shows a pop-up window asking if you want to continue with the driver’s installation. You can also download a driver from the internet, then just double-click it to run a wizard or import the driver through Device Manager.
This process isn’t as easy on a Linux operating system. For one reason, Linux is an open source operating system, so there are hundreds of Linux distribution variations. This means it’s impossible to create one how-to guide that works for all Linux distros. Each Linux operating system handles the driver installation process a different way.
Second, most default Linux drivers are open source and integrated into the system, which makes installing any drivers that are not included quite complicated, even though most hardware devices can be automatically detected. Third, license policies vary among the different Linux distributions. For example, Fedora prohibits including drivers that are proprietary, legally encumbered, or that violate US laws. And Ubuntu asks users to avoid using proprietary or closed hardware.
To learn more about how Linux drivers work, I recommend reading An Introduction to Device Drivers in the book Linux Device Drivers.
Two approaches to finding drivers
1. User interfaces
If you are new to Linux and coming from the Windows or MacOS world, you’ll be glad to know that Linux offers ways to see whether a driver is available through wizard-like programs. Ubuntu offers the Additional Drivers option. Other Linux distributions provide helper programs, like Package Manager for GNOME, that you can check for available drivers.
2. Command line
What if you can’t find a driver through your nice user interface application? Or you only have access through the shell with no graphic interface whatsoever? Maybe you’ve even decided to expand your skills by using a console. You have two options:
- Use a repository
This is similar to the homebrew command in MacOS. By using yum, dnf, apt-get, etc., you’re basically adding a repository and updating the package cache.
- Download, compile, and build it yourself
This usually involves downloading a package directly from a website or using the wget command and running the configuration file and Makefile to install it. This is beyond the scope of this article, but you should be able to find online guides if you choose to go this route.
Check if a driver is already installed
Before jumping further into installing a driver in Linux, let’s look at some commands that will determine whether the driver is already available on your system.
The lspci command shows detailed information about all PCI buses and devices on the system:
Or with grep:
$ lscpci | grep SOME_DRIVER_KEYWORD
For example, you can type lspci | grep SAMSUNG if you want to know if a Samsung driver is installed.
The dmesg command shows all device drivers recognized by the kernel:
Or with grep:
$ dmesg | grep SOME_DRIVER_KEYWORD
Any driver that’s recognized will show in the results.
If nothing is recognized by the dmesg or lscpi commands, try these two commands to see if the driver is at least loaded on the disk:
Tip: As with lspci or dmesg, append | grep to either command above to filter the results.
If a driver is recognized by those commands but not by lscpi or dmesg, it means the driver is on the disk but not in the kernel. In this case, load the module with the modprobe command:
$ sudo modprobe MODULE_NAME
Run as this command as sudo since this module must be installed as a root user.
Add the repository and install
There are different ways to add the repository through yum, dnf, and apt-get; describing them all is beyond the scope of this article. To make it simple, this example will use apt-get, but the idea is similar for the other options.
1. Delete the existing repository, if it exists.
$ sudo apt-get purge NAME_OF_DRIVER*
where NAME_OF_DRIVER is the probable name of your driver. You can also add pattern match to your regular expression to filter further.
2. Add the repository to the repolist, which should be specified in the driver guide.
$ sudo add-apt-repository REPOLIST_OF_DRIVER
where REPOLIST_OF_DRIVER should be specified from the driver documentation (e.g., epel-list).
3. Update the repository list.
4. Install the package.
$ sudo apt-get install NAME_OF_DRIVER
5. Check the installation.
Run the lscpi command (as above) to check that the driver was installed successfully.
For more information
This article was originally published on Opensource.com.