Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Closed: Module versioning] insmod: Invalid module format
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 637
Location: for(;;);

PostPosted: Mon May 16, 2011 10:31 pm    Post subject: [Closed: Module versioning] insmod: Invalid module format Reply with quote

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 #

_________________
Maintaining documentation on upgrades is apparently not within the power of Gentoo
Beware when you emerge -u world!


Last edited by TJNII on Tue May 17, 2011 2:39 am; edited 1 time in total
Back to top
View user's profile Send private message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 523
Location: Connecticut, USA

PostPosted: Mon May 16, 2011 11:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 637
Location: for(;;);

PostPosted: Tue May 17, 2011 2:22 am    Post subject: Reply with quote

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)
_________________
Maintaining documentation on upgrades is apparently not within the power of Gentoo
Beware when you emerge -u world!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue May 17, 2011 2:27 am    Post subject: Reply with quote

Yes, I think there is also make modules target after you add a module in config.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 637
Location: for(;;);

PostPosted: Tue May 17, 2011 2:38 am    Post subject: Reply with quote

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.
_________________
Maintaining documentation on upgrades is apparently not within the power of Gentoo
Beware when you emerge -u world!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue May 17, 2011 2:42 am    Post subject: Reply with quote

Did you try forcing module loading?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
TJNII
l33t
l33t


Joined: 09 Nov 2003
Posts: 637
Location: for(;;);

PostPosted: Tue May 17, 2011 2:45 am    Post subject: Reply with quote

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.
_________________
Maintaining documentation on upgrades is apparently not within the power of Gentoo
Beware when you emerge -u world!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum