You are not logged in.
Pages: 1
Hi all,
I have been trying to configure autoloading of modules but I seem to have come to a dead end with modprobe configuration: With devfsd in use, when a non-existent device is opened, modprobe is invoked as:
modprobe -k -C /etc/modules.devfs <req. device>
/etc/modules.devfs includes /etc/modules.conf so I placed - alias /dev/radio0 bttv - in this file. Normally this should have resulted in bttv.ko being loaded but this is not the case. I tried some tests but I get confusing results: If I give the manual command - modprobe -k -C /etc/modules.conf /dev/radio0 - I have no error message but bttv is not loaded. If I try the same command BUT with modules.conf completely empty I still have no error message (as if its finding a module called /dev/radio0). Then if I do a modprobe -k -C /etc/modules.conf /dev I get an error message: FATAL: Module /dev not found.
If I do a - modprobe -k /dev/radio0 - I get the expected error message: FATAL: Module /dev/radio0 not found. Also if I try - modprobe -C /etc/modules.conf /xxx/radio0 I get FATAL: Module /xxx/radio0 not found.
It seems that specifying a completely empty config file makes modprobe recognize "/dev/*" as a valid module name but "/dev" as invalid. I am confused!
I am running kernel 2.6.7 custom-compiled from vanilla sources and have done pacman -Syu today.
My thanks in advance and apologies if I am making some silly mistake here.
Regards
Neoklis ... Ham Radio Call: 5B4AZ
Offline
I lost here.. Why dont you just do modprobe modulename ? Wouldnt that just be easier?
Offline
I lost here.. Why dont you just do modprobe modulename ? Wouldnt that just be easier?
Hi,
Well, yes. I could also load the modules via /etc/rc.conf but I am trying to learn how to make a compact kernel with the required modules auto-loaded as needed, since I am experimenting with booting a compact installation from a USB gadget (a pen knife with 64Mb flash). Its also remotely possible that there is something wrong with modprobe when used in this way.
Regards
Neoklis ... Ham Radio Call: 5B4AZ
Offline
i thought the default module file for 2.6.x modprobe.conf? Maybe take at how the init files are loading modules.
AKA uknowme
I am not your friend
Offline
i thought the default module file for 2.6.x modprobe.conf? Maybe take at how the init files are loading modules.
Hi,
Actually I first put config entries in modprobe.config but the only thing that worked was "alias eth0 de4x5". Other entries seemed to make no difference, including the usual "alias char-major- etc". I then thought I better have a direct look at how modprobe is invoked and made the following simple script:
#!/bin/sh
echo $@ > /var/tmp/log
modprobe.1 $@
I called the script modeprobe and renamed modeprobe to modeprobe.1 so I could log calls to it. This is how I verified that it was invoked with -k -C /etc/modules.devfs <device name> when a missing device was opened blind. /etc/modules.devfs includes modules.conf rather than modprobe.conf.
I guess I should buy a USB gadget with a bigger flash and try a more conventional install ;-)
Regards
Neoklis ... Ham Radio Call: 5B4AZ
Offline
i thought the default module file for 2.6.x modprobe.conf? Maybe take at how the init files are loading modules.
Actually it now looks like it is a bug. This is from modprobe source v3.1pre4 (latest):
/* This is a horrible hack to allow devfsd, which calls modprobe with
-C /etc/modules.conf or /etc/modules.devfs, to work. FIXME. */
/* Modern devfsd or variants should use -q explicitly in 2.6. */
static int is_devfs_call(char *argv[])
{
unsigned int i;
/* Look for "/dev" arg */
for (i = 1; argv[i]; i++) {
if (strncmp(argv[i], "/dev/", 5) == 0)
return 1;
}
return 0;
}
I guess this should now go into the hands of more qualified people for consideration.
Regards
Neoklis ... Ham Radio Call: 5B4AZ
Offline
sarah31 wrote:i thought the default module file for 2.6.x modprobe.conf? Maybe take at how the init files are loading modules.
Actually it now looks like it is a bug. This is from modprobe source v3.1pre4 (latest):
<snip>
Correcting myself: I configured/compiled downloaded source of module-init-tools 3.1pre4 and installed only modprobe. Autoload now works well but modprobe requires modprobe.devfs as its config file. I guess I had problems with the original since I installed with kernel 2.4 and module-init-tools 0.9.14-4 which I suppose were configured/compiled for that kernel.
My apologies for wasted bandwidth.
Regards
Neoklis ... Ham Radio Call: 5B4AZ
Offline
Pages: 1