Avoiding the missing driver landmines before installing CentOS 8

Issues related to applications and software problems and general support
Post Reply
mathog
Posts: 226
Joined: 2008/07/09 23:52:06

Avoiding the missing driver landmines before installing CentOS 8

Post by mathog » 2020/09/16 19:36:45

CentOS 8 (CO8) has dropped support for many older storage controllers. When one attempts to install CO8 on one of these systems the installer will eventually declare that it cannot find any storage devices. Many of these drivers are provided by ElRepo. Ideally one would figure out which driver(s) are needed before doing the install. I have been working on this off and on for months now and have a solution.

This is how to do it:

1. Download the scripts and data files from sourceforge into /tmp. It will always be the most recent .tar.gz here:

https://sourceforge.net/projects/pci-ids-info/files/

2. Unpack. At present this will make /tmp/pci-ids-info-1.0.1
3. cd /tmp/pci-ids-info-1.0.1
4. Run the following, its output immediately follows the command. (All examples are from an IBM System x3455-[7984AC1]-/7984
currently running Ubuntu 18.04.04.)

Code: Select all

./elrepo_driver_for_missing_centos8.pl elrepo_module_pci_info.txt CO8_installer
#Checking this machine for drivers missing from CentOS 8 but present in ElRepo
#Getting PCI IDs and long device names from lspci
#Getting PCI Device ID to kernel module mappings from elrepo_module_pci_info.txt
#Getting PCI Device ID to kernel module mappings from CO8_installer.modules.alias
#Checking PCI IDs and PCI Device IDs from lspci -n, listing only those uniquely in ElRepo:
#pci_id dev_id driver RPM description
03:00.0 1095:3132 sata_sil24 kmod-sata_sil24-1.1-1.el8_2.elrepo.x86_64.rpm "Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)"
#Done
5. Go to the elrepo site and find the corresponding dud entry. Then when the installation is attempted add this to the kernel parameters:

Code: Select all

  inst.dd=https://elrepo.org/linux/dud/el8/x86_64/dd-sata_sil24-1.1-1.el8_2.elrepo.iso
If that does not work, for instance because the network will not work, put the file on a USB stick and just use

Code: Select all

  inst.dd
and it should be possible to complete the installation.

6. There might be other drivers which are required but which are not supplied by ElRepo. To check for that do:

Code: Select all

./map_hardware_to_drivers.pl PciIDsFile ""            >/tmp/mhtd_default.txt
./map_hardware_to_drivers.pl PciIDsFile CO8_installer >/tmp/mhtd_co8i.txt
./map_hardware_to_drivers.pl PciIDsFile CO8_kernel    >/tmp/mhtd_co8k.txt

diff /tmp/mhtd_default.txt /tmp/mhtd_co8k.txt
# Reading the diff:
# "<"        ">"         
# (modules)  <none>       Most likely device driver is not in CentOS 8 kernel
#                         There is no module.  It might be built in,
#                         but probably it is not.
# (builtin)  <none>       Most likely device driver is builtin to CentOS 8 kernel.
#                         There is no way to know since the needed 
#                         information is not in the modules.alias file.  
#                         These tend to be 8086:* devices like
#                         bridges and such.

diff /tmp/mhtd_default.txt /tmp/mhtd_co8i.txt
# As above, but some of the (modules)/<none> pairs might be
# supported if that driver is built into the installer's kernel.
# There is no way to determine if that is the case from
# the modules.alias file.
Ignoring the "close to the CPU" devices the diff for the installer on this test machine shows:

Code: Select all

< 01:0E.0 1166:024A sata_svw(module) "BCM5785 [HT1000] SATA (Native SATA Mode)"
---
> 01:0E.0 1166:024A <none> "BCM5785 [HT1000] SATA (Native SATA Mode)"
32c33
< 03:00.0 1095:3132 sata_sil24(module) "SiI 3132 Serial ATA Raid II Controller"
---
> 03:00.0 1095:3132 <none> "SiI 3132 Serial ATA Raid II Controller"
So the test machine is actually missing two sata drivers, and only one of these is available from ElRepo. If the only controller had been the one needing the sata_svw driver it would not have been possible to install CentOS 8 on this machine with the help of ElRepo packages. The other controller was probably intended to control a CDROM or DVD, but this unit does not have one.

--------

How it all works and why this is so tricky...

The first parameter in the elrepo_driver_for_missing_centos8.pl script is a file containing driver/PCI information derived by downloading and unpacking every driver in an ElRepo mirror for CentOS 8_2. The script that makes that file is

Code: Select all

process_elrepo.sh
which is hardwired to use the OSU mirror. ElRepo also provides a DeviceIDsFile on their web site. However, for at least 6 months this has been out of sync with the actual drivers. An older version of this script uses the web file, but it gives the wrong answers, because the file does not match the drivers, and because the older script just lists all matching drivers, not just the drivers for devices which are not already covered by CO8 drivers:

