1

I try to install a module using this command:

sudo insmod mymod.ko [arg1] [arg2] 

but I get this error while loading the module:

insmod: error inserting 'mymod.ko': -1 Invalid module format

my current kernel:

uname -r
4.4.6-040406-generic

To compile the module for my linux kernel, I downloaded linux 4.4.6 since I couldn't find any source code for 4.4.6-040506-generic. This is the information about the module:

modinfo mymod.ko
vermagic:       4.4.6 SMP mod_unload modversions

When I try to boot the kernel from the compiled source code, it fails to boot. It stuck with busybox and prompt initramfs.

Any suggestion?

3
  • Can you include a little bit more information? For example, what command did you use to load the module? Commented Mar 31, 2016 at 23:29
  • I used "sudo insmod mymod.ko [arg1] [arg2] " Commented Mar 31, 2016 at 23:33
  • 1
    Great, could you edit your question to include that info? Commented Mar 31, 2016 at 23:35

1 Answer 1

1

Run that insmod command, and after getting the error you mentioned of invalid module format, run dmesg and look at the last 4 lines. Usually it describes in such a case inconsistency between version of the module and version of the running kernel. If you have trouble understanding those lines, post them here.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.