LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-16-2007, 12:01 AM   #1
pete1234
Member
 
Registered: May 2005
Distribution: Slack, FreeBSD,NetBSD, OpenBSD, Open Solaris, Minix
Posts: 172

Rep: Reputation: 30
Unused Modules


I was just wondering if there's a quick way to get a list of all unused options that have been compiled as modules in the kernel. For example lsmod shows about 25-50 modules being used, and 772 were compiled. I went through and got rid of things I know I didn't need or want, but what I was unsure about I left. Any help is appreciated.
 
Old 07-16-2007, 12:30 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
There are a couple of things you might do. One is to look at your config file. This exists as .config (notice the leading dot indicating a "hidden" file) in the top level directory of your kernel source. It is frequently also copied as a non-hidden file to /boot when you install a kernel. You can search through this file for all lines containing "=m". For example you can use grep:

Code:
grep "=m" <name of file> | less
The possible drawback I see to this is that you might have some trouble mapping the variable names into the name of the modules.

The other thing you can do is look at the directory listing of all of your compiled modules:

Code:
ls -R /lib/modules/$(uname -r) | grep "\.k*o" | less
 
Old 07-16-2007, 12:32 AM   #3
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Oh sure, you make xconfig (gconfig, qconfig, whatever) and compare. Though you could probably just use the config file for anything with the m option.

You don't really need to get rid of unused modules do you?
 
Old 07-16-2007, 12:42 AM   #4
pete1234
Member
 
Registered: May 2005
Distribution: Slack, FreeBSD,NetBSD, OpenBSD, Open Solaris, Minix
Posts: 172

Original Poster
Rep: Reputation: 30
Thanks for the replies, my reason for wanting to get rid of them is `make modules` takes ages.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
amavisd unused ?? Wynand1 Suse/Novell 0 09-22-2005 07:50 AM
Unused kernel modules : How to NOT load? _UnPrEdictAbLe_ Linux - Software 0 08-19-2004 01:19 AM
Removing unused kernel modules / autoclean MadCactus Linux - General 4 12-23-2003 09:05 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM


All times are GMT -5. The time now is 01:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration