PDA

View Full Version : No USB / Can't Load Modules / Odd insmod Behavior



c13
06-05-2005, 07:15 AM
I've spent the last several days trying to figure out why I lost USB and network after installing to hard disk. I had read every single english-language Google hit (many hundreds) I could find which pertained to my problem, and no one had ever reported this, so I'm writing up a quick summary of what I found in hopes that others won't have the same frustrations. If the problem is obvious or old news, I apologize in advance.

ENVIRONMENT:
Knoppix 3.8.2 (Debian Sid - you all know this, I'm sure, but I'm trying to put in keywords for Google)
AMD K6
Linux 2.6.11
Linux 2.4.18

SYMPTOMS:
After installing to hard drive (using knoppix-installer-latest-web), over an existing Debian (Sarge) install (without reformatting), and then updating from apt sources, I noticed I had no USB or network. It turned out I had no modules at all. I tried custom initrd and kernels, but could neither load modules nor get working things which the CD autoconfigured. Everything still worked when booting off the CD again. When booting from 2.6.11, either custom or stock-from-Kanotix, I noticed that insmod and modprobe always gave an odd error: "ERROR: Module foo does not exist in /proc/modules". /proc is information about the currently running system; of course it doesn't exist there! Why is that a problem? I also noticed that 2.4.18 did not give the same error, and 2.6.11 didn't give the error when booting from CD.
Back to 2.6.11. Running insmod or modprobe without any arguments produced more weirdness:
Usage: insmod [-fhswvV] modulename
Usage: modprobe [-fhswvV] modulename
This is the usage message for rmmod, not insmod. 2.4.18 and booting from CD, on the other hand, produced the correct usage messages.

SOLUTION:
It turned out there was a version of modutils which was an all-in-one binary. Its behavior is supposed to depend on the name by which it is called. For some reason, it was not correctly using modprobe or insmod functions when booting from 2.6.11 on hard disk - in those cases, it was always defaulting to rmmod behavior - yet it was clearly recognizing the name by which it was called, as we can see by the usage messages above.
It had the same version number as the separate-binaries version on the Knoppix CD:
module-init-tools version 3.2-pre1
Anyway, I moved insmod to rmmod, and copied a new insmod and modprobe from the CD, and now my modules are correctly loaded.

NOTES:
Perhaps this should be reported to modutils; it does seem to be, first and foremost, inconsistent modutils behavior. Alternately, Debian might be a good place to report it, in case the issue was my update after installation. But I'm too lazy; hopefully Google will pick up this post and my effort won't be wasted. Besides, it might, in fact, be a Knoppix issue (or Kanotix?) - but now I'm too sick of this problem even to finish this sentence properly.