modules fail to load at boot

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

modules fail to load at boot

Postby cmost » Tue Mar 30, 2010 0:24

I've searched this forum and Google but have not yet found a solution to my weird problem. I'm running Sabayon 5.2 KDE edition (upgraded incrementally since 5.0.). For some reason, I have to manually load my wireless card's module (b43) and VirtualBox's module (vboxdrv) with the sudo modprobe command every single time I log in. Following up the command with update-modules has no affect in making the modules load automatically. I long ago added the two modules to /etc/conf.d/modules to no avail. I've tried putting the commands to load the modules at the beginning, in the middle, and at the end of the file; I've also tried loading them with various different syntax (i.e., modules="module" vs. modules_2_6="module" with no luck. It seems this file is simply never parsed during boot, or any commands it contains are ignored. I'm running the 2.6.32 amd64 kernel. Any ideas? Can I add a couple of lines such as the following:
modprobe b43
modprobe vboxdrv
to any other file that IS parsed during boot to ensure these modules get loaded at some point. even if this is a hackish approach? Any suggestions very welcome as I'm getting desperate. Here's the contents of my /etc/conf.d/modules file for your entertainment:

# You can define a list modules for a specific kernel version,
# a released kernel version, a main kernel version or just a list.
#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"
#modules_2_6_23="tun ieee1394"
#modules_2_6="tun"
#modules="ohci1394"

# You can give modules a different name when they load - the new name
# will also be used to pick arguments below.
#modules="dummy:dummy1"

# Give the modules some arguments if needed, per version if necessary.
#module_ieee1394_args="debug"
#module_ieee1394_args_2_6_23_gentoo_r5="ieee1394 ohci1394"
#module_ieee1394_args_2_6_23="tun ieee1394"
#module_ieee1394_args_2_6="tun"

# You should consult your kernel documentation and configuration
# for a list of modules and their options.
modules="b43"
modules="vboxdrv"
#module_vboxdrv_args=""
cmost
Advanced Hen
 
Posts: 208
Joined: Wed Dec 13, 2006 22:25
Location: Cincinnati, OH

Re: modules fail to load at boot

Postby Fitzcarraldo » Tue Mar 30, 2010 0:28

You're doing it wrong. The modules all have to go in one line. See my /etc/conf.d/modules for example:

Code: Select all
# You can define a list modules for a specific kernel version,
# a released kernel version, a main kernel version or just a list.
#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"
#modules_2_6_23="tun ieee1394"
#modules_2_6="tun"
#modules="ohci1394"

# You can give modules a different name when they load - the new name
# will also be used to pick arguments below.
#modules="dummy:dummy1"

# Give the modules some arguments if needed, per version if necessary.
#module_ieee1394_args="debug"
#module_ieee1394_args_2_6_23_gentoo_r5="ieee1394 ohci1394"
#module_ieee1394_args_2_6_23="tun ieee1394"
#module_ieee1394_args_2_6="tun"

# You should consult your kernel documentation and configuration
# for a list of modules and their options.

modules="vboxdrv vboxnetflt vboxnetadp"
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: modules fail to load at boot

Postby cmost » Tue Mar 30, 2010 0:42

Hi and thanks for your reply. I've been around the block awhile with Linux. I previously had all the virtualbox modules exactly like you show them, that is until I realized vboxnetflt vboxnetadp don't seem to exist anymore, so I deleted them leaving only the vboxdrv, which obviously still does exist. The error I get whenever I attempt to modprobe either of the other two virtualbox drivers you list is the following:

FATAL: Error inserting vboxnetflt (/lib/modules/2.6.32-sabayon/misc/vboxnetflt.ko): Invalid module format
FATAL: Error inserting vboxnetadp (/lib/modules/2.6.32-sabayon/misc/vboxnetadp.ko): Invalid module format

In any case, your answer doesn't explain why my wireless module also fails to load autmatically from the /etc/conf.d/modules file.
cmost
Advanced Hen
 
Posts: 208
Joined: Wed Dec 13, 2006 22:25
Location: Cincinnati, OH

Re: modules fail to load at boot

Postby Fitzcarraldo » Tue Mar 30, 2010 1:35

cmost wrote:Hi and thanks for your reply. I've been around the block awhile with Linux. I previously had all the virtualbox modules exactly like you show them, that is until I realized vboxnetflt vboxnetadp don't seem to exist anymore, so I deleted them leaving only the vboxdrv, which obviously still does exist. The error I get whenever I attempt to modprobe either of the other two virtualbox drivers you list is the following:

FATAL: Error inserting vboxnetflt (/lib/modules/2.6.32-sabayon/misc/vboxnetflt.ko): Invalid module format
FATAL: Error inserting vboxnetadp (/lib/modules/2.6.32-sabayon/misc/vboxnetadp.ko): Invalid module format

Forum Search facility throws up the following thread for the VirtualBox modules: Virtual Box can't insert module [Solved].

cmost wrote:In any case, your answer doesn't explain why my wireless module also fails to load autmatically from the /etc/conf.d/modules file.

From the file you posted, yes it does. You have reassigned the modules variable, so it no longer refers to the module b43:

cmost wrote:modules="b43"
modules="vboxdrv"
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: modules fail to load at boot

Postby cmost » Tue Mar 30, 2010 1:44

"From the file you posted, yes it does. You have reassigned the modules variable, so it no longer refers to the module b43"

Umm, what!?!?

Maybe I should have explained my position better. I've been using Debian for seven plus years. I've only moved to Sabayon since last October and I'm still feeling my way around the Gentoo way. From my understanding, the /etc/conf.d/modules file is the place to put modules I want to auto load. How am I reassigning b43? Why did my file used to work and now it doesn't? No offense, but this is why I hate these forums and Gentoo. It's so hard to get a straight answer out of anyone. Sorry, I guess I'm not l33t enough. Clearly I'm doing something wrong or misunderstanding something, as you are quick to point out but instead of explaining how these things in Gentoo work you're leaving me empty handed. So, I'll stumble about until I figure out what you really mean on my own (which is what I usually do,) or if I'm like a lot of people I'll simply give up and go back to Debian or hot to yet another distro. This isn't exactly welcoming to new users of Sabayon. Sorry but that's how these forums come off in a lot of cases.

Hmm, maybe I'll try changing my /etc/conf.d/modules like this...
modules="b43 vboxdrv"

Perhaps this is what you meant (should have said to do?)
cmost
Advanced Hen
 
Posts: 208
Joined: Wed Dec 13, 2006 22:25
Location: Cincinnati, OH

Re: modules fail to load at boot

Postby Fitzcarraldo » Tue Mar 30, 2010 3:22

My posts in this thread are civil and succinct. They are certainly not intended to be curt or supercilious as you appear to be suggesting. When I write "You're doing it wrong", I mean precisely that. You are inferring condescension where none exists. If I'm busy then I don't have time to write considered replies, and I don't think anyone else reading this thread would think anything other than that my replies were simply designed to help you. Furthermore, I did explain "how these things in Gentoo work": I told you that the modules all have to go in one line and I gave you an example from my own installation showing several modules declared on one line, not on separate lines as you showed in your first post. That is a "straight answer".

I have nothing to do with the development of this Linux distribution; I am a user like yourself and I give what spare time I have to act as an unpaid forum moderator and help others. That's all. You say you have been a Linux user for a number of years, so you should be able to understand what I posted. The same principles apply in any Linux distribution. This has nothing to do with the "Gentoo way" as you put it. I am certainly not trying to be highbrow or "l33t", and I'm not expecting you to be.

If you do the following (I paraphrase) in any program source code, script file, configuration file or whatever:

Constant A is assigned to Variable X

and follow it with:

Constant B is assigned to Variable X

then the end result is that Variable X contains the value of Constant B.

Ergo, if you do this:

Code: Select all
modules="b43"

and follow it in your config file with this:

Code: Select all
modules="vboxdrv"

then the variable modules contains only the string (of characters) vboxdrv.

If you want more than one module to be loaded then, as shown in the examples in the header comments in the /etc/conf.d/modules file, you have to declare them all on the same line, as mentioned in my earlier post:

Code: Select all
# You can define a list modules for a specific kernel version,
# a released kernel version, a main kernel version or just a list.
#modules_2_6_23_gentoo_r5="ieee1394 ohci1394"   <------ notice the two modules declared here
#modules_2_6_23="tun ieee1394"   <----- notice the two modules declared here
#modules_2_6="tun"
#modules="ohci1394"

This is why the header comments in the first and second lines of the file refer to modules as a list.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 3 guests