Saturday, August 18, 2012

DEPRECATED OPTIONS IN INSMOD COMMAND in Linux 2.6 and beyond

Some time ago, I had answered a question from an user regarding the switches available for the insmod command.

Basically, the user wanted to try using the insmod -m option that prevailed during the days of Linux 2.4.
The current man pages for insmod did seem to still display these options, though they have been removed from the days of Linux 2.6.

Below is a summary of the same discussion found in stack overflow:

I try to use insmod "/my/url/fil.ko" -m to debug what happens but each time I got error -1 Unknown symbol in module while in /cat/log/message I can see the error unknown parameter -m



4
down voteaccepted
Yes, the init_module function gets called as soon as you load it to the kernel using insmod. You can just add a line of printk and verify it being printed as soon as you insert the module.
You cannot pass a parameter such as -m to debug the kernel module.
You can only pass parameters that are intended to be handled within the kernel module that you have written, using MODULE_PARAMS.
share|edit|delete|flag

 believe support for the -m switch on insmod was removed starting from kernel 2.6. You can find more info. here:linux.derkeiler.com/Mailing-Lists/Kernel/2003-09/3268.html – Amarnath Revanna Aug 9 at 18:21 

No comments:

Post a Comment