Code: Select all

./elrepo_driver_for_centos8.pl DeviceIDsFile
#Checking this machine for drivers missing from CentOS 8 but present in ElRepo
#Getting Device ID list from http://elrepo.org/tiki/DeviceIDs
#Getting pci IDs and long names from lspci
#Checking pci and device IDs from lspci -n, listing only those in ElRepo
#pci_id dev_id    driver type description
00:02.1 1166:0214 kmod-pata pci "IDE interface: Broadcom BCM5785 [HT1000] IDE"
02:01.0 14E4:1648 kmod-tg3 pci "Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5704 Gigabit Ethernet (rev 10)"
02:01.1 14E4:1648 kmod-tg3 pci "Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5704 Gigabit Ethernet (rev 10)"
06:00.0 8086:10B9 kmod-e1000e pci "Ethernet controller: Intel Corporation 82572EI Gigabit Ethernet Controller (Copper) (rev 06)"
#Done
In this instance none of these drivers are currently available in ElRepo even though they are listed in the file, and the one which is needed and available, sata_sil24, wasn't listed in the file.

The map_hardware_to_drivers.pl script lists PCI devices and their drivers. When it is used with the running kernel as a target it can determine if the driver is a module or builtin using information in /sys. Sometimes. Some drivers do not show up in either /sys or modules.alias. This is usually the case for bridges and devices "close to the CPU" like memory controllers. Example:

Code: Select all

./map_hardware_to_drivers.pl PciIDsFile ""
#Checking this machine for drivers
#Getting module list from /sys/bus/pci/drivers
#Getting PCI IDs to builtin driver mappings from /sys/bus/pci/drivers
#Getting PCI Device ID to kernel module mappings from /lib/modules/4.15.0-88-generic/modules.alias
#Summarize PCI and PCI Device IDs and drivers for "lspci -n" entries.
#pci_id dev_id    driver(type) description
00:01.0 1166:0036 <none> "BCM5785 [HT1000] PCI/PCI-X Bridge"
00:02.0 1166:0205 i2c_piix4(module) "BCM5785 [HT1000] Legacy South Bridge"
00:02.1 1166:0214 pata_serverworks(module) "BCM5785 [HT1000] IDE"
00:02.2 1166:0234 <none> "BCM5785 [HT1000] LPC"
00:03.0 1166:0223 ohci-pci(builtin) "BCM5785 [HT1000] USB"
00:03.1 1166:0223 ohci-pci(builtin) "BCM5785 [HT1000] USB"
00:03.2 1166:0223 ehci-pci(builtin) "BCM5785 [HT1000] USB"
00:05.0 1002:515E radeonfb(module) "ES1000"
00:06.0 1166:0140 pcieport(builtin) "HT2100 PCI-Express Bridge"
00:07.0 1166:0142 pcieport(builtin) "HT2100 PCI-Express Bridge"
00:08.0 1166:0144 pcieport(builtin) "HT2100 PCI-Express Bridge"
00:09.0 1166:0142 pcieport(builtin) "HT2100 PCI-Express Bridge"
00:0A.0 1166:0144 pcieport(builtin) "HT2100 PCI-Express Bridge"
00:18.0 1022:1100 <none> "K8 [Athlon64/Opteron] HyperTransport Technology Configuration"
00:18.1 1022:1101 <none> "K8 [Athlon64/Opteron] Address Map"
00:18.2 1022:1102 <none> "K8 [Athlon64/Opteron] DRAM Controller"
00:18.3 1022:1103 k8temp(module) "K8 [Athlon64/Opteron] Miscellaneous Control"
00:19.0 1022:1100 <none> "K8 [Athlon64/Opteron] HyperTransport Technology Configuration"
00:19.1 1022:1101 <none> "K8 [Athlon64/Opteron] Address Map"
00:19.2 1022:1102 <none> "K8 [Athlon64/Opteron] DRAM Controller"
00:19.3 1022:1103 k8temp(module) "K8 [Athlon64/Opteron] Miscellaneous Control"
01:0D.0 1166:0104 <none> "BCM5785 [HT1000] PCI/PCI-X Bridge"
01:0E.0 1166:024A sata_svw(module) "BCM5785 [HT1000] SATA (Native SATA Mode)"
02:01.0 14E4:1648 tg3(module) "NetXtreme BCM5704 Gigabit Ethernet"
02:01.1 14E4:1648 tg3(module) "NetXtreme BCM5704 Gigabit Ethernet"
03:00.0 1095:3132 sata_sil24(module) "SiI 3132 Serial ATA Raid II Controller"
06:00.0 8086:10B9 e1000e(module) "82572EI Gigabit Ethernet Controller (Copper)"
#Done

I hope people find this code useful (and realize they need it before they run into a failed install!)

Post Reply

Return to “CentOS 8 - General Support”