2

When trying to install hw_random to a 2.6 kernel, modprobe returns a FATAL error "No such device" on both CentOS 5.7 and Fedora 15. Both are using the latest kernel, respectively.

The .ko file exists, and config- contains CONFIG_RTC=y and CONFIG_CRYPTO_RNG=m

Both servers are x86_64 AMD processors.

The only google results are very old, often reference the kernel module 'hw_random' (which has been replaced with processor specific modules and don't offer much help.

Has anyone been able to install hw_random? Am I missing a step while installing the module?

Edit:

Fedora 15

/lib/modules/2.6.40.6-0.fc15.x86_64/kernel/drivers/char/hw_random/amd-rng.ko

# uname -r

2.6.40.6-0.fc15.x86_64

# modprobe -v amd-rng

insmod /lib/modules/2.6.40.6-0.fc15.x86_64/kernel/drivers/char/hw_random/amd-rng.ko

FATAL: Error inserting amd_rng (/lib/modules/2.6.40.6-0.fc15.x86_64/kernel/drivers/char/hw_random/amd-rng.ko): No such device

CentOS 5.7

/lib/modules/2.6.18-274.7.1.el5/kernel/drivers/char/hw_random/amd-rng.ko

# uname -r

2.6.18-274.7.1.el5

# modprobe -v amd-rng

insmod /lib/modules/2.6.18-274.7.1.el5/kernel/drivers/char/hw_random/amd-rng.ko

FATAL: Error inserting amd_rng (/lib/modules/2.6.18-274.7.1.el5/kernel/drivers/char/hw_random/amd-rng.ko): No such device

voretaq7
  • 79,345
  • 17
  • 128
  • 213
CrackerJack9
  • 119
  • 7

1 Answers1

4

"No such device" as in "your computer lacks the required hardware device."

Look at the Linux source code to amd-rng.c for PCI_VDEVICE(AMD, ...) to see the PCI vendor and device numbers.

As an example amd-rng.c may contain:

/*
 * Data for PCI driver interface
 *
 * This data only exists for exporting the supported
 * PCI ids via MODULE_DEVICE_TABLE.  We do not actually
 * register a pci_driver, because someone else might one day
 * want to register another driver on the same PCI id.
 */
static const struct pci_device_id pci_tbl[] = {
        { PCI_VDEVICE(AMD, 0x7443), 0, },
        { PCI_VDEVICE(AMD, 0x746b), 0, },
        { 0, }, /* terminate list */
};

Those translate into:

vendor: 1022 ("Advanced Micro Devices [AMD]"), device: 7443 ("AMD-768 [Opus] ACPI")
vendor: 1022 ("Advanced Micro Devices [AMD]"), device: 746b ("AMD-8111 ACPI")

Using lscpi -vnn will show what PCI devices you do have. You need to see 1022:7443 or 1022:746b.