Automatic module load on boot [Solved]

Discussions Regarding Software

Moderator: Moderators

Automatic module load on boot [Solved]

Postby thenthenio » Tue Sep 23, 2008 12:28

Hello everybody.
On SL 3.4F I had /etc/modules.autoload.d/kernel-2.6 file with a list of the kernel modules to load at boot time.
Now, in SL 3.5 that directory is not even there any more.
How can I load modules such as: vboxdrv, raw1394...?

Many thanks.
Mauro
Last edited by thenthenio on Tue Sep 23, 2008 22:59, edited 1 time in total.
thenthenio
Old Dear Hen
 
Posts: 522
Joined: Thu Mar 01, 2007 23:11
Location: Melegnano (MI) Italy

Re: Automatic module load on boot

Postby KelloggsFrosties » Tue Sep 23, 2008 12:40

I am not sure if this is the best way, but i do it by loading the modules via

Code: Select all
modprobe modulex


and afterwards saving via

Code: Select all
update-modules [force]
KelloggsFrosties
Young Hen
 
Posts: 31
Joined: Tue Aug 26, 2008 17:24
Location: Freiburg (Germany)

Re: Automatic module load on boot

Postby Fitzcarraldo » Tue Sep 23, 2008 12:43

The configuration file to load modules has changed to /etc/conf.d/modules. See the Gentoo Baselayout and OpenRC Migration Guide
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7984
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Automatic module load on boot

Postby thenthenio » Tue Sep 23, 2008 14:48

I was looking for something like "module autoload" in Gentoo site but I did not find that page...

Thank you Fitzcarraldo.
Mauro
thenthenio
Old Dear Hen
 
Posts: 522
Joined: Thu Mar 01, 2007 23:11
Location: Melegnano (MI) Italy

Re: Automatic module load on boot

Postby thenthenio » Tue Sep 23, 2008 22:03

Ok, I've seen that guide.
Here is my /etc/conf.d/modules file:
# 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"

# 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.

# Load raw1394 for dv camera operations
modules="raw1394"

# Load vboxdrv for VirtualBox virtual machines
modules="vboxdrv"

# Load tun for OpenVPN tun/tap support
modules="tun"

But doesn't work ..

What's the next step?
Mauro
thenthenio
Old Dear Hen
 
Posts: 522
Joined: Thu Mar 01, 2007 23:11
Location: Melegnano (MI) Italy

Re: Automatic module load on boot

Postby Fitzcarraldo » Tue Sep 23, 2008 22:09

You're doing it wrong. See the examples in the Gentoo Baselayout-2/OpenRC migration guide, and in the comments of the /etc/conf.d/modules file itself. Here's my /etc/conf.d/modules, for example (notice the entry I made at the end for vboxdrv):

Code: Select all
$ cat /etc/conf.d/modules
# 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"

# 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.

# Following two lines added by me on 01.06.08 (because I mistakenly allowed etc-update to overwrite /etc/conf.d/modules):
modules_2_6="vboxdrv"
module_vboxdrv_args=""
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7984
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Automatic module load on boot

Postby Fitzcarraldo » Tue Sep 23, 2008 22:22

Ah, I have just realised modules is a list, so you need to try:

Code: Select all
modules="<module1> <module2> <module3>"
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7984
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Automatic module load on boot [Solved]

Postby thenthenio » Tue Sep 23, 2008 23:02

Thank you Fitzcarraldo!
You are everywhere never tired soving my (and other's) problems.
Modules is a list and thesr should be only one per kernel version I think.
That was the issue.

Mauro
thenthenio
Old Dear Hen
 
Posts: 522
Joined: Thu Mar 01, 2007 23:11
Location: Melegnano (MI) Italy


Return to Software in General

Who is online

Users browsing this forum: No registered users and 1 guest

cron