[elrepo] kmod-sata_via module for CentOS7
Phil Perry
phil at elrepo.org
Tue Jul 20 12:26:15 EDT 2021
On 20/07/2021 16:19, Tristan Evans wrote:
> Hi all, sorry for my slow testing.
>
> I am running into an issue and I have a feeling it may be mostly due to
> my shallow understanding of how this all works.
>
> Part of my challenge is that although I can very slowly install CentOS
> from a USB stick using the CentOS 7 in-tree sata_via module, when
> installation finishes and the system tries to boot the OS, it fails
> (dropping to an emergency shell).
>
> To work around that, I thought what I'd do is create a DUD image with
> the new RPM and attempt to load it into the CentOS installation
> environment. I created the DUD and loaded it using the `inst.dd` option.
> It seemed to find it just fine and loaded Anaconda.
>
Sounds like you've done it yourself, but I can make yo a DUD image too
if needed.
> Sadly however, I noticed the same performance issue (see results of
> `hdparm` test below):
>
> [anaconda root at localhost ~]# hdparm -Tt /dev/sdc
> /dev/sdc:
> Timing cached reads: 250 MB in 2.00 seconds = 124.81 MB/sec
> Timing buffered disk reads: 4 MB in 3.09 seconds = 1.30 MB/sec
>
Ouch, that's horrendous!
> So, I then wondered if perhaps the OS is still loading the in-tree
> sata_via module and I suspect that is the case:
>
> [anaconda root at localhost ~]# modinfo sata_via
> filename:
> /lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/ata/sata_via.ko.xz
Yes, if the elrepo driver is correctly installed, you should see:
/lib/modules/3.10.0-1160.31.1.el7.x86_64/extras/sata-via/sata_via.ko
as the reported path above (or weak-updates in place of extras for
kernel updates), so yes you are still using the distro driver.
> version: 2.6
> license: GPL
> description: SCSI low-level driver for VIA SATA controllers
> author: Jeff Garzik
> retpoline: Y
> rhelversion: 7.9
> srcversion: DF0359571E2253676A28950
> alias: pci:v00001106d00009000sv*sd*bc*sc*i*
> alias: pci:v00001106d00005287sv*sd*bc*sc*i*
> alias: pci:v00001106d00007372sv*sd*bc*sc*i*
> alias: pci:v00001106d00005372sv*sd*bc*sc*i*
> alias: pci:v00001106d00003249sv*sd*bc*sc*i*
> alias: pci:v00001106d00003149sv*sd*bc*sc*i*
> alias: pci:v00001106d00000591sv*sd*bc*sc*i*
> alias: pci:v00001106d00005337sv*sd*bc*sc*i*
> depends: libata
> intree: Y
> vermagic: 3.10.0-1160.el7.x86_64 SMP mod_unload modversions
> signer: CentOS Linux kernel signing key
> sig_key: E1:FD:B0:E2:A7:E8:61:A1:D1:CA:80:A2:3D:CF:0D:BA:3A:A4:AD:F5
> sig_hashalgo: sha256
>
> I tried digging for some logs related to the package, this is all I
> could find:
>
> [anaconda root at localhost tmp]# grep kmod *
> packaging.log:14:32:47,744 INFO packaging: DD: adding required package:
> kmod-sata_via
> packaging.log:14:32:50,827 DEBUG yum.verbose.YumBase: TSINFO: Marking
> kmod-20-28.el7.x86_64 as install for initscripts-9.49.53-1.el7.x86_64
> packaging.log:14:32:53,267 DEBUG yum.verbose.YumBase: TSINFO: Marking
> kmod-libs-20-28.el7.x86_64 as install for systemd-219-78.el7.x86_64
> packaging.log:14:32:54,067 DEBUG yum.verbose.YumBase: TSINFO: Marking
> binutils-2.27-44.base.el7.x86_64 as install for kmod-20-28.el7.x86_64
> syslog:14:29:22,979 DEBUG dd_list:found drivers: kmod-sata_via
> syslog:14:29:32,128 INFO Extracting:kmod-sata_via
> syslog:14:29:32,129 DEBUG dd_extract:extracting
> /media/DD-5/rpms/x86_64/kmod-sata_via-2.6-1.el7_9.elrepo.x86_64.rpm
> syslog:14:29:32,279 DEBUG journal:copying
> /media/DD-5/rpms/x86_64/kmod-sata_via-2.6-1.el7_9.elrepo.x86_64.rpm to
> /run/install/DD-1/.
>
> Checked the RPM DB to see if the package is installed (`rpm -qa | grep
> sata`), but it does not appear so.
>
> If I search for "sata_via" on the filesystem, this is all I find:
>
> [anaconda root at localhost tmp]# find / -name *sata_via*
> /sys/bus/pci/drivers/sata_via
> /sys/module/sata_via
> /sys/module/sata_via/drivers/pci:sata_via
> /sys/module/libata/holders/sata_via
> /usr/lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/ata/sata_via.ko.xz
> /usr/lib/modules/3.10.0-1160.el7.x86_64/extra/sata_via
^^ the path above tells me our kmod package has been (partially??)
installed, but where is the actual module? Something is not right.
> /usr/share/doc/kmod-sata_via-2.6
> /run/install/DD-1/kmod-sata_via-2.6-1.el7_9.elrepo.x86_64.rpm
>
> If I try to actually manually install the RPM, this is what I get:
>
> [anaconda root at localhost tmp]# rpm -i
> /run/install/DD-1/kmod-sata_via-2.6-1.el7_9.elrepo.x86_64.rpm
> warning: /run/install/DD-1/kmod-sata_via-2.6-1.el7_9.elrepo.x86_64.rpm:
> Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY
> error: Failed dependencies:
> /usr/sbin/depmod is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> /bin/sh is needed by kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(__dynamic_dev_dbg) = 0xc140ad72 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(__fentry__) = 0xbdfb6dbb is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(__pci_register_driver) = 0x99487493 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(__stack_chk_fail) = 0xf0fdf6cb is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(__x86_indirect_thunk_rax) = 0x2ea2c95c is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(_dev_info) = 0x4cce8b07 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(_raw_spin_lock_irqsave) = 0x9327f5ce is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(_raw_spin_unlock_irqrestore) = 0x08f64aa4 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_bmdma_interrupt) = 0xe818b32b is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_bmdma_irq_clear) = 0xaba843b9 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_bmdma_port_ops) = 0x5d6cb968 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_bmdma_start) = 0x9bdbfef7 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_common_sdev_attrs) = 0x6fed14b2 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_host_activate) = 0xdde5e365 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_host_alloc_pinfo) = 0xbe7a5488 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_host_resume) = 0x9d7dff3e is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_msleep) = 0xe62f30aa is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_pci_bmdma_prepare_host) = 0x9ccef4c7 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_pci_device_do_resume) = 0xf89a75fa is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_pci_device_suspend) = 0x2f1a8361 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_pci_remove_one) = 0x7cc0b9e9 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_port_freeze) = 0x1f635d72 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_port_pbar_desc) = 0xc126b784 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_port_printk) = 0xac202ca1 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_print_version) = 0x71cff295 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_scsi_ioctl) = 0x9f2e91a9 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_scsi_queuecmd) = 0x3da94ee3 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_scsi_slave_config) = 0xa3fc65c4 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_scsi_slave_destroy) = 0x2db8ca2f is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_scsi_unlock_native_capacity) = 0x680b4229 is needed
> by kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_sff_error_handler) = 0xea1bd58d is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_sff_pause) = 0x4d1f82ec is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_sff_std_ports) = 0x73a48b4a is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_sff_tf_load) = 0xcbf23c5c is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_sff_wait_ready) = 0xda256b15 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_slave_link_init) = 0x2a00d69b is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ata_std_bios_param) = 0xe99f1c8d is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(dev_err) = 0x0d795224 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(dev_get_drvdata) = 0x7cf5b2b3 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(dev_warn) = 0x43b38448 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(devm_kmalloc) = 0x636462f8 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(dma_set_mask) = 0x59d5a7f7 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(dma_supported) = 0x7a7f7d68 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(ioread32) = 0xe484e35f is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(iowrite32) = 0x436c2179 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(jiffies) = 0x7d11c268 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(module_layout) = 0x28950ef1 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(param_ops_int) = 0x15692c87 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pci_read_config_byte) = 0xc2f7c1b1 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pci_read_config_dword) = 0xebfdcb96 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pci_set_master) = 0xbe4a1520 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pci_unregister_driver) = 0x2cb61da5 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pci_write_config_byte) = 0xc9426d6d is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pci_write_config_dword) = 0x07f59e59 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pcim_enable_device) = 0x17c754ae is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pcim_iomap_regions) = 0xfe911bc6 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(pcim_iomap_table) = 0xf44490e2 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(sata_std_hardreset) = 0x48274201 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(sme_active) = 0x7ae5ad74 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(sme_me_mask) = 0x17fbce60 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
> kernel(warn_slowpath_null) = 0x16305289 is needed by
> kmod-sata_via-2.6-1.el7_9.elrepo.x86_64
>
This is really confusing.
Our updated out-of-tree module requires certain versions of kernel
symbols, provided by specific kernels. Our kmod-sata_via package was
built against the RHEL 7.9 kernel (same as CentOS 7.9) 3.10.0-1160.el7
which you have installed, so you should not be seeing those errors
above. All of those dependencies should be provided by your currently
running kernel (as shown below). I wonder if there is an issue with your
rpm database as something is not adding up.
> Here is my basic kernel and CentOS release info:
>
> [anaconda root at localhost ~]# uname -a
> Linux unknown001a6443e48f.attlocal.net
> <http://unknown001a6443e48f.attlocal.net> 3.10.0-1160.el7.x86_64 #1 SMP
> Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
>
Great, you have the correct kernel, and CentOS 7.9 installed :-)
> [anaconda root at localhost ~]# cat /etc/centos-release
> CentOS Linux release 7.9.2009 (Core)
>
> Is the problem that the RPM is just failing to install due to the failed
> dependencies listed above?
>
> Let me know if I can provide any additional information. Again, thank
> you so much for your quick assistance and patience with me!
>
> Tristan
>
As you've now got the OS installed, I would try reinstalling the kmod
package and rebooting:
yum --enablerepo=elrepo-testing reinstall kmod-sata_via
Phil
More information about the elrepo
mailing list