Page 1 of 1

What happened to Modprobe?

Posted: Mon Jan 28, 2013 10:47 am
by viking777
I have a command listed in my cheatsheet (in two places so it must be true :lol: ) that tells me the way to list available (as opposed to loaded) kernel modules is to use modprobe -l. When I run that now I get told it is an invalid option, and the 'l' switch is not listed in the man page. So what happened? What is the alternative?

The same info is still out there on the net so I am not imagining it and I have used the command before and it definitely worked then, very useful it was too.

http://www.thegeekstuff.com/2010/11/mod ... -examples/

Re: What happened to Modprobe?

Posted: Mon Jan 28, 2013 11:26 am
by xenopeek
Correct, and the manpage says the following so it seems that moment has arrived:
-l --list List all modules matching the given wildcard (or "*" if no
wildcard is given). This option is provided for backwards
compatibility and may go away in future: see find(1) and
basename(1) for a more flexible alternative.
lsmod will show the list of currently loaded modules, modinfo will provide information about individual modules, but I don't know which command will show you all modules. Well, except for that modules are stored in .ko files in your kernel tree in /lib/modules.

So you can do the following which will list all modules:

Code: Select all

find /lib/modules/$(uname -r) -name \*.ko
Not sure how useful that is though... Thousands of modules here...

Re: What happened to Modprobe?

Posted: Mon Jan 28, 2013 12:14 pm
by viking777
Thanks xenopeek, I didn't notice that part you highlighted.

I think that is a real shame, modpbobe -l is a useful command when attached to grep, the main thing I used it for was to see if it was worth modprobing a module or not (not much point if you don't have that module to load is there). I guess I will have to use that find command instead now but it is nowhere near as succinct.

Actually it doesn't even work (using Manjaro right now so that could be it)

Code: Select all

[manjaro@manjaro ~]$ find /lib/modules/$(uname -r) -name \efivars.ko
[manjaro@manjaro ~]$ 
So the module doesn't exist right.

Code: Select all

sudo modprobe efivars

Code: Select all

lsmod | grep efivars
efivars                17941  1 
I want modprobe -l back!!

Re: What happened to Modprobe?

Posted: Mon Jan 28, 2013 12:37 pm
by proxima_centauri
Modules end with .ko.gz in Arch Linux so I'm assuming it will be the same for Manjaro

Code: Select all

 find /lib/modules/`uname -r` -name \*.ko.gz | less

Re: What happened to Modprobe?

Posted: Mon Jan 28, 2013 12:51 pm
by viking777
proxima_centauri wrote:Modules end with .ko.gz in Arch Linux so I'm assuming it will be the same for Manjaro

Code: Select all

 find /lib/modules/`uname -r` -name \*.ko.gz | less
Thanks prox, that does it, but it still doesnt' quench my rage :lol:

Firstly it means I now have two long commands where one short one used to do, and secondly the command you gave me is a bash command and I use fish, so now I have to work out a translation!

Like I said I want "modprobe -l" back - it just works - any distro, any shell! (Or it used to :( )