View previous topic :: View next topic |
Author |
Message |
TJNII l33t
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Mon May 16, 2011 10:31 pm Post subject: [Closed: Module versioning] insmod: Invalid module format |
|
|
My kernel is adamantly refusing to insmod my modules. I haven't rebooted this system (This system needs high uptime, that is a last resort) but that is the only option I can think of at this point. I have recompiled the kernel (make clean && make) and reinstalled the modules (make modules_install). Am I missing something obvious here?
Code: | TJNIILB linux # file /lib/modules/2.6.36-gentoo-r8/kernel/drivers/usb/serial/usbserial.ko
/lib/modules/2.6.36-gentoo-r8/kernel/drivers/usb/serial/usbserial.ko: ELF 64-bit LSB relocatable, IA-64, version 1 (SYSV), not stri
pped
TJNIILB linux # insmod /lib/modules/2.6.36-gentoo-r8/kernel/drivers/usb/serial/usbserial.ko
insmod: error inserting '/lib/modules/2.6.36-gentoo-r8/kernel/drivers/usb/serial/usbserial.ko': -1 Invalid module format
TJNIILB linux # ls -l ../
total 3
lrwxrwxrwx 1 root root 22 Apr 25 23:06 linux -> linux-2.6.36-gentoo-r8
drwxr-xr-x 24 root root 1680 Feb 8 19:09 linux-2.6.31-gentoo-r7
drwxr-xr-x 24 root root 1616 May 16 16:22 linux-2.6.36-gentoo-r8
drwxr-xr-x 7 root root 168 Aug 11 2010 rpm
TJNIILB linux # uname -a
Linux TJNIILB 2.6.36-gentoo-r8 #5 SMP Wed May 4 08:21:03 MDT 2011 ia64 31 GenuineIntel GNU/Linux
TJNIILB linux #
|
Last edited by TJNII on Tue May 17, 2011 2:39 am; edited 1 time in total |
|
Back to top |
|
|
genterminl Guru
Joined: 12 Feb 2005 Posts: 527 Location: Connecticut, USA
|
Posted: Mon May 16, 2011 11:37 pm Post subject: |
|
|
The error is some mismatch between the running kernel and the compiled module, so recompiling the kernel shouldn't matter. Did you make any (significant?) changes to the kernel configuration since your last reboot?
Do you have any running modules? (lsmod) Can you insmod or modprobe any other modules?
Note the insmod man page says "Only the most general of error messages are reported: as the work of trying to link the module is now done inside the kernel, the dmesg usually gives more information about errors." Is there anything relevant in dmesg or /var/log/messages? |
|
Back to top |
|
|
TJNII l33t
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Tue May 17, 2011 2:22 am Post subject: |
|
|
No, no major changes. I'll double check by diffing /proc.config.gz against .config, but it should be exactly the same. In fact the modules built with this kernel binary failed this way. My current theory is that I turned on module versioning as it seemed like a good idea, but I think that has blown up on me. Dmesg isn't saying anything when I try and ismod. I haven't tried modules other than usbserial and the FTDI module. I haven't tried unloading and reloading any of the modules loaded at boot, as that has the potential to bring this box to its knees.
Just to make sure I haven't missed a memo, we're still supposed to build the 2.6 kernels by issuing only "make" and then "make modules_install" yes? (This is obviously with a proper .config and doesn't include copying the kernel image to to /boot or the bootloader) |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
TJNII l33t
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Tue May 17, 2011 2:38 am Post subject: |
|
|
All right, thanks. I just wanted to make sure I wasn't doing something stupid.
I VPNed into the box and rechecked my dmesg. There is damning evidence I missed this afternoon:
Code: | usbserial: disagrees about version of symbol module_layout
ftdi_sio: disagrees about version of symbol module_layout
usbserial: disagrees about version of symbol module_layout
ftdi_sio: disagrees about version of symbol module_layout
usbserial: disagrees about version of symbol module_layout
ftdi_sio: disagrees about version of symbol module_layout
usbserial: disagrees about version of symbol module_layout
|
(Must have had a overzealous grep or something. Anyways...)
So the needle is pointing at module versioning.
Not much I can do about that now, I'll have to compile it out the next time I can schedule downtime. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
TJNII l33t
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Tue May 17, 2011 2:45 am Post subject: |
|
|
Jaglover wrote: | Did you try forcing module loading? |
No, but not because I didn't think of it. I added support for forced module unloading, but not forced module loading.
Another setting I'll toggle on the next round of kernels. |
|
Back to top |
|
|
|