LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-30-2009, 12:06 PM   #1
DEF.
Member
 
Registered: Apr 2009
Posts: 96

Rep: Reputation: 23
Linux modules


I understand that Linux modules may be loaded at boot time via a script (although methods to do this vary), and can be loaded a run-time too with modprobe or insmod, for example.

However I was shocked today when I accidentally rmmod'ed the wrong module. In fact I rmmod'ed the ochi-ocd module - that is my USB 1.1 Host Controller driver. lol - note I lost control of my keyboard and mouse and had to reboot.

The point is, I thought that only modules could be loaded/unloaded and that kernel built-in functionality was there to stay?
 
Old 07-30-2009, 01:13 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
You are correct. During runtime, statically build kernel code cannot be rmmoded or 'modprobe -r'ed, only modules can be removed by these means.

If you have your system running and open a console and type 'lsmod' it will show you what-all modules are currently plugged in (and thus removable).

Sasha
 
Old 07-30-2009, 01:28 PM   #3
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
To clarify, just because something seems basic doesn't mean it's going to be compiled in. Do take a look at the command Sasha mentioned; you'll see a lot of things you might have suspected weren't modules. As for why, the best I can give you is that the Linux kernel runs on an obscene variety of platforms and functionality that seems critical for your desktop may not be for all or even most of them. Note that whether something is compiled into the kernel or as a module is a compile-time option and you can make your own choices about this if you ever compile your own kernel.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically loaded modules and statically loaded modules in linux gauthamk Linux - Software 1 05-18-2008 04:28 PM
LXer: Linux Security Modules Sans Modules LXer Syndicated Linux News 0 10-20-2007 11:01 PM
Slack9 - no PPP (can't open dependencies file /lib/modules/2.4.18/modules.dep) bluehz Slackware 1 05-04-2003 02:32 PM
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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration