LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Q: installing modules (https://www.linuxquestions.org/questions/linux-newbie-8/q-installing-modules-294990/)

confused_bof 02-25-2005 10:30 PM

Q: installing modules
 
Hi,
I've been mucking about with madwifi and was rather pleased & surprised with myself that 'make' and 'make install' and 'insmod' and all that other obfuscated nonsense worked for me. Be damned if I didn't get the card to work as well :D -

Anyway, and as always, elation was soon followed by the usual Linux 'let-down'

On a reboot i had to go and insmod the modules all over.

Now, I have several books on linux and none mention in plain language what needs to be done to ensure installed modules persist, ie they are installed/ loaded on a boot/ reboot

Can someone point me in the right direction, perhaps to a plain english text or instruction on the matter?

Thanks

acid_kewpie 02-26-2005 03:24 AM

you should just need to add an entry to /etc/modules.conf
Code:

alias eth0 madwifi
or such like. you shouldn't use insmod though, use modprobe to wrap it, and you'll be much safer in the event of a problem, or other modules being required to support it.

confused_bof 02-26-2005 03:44 AM

Quote:

Originally posted by acid_kewpie
you should just need to add an entry to /etc/modules.conf
Code:

alias eth0 madwifi
or such like. you shouldn't use insmod though, use modprobe to wrap it, and you'll be much safer in the event of a problem, or other modules being required to support it.


Yes, I am doing the alias thing, which comes up as 'alias ath0 ath_pci"

Now, if I do an lsmod I see ath_pci and it's dependencies.

However, if I do "modprobe ath_pci", as the install instructions also tell me, I get a "module ath_pci not found" error.


modprobe binds or removes the module from the kernel, is that right? And, in a general sense, if the lsmod sees the module than so should modprobe, yes?


Everything seems to work, though, at this point. Until I reboot.

Going to have read up on this, I think. very different to the Win32 compilers and driver installations I'm used to.


Thanks

acid_kewpie 02-26-2005 05:59 AM

modprobe will look for valid module files in /lib/modules/<kernel-version>/kernel/... named approriately whereas insmod will just try and load a file passed as a parameter, so it's working at a different level (i *think* modprobe will actually use the insmod command to do the end insertions). your new module should have been placed at that location, so after running "depmod -ae" and had no related error messages, you should be able to modprobe it ok.

confused_bof 02-26-2005 02:46 PM

Quote:

Originally posted by acid_kewpie
modprobe will look for valid module files in /lib/modules/<kernel-version>/kernel/... named approriately whereas insmod will just try and load a file passed as a parameter, so it's working at a different level (i *think* modprobe will actually use the insmod command to do the end insertions). your new module should have been placed at that location, so after running "depmod -ae" and had no related error messages, you should be able to modprobe it ok.
OK, I'm getting closer, but it seems to be madwifi specific, so maybe I better hop over to their site. Again, in a general sense, the kernel module directory on my system is /lib/modules/2.3.6-7mdk/kernel

The madwifi modules were compiled into /lib/modules/2.3.6-7mdkcustom/net ??

That explains why modprobe doesn't find them, I suppose.

regards

acid_kewpie 02-26-2005 03:00 PM

hmm... that's not too handy. basically if you're installing the kernel source, then mandrake apparently is assuming that you're going to completely recompile your kernel. so rather than is runnign the risk of nuking the stock one, it gives it a different name.... as it's actaulyl the same source code, you *should* be able to jsut copy across the the stock location, and then run "depmod -ae" to register it. that's the stage that would spit out any compatability issues really, like unknown symbols etc... if that works, you should be fine.

alternatively, go nuts and fully recompile your kernel to suit your system.

confused_bof 02-26-2005 03:08 PM

Quote:

Originally posted by acid_kewpie
hmm... that's not too handy. basically if you're installing the kernel source, then mandrake apparently is assuming that you're going to completely recompile your kernel. so rather than is runnign the risk of nuking the stock one, it gives it a different name.... as it's actaulyl the same source code, you *should* be able to jsut copy across the the stock location, and then run "depmod -ae" to register it. that's the stage that would spit out any compatability issues really, like unknown symbols etc... if that works, you should be fine.
Yea, I just tried that. Got some weird errors, panicked and quickly put everything back the way I found it :)

Got "Mutex Destroy Error: Device or resource busy" after a module entry called "jbd"

Quote:

alternatively, go nuts and fully recompile your kernel to suit your system. [/B]
Oh no, not while I still have a little sanity left :D

Seriously though, many thanks for your feedback, BTW. Learning heaps here.

acid_kewpie 02-26-2005 03:12 PM

well i'd only worry about errors relating to your own modules. if everythign else seems to be ok, don't worry about it.

confused_bof 02-26-2005 03:20 PM

Quote:

Originally posted by acid_kewpie
hmm... that's not too handy. basically if you're installing the kernel source, then mandrake apparently is assuming that you're going to completely recompile your kernel. so rather than is runnign the risk of nuking the stock one, it gives it a different name.... as it's actaulyl the same source code, you *should* be able to jsut copy across the the stock location, and then run "depmod -ae" to register it. that's the stage that would spit out any compatability issues really, like unknown symbols etc... if that works, you should be fine.
OK, just moved everything over to the kernel directory, rebooted and EVERYTHING WORKS!!??

Again, many thanks for the feedback & help.

Regards

acid_kewpie 02-26-2005 03:41 PM

you shouldn't sound so suprised!

you're never going to break anything badly by adding extra modules. certainly not going to stop it booting. worst is that some related hardware might fail to configure right until you remove the other module.. even then that seesm unliekly.

confused_bof 02-26-2005 03:46 PM

Quote:

Originally posted by acid_kewpie
you shouldn't sound so suprised!

<LOL> - I'm carrying too much baggage- been developing applications under DOS & Windows too long, I think.

Anyway, as they say, ".... and now, something completely different" :D

regards


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