You are not logged in.

#1 2009-09-15 19:50:15

manolos
Member
From: Athens, Greece
Registered: 2009-06-06
Posts: 117

[SOLVED] modprobe on startup

hi! i want to modprobe the virtual box module (sudo modprob vboxdrv) on every startup! where i have to write the module? there is no /etc/modules file to edit.

thanks smile

Last edited by manolos (2009-09-18 10:25:08)

Offline

#2 2009-09-15 20:00:59

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED] modprobe on startup

Can't you just add it to modules in /etc/rc.conf MODULES=(... vboxdrv ...)?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2009-09-15 20:16:23

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: [SOLVED] modprobe on startup

loafer wrote:

Can't you just add it to modules in /etc/rc.conf MODULES=(... vboxdrv ...)?

Indeed, this is the way on arch.

Offline

#4 2009-09-15 23:29:08

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] modprobe on startup

This isn't the first time you'd be looking at /etc/rc.conf, I hope?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2009-09-16 01:50:49

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] modprobe on startup

or ...
you can insert it in /etc/rc.local

Offline

#6 2009-09-16 02:10:37

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: [SOLVED] modprobe on startup

perbh wrote:

or ...
you can insert it in /etc/rc.local

Nasty hack yikes
Add it to MODULES in rc.conf

Offline

#7 2009-09-16 03:16:28

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: [SOLVED] modprobe on startup

fukawi2 wrote:
perbh wrote:

or ...
you can insert it in /etc/rc.local

Nasty hack yikes
Add it to MODULES in rc.conf

Essentially they do the same thing.

from rc.sysinit

for mod in "${MODULES[@]}; do
  if [ "$mod" = "$mod#!}" ]; then
    /sbin/modprobe $mod
  fi
done

But having said that, putting a modprobe statement in rc.local is pointless when it's "meant" to go in the MODULES array. Best to keep everything in one spot wink


neutral

Offline

#8 2009-09-16 03:49:08

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: [SOLVED] modprobe on startup

sand_man wrote:

Essentially they do the same thing.

Yep, but duplicating the functionality of another part of the system will drive you insane in 12 months when you're trying to figure out why module XXX is being loaded when it isn't in MODULES tongue

Offline

#9 2009-09-16 04:31:23

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] modprobe on startup

I still beg to differ.
MODULES should contain the things to make the system up and running - extras go into /etc/rc.local
I've been playing around with linux since 1996 and arch since 2005 - I have always done it this way and never had any problems "12 months later".
Let us just accept that some like it "this" way and others "that" way - thank goodness that at least we have a choice.

Offline

#10 2009-09-16 04:39:39

Mardoct
Member
Registered: 2009-08-17
Posts: 208

Re: [SOLVED] modprobe on startup

perbh wrote:

I still beg to differ.
MODULES should contain the things to make the system up and running - extras go into /etc/rc.local
I've been playing around with linux since 1996 and arch since 2005 - I have always done it this way and never had any problems "12 months later".
Let us just accept that some like it "this" way and others "that" way - thank goodness that at least we have a choice.

Fair enough, but it is ill advised to tell someone else to do it, because a few months later for them, they don't remember that you told them to do something contrary to norm.


The human being created civilization not because of willingness but of a need to be assimilated into higher orders of structure and meaning.

Offline

#11 2009-09-16 05:40:41

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: [SOLVED] modprobe on startup

For the benefit of future readers of this thread trying to solve this problem... The normal practise is to put everything in the MODULES array within rc.conf unless you have a predisposition to doing things "different" tongue

Yes, the beauty of choice! big_smile

Offline

#12 2009-09-16 08:38:12

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: [SOLVED] modprobe on startup

For the added benefit of future readers of this thread ... You don't need to put anything in the MODULES array unless you want to :
1) load certain modules in a certain order .
2) blacklist a certain module .
3) Add a module that is both needed and not auto-loaded .

Otherwise , let MOD_AUTOLOAD and udev do there magic .

Last edited by Nezmer (2009-09-16 08:40:07)


English is not my native language .

Offline

#13 2009-09-16 12:23:44

manolos
Member
From: Athens, Greece
Registered: 2009-06-06
Posts: 117

Re: [SOLVED] modprobe on startup

thank you all! it was stupid question i know... but my arch is 1 year old and i forgot many things like how to add a module on startup hmm im still a noob i think!!

Offline

Board footer

Powered by FluxBB