error : insmod
Kristof Provost
kristof at sigsegv.be
Mon Feb 11 05:15:51 EST 2013
On 2013-02-11 15:24:08 (+0530), sunil <sunil.slvphsn at gmail.com> wrote:
> while inserting module to the linux kernel, m facing this problem
> -------------------------------------------ERROR-----------------------------------------------------
>
> sunil at ubuntu:~/test/drive$ insmod helloworld.ko
> insmod: error inserting 'helloworld.ko': -1 Operation not permitted
>
For obvious reasons normal users are not allowed to load kernel modules.
This requires root access (or more accurately, CAP_SYS_MODULE
capabilities). That's why your insmod fails.
> sunil at ubuntu:~/test/drive$ sudo modprobe helloworld
> FATAL: Module helloworld not found.
>
This is a different action from 'insmod helloworld.ko'.
modprobe tries to load the module from /lib/modules/`uname -r`.
It's slightly more convenient because it will also load all modules this
one depends on.
In this case this fails because your module doesn't actually live in
/lib/modules/....
Try sudo insmod helloworld.ko instead.
Regards,
Kristof
More information about the Kernelnewbies
mailing list