LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-10-2004, 03:59 PM   #1
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Rep: Reputation: 30
modprobe or insmod?


This has always bothered me as they seem to do the same thing. What's the difference between insmod and modprobe? Is there a benefit to using one over the other?
 
Old 04-10-2004, 05:14 PM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
modprobe, I think may try to set detected values for a module, that uses hardware, as insmod, will just insert the module for the device without parameters or settings 'OR' the modules own default settings.

Not sure.
Perhaps someone else has a better explanation.
 
Old 04-10-2004, 05:29 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,533

Rep: Reputation: 148Reputation: 148
Insmod just installs the module you specify. If it requires another one that's not loaded, the operation fails.
Modprobe loads the module you specify and all dependencies.
 
Old 04-10-2004, 05:32 PM   #4
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Original Poster
Rep: Reputation: 30
Cool, another question, to get my joytick working, I have to do modprobe joydev, do I have to do this while its plugged in? Or can I do it then plug it in, and expect the device to work?
 
Old 04-10-2004, 05:41 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,533

Rep: Reputation: 148Reputation: 148
Don't have a joystick, so it's hard to say but probably when you run modprobe without it plugged in, it'll fail. But it depends. Test it
 
Old 04-10-2004, 05:49 PM   #6
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Original Poster
Rep: Reputation: 30
Hm, I guess that was a bad idea :P. I had joydev already loaded, so I unplugged it then plugged it back in, and launched ZSNES. Instead of just giving me a message about one joystick, its convinced there are two.
Code:
Joystick 0 (2 Buttons): /dev/input/js0
Joystick 1 (32 Buttons): 0b43:0003
And the joystick doesn't work in ZSNES . I can't remove the module either
Code:
root@onizuka:ynadji$ rmmod joydev
joydev: Device or resource busy
Any idea on how to force remove a module?

Perhaps I should've removed it first...
 
Old 04-10-2004, 05:55 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,533

Rep: Reputation: 148Reputation: 148
Make sure all programs using the module are closed, then it should be possible to remove the module.
Good thing is that it looks you can load the module and then plug in the device.
 
Old 04-10-2004, 06:03 PM   #8
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Original Poster
Rep: Reputation: 30
Ah, I had XMMS running, and I have a joystick plug-in for that thing. Should've checked on that before. And I can modprobe, then insert the USB adapter, and it works perfectly. Totally sweet.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fresh Slack 10 install::Can't modprobe...insmod failing. kersten78 Slackware 3 11-07-2004 12:16 PM
modprobe or insmod agts Linux - Newbie 2 03-14-2004 01:18 PM
modprobe and insmod same modules, diff kernel ? qwijibow Linux - Software 1 11-06-2003 09:22 AM
modprobe: modprobe can't locate module ppp0 in redhat 7.1 while shutting down. cyberdude3k Linux - Networking 1 09-08-2003 12:01 PM
insmod/modprobe Problem Compuholic Linux - General 19 12-24-2002 10:39 AM


All times are GMT -5. The time now is 11:17 AM.

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