问题
The system is CentOS 6.3.
I've compile a new kernel and the resulting rpm installed on a target machine. When booting from the kernel I've receive the error in a title of the question.
I've extracted corresponding initramfs and compared output of:
modprobe --dump-modversions /path/to/scsi_wait_scan.ko
with entries in corresponding /boot/symvers-*. All symbols checksums fit, including of module_layout.
Is there a way to extract symvers from kernel itself?
回答1:
I've found the problem.
Short answer
The problem was that I installed kernel rpm (B) over already installed kernel rpm (A), without removing it first.
Detaild answer
scsi_mod.ko
was owned only by (A). While installing (B), scsi_mod.ko
was in /lib/modules/.
When intramfs was created in (B)'s postinstall script. depmod decided that scsi_wait_scan.ko
depends on scsi_mod.ko
, while both build against different configurations.
Later when booting the machine, kernel started run initramfs. This in turn modprob'ed scsi_wait_scan.ko
. modprobe tried loaded as a consiquence scsi_mod.ko
, which is not appropriate to the current kernel, thus resulting to error I saw.
来源:https://stackoverflow.com/questions/13929176/error-inserting-scsi-wait-scan-invalid-module-format