hardware check script before install 8?

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

hardware check script before install 8?

Post by mathog » 2020/03/05 00:29:20

Red Hat removed a lot of devices for RHEL 8, listed in a not easy to parse format here:

https://access.redhat.com/documentation ... enablement

Is there by any chance the opposite list for CentOS available? That is, a list of all devices which ARE supported, preferably along with some script that can be run on an existing linux system that checks the output of lspci/lspci -n against that list and notes problems.

It looks like RH dropped:

Code: Select all

03:00.0 RAID bus controller: Broadcom / LSI MegaRAID SAS 1078 (rev 04)
03:00.0 0104: 1000:0060 (rev 04)
which is

Code: Select all

SAS1078R, PCI ID 0x1000:0x0060 

That is a PERC 6/i adapter, and it lives in a Dell server which is I think about 7 years old. Yes, I know there is ElRepo and they do support that, but installing onto a machine when the kernel in the installer cannot see the storage controller is not my idea of a good time!

What is RH playing at here? That isn't exactly a new machine, but neither is it such an antique that most businesses would stop using it.

Thanks.
Last edited by mathog on 2020/03/19 00:15:08, edited 2 times in total.

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: hardware check script before install 8?

Post by pjwelsh » 2020/03/09 17:18:59

No script I know. However, previously from a @toracat post (viewtopic.php?t=71862):
Please take a look at the known issues section of CentOS 8 Release Notes. The centosplus kernel (kernel-plus) has support for some of the drivers removed in 8. But you need to use the driver update disk from ELRepo to do the initial installation.

mathog
Posts: 258
Joined: 2008/07/09 23:52:06

Re: hardware check script before install 8?

Post by mathog » 2020/03/10 22:34:49

The perl and sh scripts at the end of this post seems to work on both CentOS 7 and Ubuntu 18.04 LTS to list drivers missing from the normal CentOS 8 kernels. (The latter is much slower.) Please let me know if you encounter problems with it.

Example run on an IBM x3455 7984

Code: Select all

 find_centos8_needs_elrepo.pl -
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
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
Example run on a Dell PowerEdge T310

Code: Select all

find_centos8_needs_elrepo.pl - 
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
02:00.0 14E4:163B kmod-bnx2 pci Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM5716 Gigabit Ethernet (rev 20)
02:00.1 14E4:163B kmod-bnx2 pci Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM5716 Gigabit Ethernet (rev 20)
03:00.0 1000:0060 kmod-megaraid_sas pci RAID bus controller: Broadcom / LSI MegaRAID SAS 1078 (rev 04)
06:08.0 1000:0030 kmod-mptspi pci SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev c1)
Done
Example run on a Dell PowerEdge T630

Code: Select all

find_centos8_needs_elrepo.pl -
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
01:00.0 8086:1521 kmod-igb pci Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
01:00.1 8086:1521 kmod-igb pci Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
03:00.0 1000:005D kmod-megaraid_sas pci RAID bus controller: Broadcom / LSI MegaRAID SAS-3 3108 [Invader] (rev 02)
82:00.0 8086:1521 kmod-igb pci Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
82:00.1 8086:1521 kmod-igb pci Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
Done
Apparently CentOS 8's default kernel is missing key drivers on every single machine I use, notably the storage and ethernet drivers. So only the most dispensable pieces /s. Thanks a lot Red Hat!

Code: Select all

#!/usr/bin/perl
#Name:    find_centos8_needs_elrepo.pl
#version: 1.0.0
#Date:    2020-03-10
#Author:  David Mathog
#
#  list any ElRepo drivers needed to install CentOS 8 on this system
#
#  assumes wget, lspci, and access to the internet are both available
#  If access is not available specify one parameter to the already downloaded
#  file.
#
#
use strict;
use warnings;
my $IDLIST="http://elrepo.org/tiki/DeviceIDs";
my %id_hash_driver;
my %id_hash_type;
my %pci_hash_longname;
my $count=0;
my $real_filename="/tmp/fcne_DeviceIDsFile";

my $num_args = $#ARGV;
if ($num_args != 0) {
    print 
     "Usage: find_centos8_needs_elrepo.pl DeviceIDsFile\n\n",
     "If internet access is available let DeviceIDsFile = \"-\" and it will be downloaded\n",
     "automatically.  Otherwise on some machine do:\n\n",
     "   wget -O DeviceIDsFile $IDLIST\n\n",
     "Then copy that file by some means to the target and specify\n",
     "the file name on the command line.\n";
    exit;
}
my $filename=$ARGV[0];



if($filename eq '-'){
   my $messages = `wget -q -O $real_filename $IDLIST 2>/dev/null`;
   if($messages){
      print
        "Some problem running:\n\n",
        "  wget -q -O $real_filename 2>/dev/null\n\n",
	"returned:\n",
	"$messages\n";
      exit;
   }
}
else {
   $real_filename = $filename;
}

open(FH, $real_filename) or die "could not open file $real_filename";

