Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I do:

sudo insmod module.ko

I get:

insmod: error inserting 'module.ko': -1 Operation not permitted

modinfo gives me:

filename:       module.ko
license:        XXX Proprietary
version:        210
author:         XXX
description:    XXX Driver
srcversion:     XXX
depends:        
vermagic:       2.6.32-33-generic-pae SMP mod_unload modversions 586TSC

and uname -a gives:

2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC 2011 i686 GNU/Linux

so I suspect that I need to install this specific kernel version:

2.6.32-33-generic-pae

My question is how to manage to insert this module and if kernel version is the problem - how to install it on Ubuntu 10.04?

Just to mention, I had 2.6.32.33-generic kernel when I installed Ubuntu, but insmod failed. Then I did:

sudo aptitude install linux-generic-pae linux-headers-generic-pae

and I selected new kernel on boot, but insmod failed again. What I noticed is that it was (I think 2.6.32.36-generic-pae and not 2.6.32.33-generic-pae, but I don't know how to install this specific version)

share|improve this question
2  
Not to ask the obvious question, but I assume you did: "sudo insmod module.ko"? –  Rilindo Nov 8 '11 at 16:03
    
Copy your module to the module dir, do a depmod -a, then do modprobe module. –  ott-- Nov 8 '11 at 16:12
1  
@Rilindo: Yes, I used sudo ;) –  kliketa Nov 8 '11 at 16:21
    
Thanks! You may want to update your post from "insmod module.ko" to "sudo insmod module.ko" to clarify things. –  Rilindo Nov 8 '11 at 16:29
add comment

2 Answers

I found the solution - I just needed to install "linux-image-2.6.32-33-generic-pae" from synaptic package manager and reboot.

Now inserting module is passing, thanks.

share|improve this answer
add comment

From The Linux Kernel Module Programming Guide, section 1.2.1.1:

A module compiled for one kernel won't load if you boot a different kernel unless you enable CONFIG_MODVERSIONS in the kernel.

So, building a kernel with CONFIG_MODVERSIONS enabled, probably will resolve your problem. Another solution would be to build and install Linux 2.6.32-33 with PAE support.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.