You are not logged in.

#1 2008-02-11 21:05:02

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

can rc.conf's MODULES detect which kernel I'm booting?

...because on one kernel I have some things compiled in that I want loaded by MODULES in another kernel.

Right now I either get "FATAL: Module not found" errors (and probably some time loss) when I specifiy the large set of modules and boot the kernel with compiled in stuff, or modules have to be loaded manually afterwards (making for an even larger time loss) when I specify the small set but launch the core kernel.

Weird setup?

Offline

#2 2008-02-11 21:38:30

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: can rc.conf's MODULES detect which kernel I'm booting?

Kernel-version-specific module loading is not supported by our init scripts. However, it would be relatively easy to implement for someone who is familiar with bash scripting. If you want to try it, have a look at the relevant section of /etc/rc.sysinit.

Remember that pacman will not know that you have edited this file, and will therefore overwrite your changes the next time the initscripts package is updated. You can avoid this with suitable entries in /etc/pacman.conf

Offline

#3 2008-02-11 21:41:49

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: can rc.conf's MODULES detect which kernel I'm booting?

Could you not just bugger around with rc.conf, something like:

[ "$(uname -s)" = "kernel26-ARCH" ] && MODULES=(module1 module2)
[ "$(uname -s)" = "kernel26-viper" ] && MODULES=(....)

Would that work?

Offline

#4 2008-02-11 23:06:33

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: can rc.conf's MODULES detect which kernel I'm booting?

alternatively, you could "bugger" with rc.local:

if [ "$(uname -s)" = "kernel26-ARCH" ]; then
    modprobe -a module1 module2
fi

Offline

#5 2008-02-12 00:56:02

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: can rc.conf's MODULES detect which kernel I'm booting?

lol - yeah, in retrospect that wasn't the term I was looking for, but I guess it just came out that way.  "fiddle around" I suppose.

Offline

#6 2008-02-14 12:38:14

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: can rc.conf's MODULES detect which kernel I'm booting?

Cerebral wrote:

Could you not just bugger around with rc.conf, something like:

[ "$(uname -s)" = "kernel26-ARCH" ] && MODULES=(module1 module2)
[ "$(uname -s)" = "kernel26-viper" ] && MODULES=(....)

Would that work?

It seems so:

[ "$(uname -r)" = "2.6.24-zen1-20080206" ] && MODULES=(...)

worked fine, and I haven't yet tried to boot the core kernel.
Thanks a lot for all your suggestions. It should be a smoother experience now.

Offline

Board footer

Powered by FluxBB