LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 03-24-2009, 01:15 PM   #1
oren.m
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
unload loadable kernel modules


hi all.
i am having problem removing several loadable modules from a linux 2.6 kernel (redhat5)
i have entered them into a blacklist but it didnt help. removing manually is forbidden due to dependencies that i cannot see. just for example, say i dont use ext3 fs or lvm for that matter and dont want it to load on next boot. ext3 module is used by 2 other modules but their names arent specified in the lsmod command. (means its from the kernel itself?)
what i want to do is to create a new smaller kernel without most of the modules and without recompiling kernel.

will appreciate any help
oren.
 
Old 03-24-2009, 01:32 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD
Posts: 3,744
Blog Entries: 5

Rep: Reputation: Disabled
See the manpages for modprobe(8). The option you want is -r.

I'm not sure how much luck you are going to have removing modules like ext3.

As for lvm, if you're really not using it, try simply turning off the lvm2-monitor service. (That might prevent the module from loading at boot time -- not sure on that.)

Can you explain why you're trying to do this? Are you expecting to see a big system resource savings?
 
Old 03-24-2009, 03:45 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,290

Rep: Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350
Welcome to LQ.

If I remember right, things are like this :
You cannot boot into 'lvm' and thus have a
small boot partition to take care of that.

The boot partition is ext3.

And why in the first place do anything to save about 100 kB ?
.....

Last edited by knudfl; 03-25-2009 at 02:17 PM.
 
Old 03-26-2009, 02:54 AM   #4
oren.m
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Original Poster
Rep: Reputation: 0
hi anomie, knudfl, thanks for your quick response.
unloading with the -r option is not good enough because i dont want those module to be loaded from boot. i could wait for boot and schedule a script to unload them but it seems illogical if i can simply remove them from load sequence in first boot.
my goal is to create a smaller kernel by removing all unnecessary module like sound, video, bluetooth etc. rebuilding the kernel is not an option at hte moment because of redhat's support. as for the lvm module, this was just an example to a module which cannot be removed by -r because it has dependencies which cannot be seen in the lsmod command. (even tough i didnt use ext3 or lvm)
Oren.
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Anatomy of Linux Loadable Kernel Modules LXer Syndicated Linux News 0 07-22-2008 06:20 AM
Need help creating a Loadable Kernel Modules jacatone Linux - Newbie 12 05-08-2008 05:23 PM
Loadable Kernel Modules and registering with SCSI shayes_enigmads Programming 0 05-25-2006 09:27 AM
trying to unload unnecessary kernel modules biophysics Linux - Kernel 4 05-14-2006 04:21 AM
Loadable Kernel Modules jbrashear Debian 7 04-03-2005 05:11 PM


All times are GMT -5. The time now is 12:48 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
Open Source Consulting | Domain Registration