print "Checking this machine for drivers missing from CentOS 8 but present in ElRepo\n";
print "Getting Device ID list from $IDLIST\n";
while (my $line = <FH>){
    chomp $line;
    if($line =~ /\skmod-/){
       my ($dev_type, $dev_id, $dev_driver) = split(/\s+/,$line);
       $dev_id = uc $dev_id;
       $id_hash_driver{$dev_id}=$dev_driver;
       $id_hash_type{$dev_id}=$dev_type;
    }
}
close(FH);

print "Getting pci IDs and long names from lspci\n";
foreach my $line (`lspci`){
    chomp $line;
    my $starts = index($line," ");
    my $pci_id = uc substr($line,0,$starts);
    my $ln = substr($line,$starts+1);
    $pci_hash_longname{$pci_id}=$ln;
}

print "Checking pci and device IDs from lspci -n, listing only those in ElRepo\n";
foreach my $line (`lspci -n`){
    chomp $line;
    my ($pci_id, $ignore, $dev_id)= split /\s/,$line;
    $dev_id = uc $dev_id;
    if(defined($id_hash_driver{$dev_id})){
       $count++;
       print "$pci_id $dev_id $id_hash_driver{$dev_id} $id_hash_type{$dev_id} $pci_hash_longname{$pci_id}\n";
    }
}
if(!$count){
   print "none found\n";
}
if($filename eq "-"){
   unlink($real_filename);
}
print "Done\n";
Here is another version which uses /bin/sh instead of perl. It is much slower but may be able to run in busybox or other similar limited environment, so long as /tmp is present and lscpi is also present.

Code: Select all

#!/bin/sh
#Name:    find_centos8_needs_elrepo.sh
#version: 1.0.0
#Date:    2020-03-17
#Author:  David Mathog
#
#  list any ElRepo drivers needed to install CentOS 8 on this system
#
#  assumes wget, lspci, and access to the internet are available
#  If access is not available specify one parameter to the already downloaded
#  file.
#
#  Derived from find_centos8_needs_elreop.pl.  Instead of using hashes it makes file
#  names under /tmp/fcne_tmp.  Slower than the perl version but should be able to run
#  even under busybox, assuming lscpi is also present.
#
IDLIST="http://elrepo.org/tiki/DeviceIDs"
count=0
real_filename="/tmp/fcne_DeviceIDsFile"
tmpdir="/tmp/fcne_tmp"
id_hash_type="$tmpdir/id_hash_type"
id_hash_driver="$tmpdir/id_hash_driver"
pci_hash_longname="$tmpdir/pci_hash_longname"

if [ $# != 1 ]
then
     echo "Usage: find_centos8_needs_elrepo.sh DeviceIDsFile"
     echo ""
     echo "If internet access is available let DeviceIDsFile = \"-\" and it will be downloaded"
     echo "automatically.  Otherwise on some machine do:"
     echo ""
     echo "   wget -O DeviceIDsFile $IDLIST"
     echo ""
     echo "Then copy that file by some means to the target and specify"
     echo "the file name on the command line."
     exit
fi
filename=$1;


if [ "$filename" = "-" ]
then
   wmessages=`wget -q -O $real_filename $IDLIST 2>/dev/null`
   if [ $wmessages ]
   then
      echo "Some problem running:"
      echo ""
      echo   "  wget -q -O $real_filename 2>/dev/null"
      echo ""
      echo "returned:"
      echo "$wmessages"
      exit;
   fi
else
   real_filename=$filename;
fi

if [ -d $tmpdir ]
then
   rm -rf $tmpdir
fi
mkdir -p $tmpdir
mkdir -p $id_hash_type
mkdir -p $id_hash_driver
mkdir -p $pci_hash_longname

echo "Checking this machine for drivers missing from CentOS 8 but present in ElRepo"
echo "Getting Device ID list from $IDLIST"
#avoid arrays so this can work with ash, sh, bash
grep '[[:blank:]]kmod-' $real_filename | tr -d '\r' | while read line;
do
  dev_type=`echo $line | cut -d ' ' -f1`
  dev_id=`echo $line | cut -d ' ' -f2`
  dev_driver=`echo $line | cut -d ' ' -f3`
  echo -n $dev_type   > $id_hash_type/$dev_id
  echo -n $dev_driver > $id_hash_driver/$dev_id
done

echo "Getting pci IDs and long names from lspci"
lspci | while read line;
do
  pci_id=`echo $line | cut -d ' ' -f1 | tr '[:lower:]' '[:upper:]'`
  ln=`echo $line | cut -d ' ' -f2-`
  dev_driver=`echo $line | awk '{ print $3 }'`
  echo -n $ln   > $pci_hash_longname/$pci_id
done

echo "Checking pci and device IDs from lspci -n, listing only those in ElRepo"
lspci -n | while read line;
do
  pci_id=`echo $line | cut -d ' ' -f1 | tr '[:lower:]' '[:upper:]'`
  dev_id=`echo $line | cut -d ' ' -f3 | tr '[:lower:]' '[:upper:]'`
  if [ -f $id_hash_driver/$dev_id ]
  then
     count=`expr $count + 1`
     ihd=`cat $id_hash_driver/$dev_id`
     iht=`cat $id_hash_type/$dev_id`
     phl=`cat $pci_hash_longname/$pci_id`
     echo "$pci_id $dev_id $ihd $iht $phl"
  fi
done

if [ ! $count ]
then
   echo "none found"
fi

#clean up
if [ "$filename" = "-" ]
then
   rm -f $real_filename
fi
rm -rf $tmpdir

echo "Done"

edit: minor change in perl script, added sh script.
Last edited by mathog on 2020/03/17 20:29:45, edited 3 times in total.

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: hardware check script before install 8? [SOLVED]

Post by pjwelsh » 2020/03/12 15:22:59

IIRC the T630 and R630 are extremely similar except for form factor... my R630 has not had any CentOS issues I know. I stock installed via on-board daughter card and then "upgrade" later to a kernel-ml version. I have the "LSI MegaRAID SAS-3 3108" you show as missing, also.

I've not gone as far back as a Dell xx10 series with CentOS 8 (I have some but they are waiting for recycle).

mathog
Posts: 258
Joined: 2008/07/09 23:52:06

Re: hardware check script before install 8?

Post by mathog » 2020/03/12 18:50:40

pjwelsh wrote:
2020/03/12 15:22:59
IIRC the T630 and R630 are extremely similar except for form factor... my R630 has not had any CentOS issues I know. I stock installed via on-board daughter card and then "upgrade" later to a kernel-ml version. I have the "LSI MegaRAID SAS-3 3108" you show as missing, also.
There was no problem installing CentOS 7 on our T630, but it looks like CentOS 8 will be a challenge. All installed disks are controlled by the MegaRAID device (other than when a USB key is plugged in). There is a DVD drive. The network would (apparently) not be supported by CentOS 8 and presumably also the installer.

I need to take the installer apart, perhaps it has more drivers than the final operating system?

On your CentOS 8 R630:
What device specifically are you referring to as the "on-board daughter card"?
Which PCI ID and driver correspond to "LSI MegaRAID SAS-3 3108" on that system?
Where did the driver for it come from?
Last edited by mathog on 2020/03/19 00:17:35, edited 1 time in total.

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: hardware check script before install 8? [SOLVED]

Post by pjwelsh » 2020/03/17 13:03:33

Apologies for the slow response.
Daughter card is:
01:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
01:00.1 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01)
06:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
06:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
10GB ports are ixgbe driver
1gb ports are igb

02:00.0 RAID bus controller: Broadcom / LSI MegaRAID SAS-3 3108 [Invader] (rev 02)
megaraid_sas is the driver according to a quick "lspci -nk|grep -A2 02:00" on that system:
Kernel driver in use: megaraid_sas

Choosing to run the kernel-ml from the elrepo folks ATM. Originally ran just stock kernel. NVME performance was the primary reason for change (based on past performance number).

mathog
Posts: 258
Joined: 2008/07/09 23:52:06

Re: hardware check script before install 8?

Post by mathog » 2020/03/17 21:02:00

I still don't understand how that worked. Sounds like you network booted the installer using one of those four network interfaces. But ElRepo has drivers for:

Code: Select all

8086  Intel Corporation
	1521  I350 Gigabit Network Connection
	1528  Ethernet Controller 10-Gigabit X540-AT2
1000  Broadcom / LSI
	005d  MegaRAID SAS-3 3108 [Invader]
Perhaps some of the ElRepo drivers overlap with the ones in CentOS 8? Looking here:

https://access.redhat.com/documentation ... enablement

It does not list any of the corresponding devices. So why would these drivers be in ElRepo if they are already in CentOS 8? Oh, I think I see the problem. ElRepo needs the megaraid_sas driver for "SAS1078DE, PCI ID 0x1000:0x007C " which has been removed. However the same driver also works with 1000:005D. In their "http://elrepo.org/tiki/DeviceIDs" file it lists the megaraid_driver as working with (leaving many out):

Code: Select all

pci     1000:007C       kmod-megaraid_sas
pci     1000:0060       kmod-megaraid_sas
pci     1000:0411       kmod-megaraid_sas
pci     1000:0413       kmod-megaraid_sas
which have been removed, but also

Code: Select all

pci     1000:005D       kmod-megaraid_sas
which has not been removed. So, bottom line, the information in DeviceIDs is insufficient to determine which ElRepo drivers are actually needed, it only shows those which will work. Looks like I need to also parse the Red Hat page. That is unfortunate since its format is complex.

Edit. Removed the SOLVED for now.
Last edited by mathog on 2020/03/19 00:16:56, edited 2 times in total.

pjwelsh
Posts: 2632
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: hardware check script before install 8? [SOLVED]

Post by pjwelsh » 2020/03/18 13:17:39

Yes, we PXE install all of our systems. Good spotting! I know whom to come too for device ID information and tracking :)

Post Reply