Re: Problem with ksmbfs

Jacques Gelinas (jack@solucorp.qc.ca)
Sat, 6 Apr 1996 20:45:09 -0500 (EST)


On Thu, 4 Apr 1996, Bjorn Ekwall wrote:

> Brian R. Doherty <doherty@rice.edu> wrote:
> >
> > When I attempt to mount a SMB filesystem with smbmount without first
> > modprobing the smbfs module, I get:
> >
> > Cannot open /lib/modules/1.3.82/smbfs.o
> > Error: Unable to start smbfs, exiting...
> >
> > I am running kerneld and have kerneld support built into the kernel.
> > smbfs.o is in /lib/modules/1.3.82/fs, and it modprobes fine. Why can't
> > kerneld / smbmount find the module?
>
> The error message comes from smbmount, not kerneld.
>
> Actually, smbmount is trying to outsmart kerneld by attempting to insmod
> the smbfs module all by itself. Unfortunately it looks in the wrong
> directory: "/lib/modules/1.3.82" instead of "/lib/modules/1.3.82/fs".
>
> I suggest that you either fix smbmount so that it looks in the _right_
> directory, or just remove the insmod call from smbmount completely...

the right directory is only known by modprobe. Any program which try to
"manually" load a module should use modprobe instead of insmod (They will
become a single utility soon anyway).

-modprobe use a configuration file which can overide

-the location of the module
-Even the name of the module actually loaded using the
alias configuration command (handy for bsd_comp for one)

-modprobe knows about stack of modules.

-modprobe knows if a module should never be loaded (alias module off)

Program who still want to load modules (kerneld is not yet a "standard"
component of all distribution. Well, ... not yet :-) or the admin (user) may
decide not to run it) should do

check first if the module is not loaded and the service not
built in the kernel.

check if kerneld is running and do nothing if this is the case

if it is not running, they can use "modprobe module_name" to load it.

An simplest way could achieve almost the same effect. The apps can load
the module with the command "modprobe -k module_name". This make the
module unloadable by kerneld when not in use. This strategy can be used
when kerneld is running or not.

Anyway the ability to load a module by the application was a convenience
at a time when kerneld was not accepted in the 1.3.x kernels. As far as I
know, only smbmount and ncpmount do this, and both had the same bug (I
think ncpmount was inspired by smbmount :-) ).

--------------------------------------------------------
Jacques Gelinas (jacques@solucorp.qc.ca)
Use Linux without reformating: Use UMSDOS.