What happened to Modprobe?

Forum rules
Before you post please read this

What happened to Modprobe?

Postby viking777 on Mon Jan 28, 2013 10:47 am

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/
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Linux Mint is funded by ads and donations.
 

Re: What happened to Modprobe?

Postby xenopeek on Mon Jan 28, 2013 11:26 am

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...
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14722
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: What happened to Modprobe?

Postby viking777 on Mon Jan 28, 2013 12:14 pm

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!!
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Re: What happened to Modprobe?

Postby proxima_centauri on Mon Jan 28, 2013 12:37 pm

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
User avatar
proxima_centauri
Level 11
Level 11
 
Posts: 3976
Joined: Tue Dec 25, 2007 3:24 pm
Location: NB, Canada

Re: What happened to Modprobe?

Postby viking777 on Mon Jan 28, 2013 12:51 pm

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 :( )
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 1 guest