You are not logged in.

#1 2005-01-26 18:41:18

cmp
Member
Registered: 2005-01-03
Posts: 350

Modules and multiple kernels

Hi, I have multiple kernels installed: the Arch IDE stock kernel, one nitro kernel and one morph kernel, the last two both selfcompiled. But while the arch kernel puts most of the driver into modules, I choose to compile some often used drives directly into the kernel.
So I had to remove these modules from my rc.conf modules array, but when I want to boot my Arch Stock kernels I need these modules, but they won't get loaded.
So my question is, wheter there is any way to maintain a module array for every Kernel on my computer?
I don't know, wheter the rc.conf file is a bash script, but if it is, it would be quite easy to add this support by using something like source /etc/modules-$(uname -r).conf.

Offline

#2 2005-01-26 21:23:10

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: Modules and multiple kernels

/etc/rc.conf should be bash,
you can take a look in /etc/rc.sysinit if you are going to fix your problem, as you say, it shouldn't be so difficult to have more than one modules array in /etc/rc.conf and load them by uname command,
good luck with it and don't forget to add /etc/rc.sysinit as NoUpgrade in /etc/pacman.conf otherwise it will be nuked by the next initscript upgrade,


arch + gentoo + initng + python = enlisy

Offline

#3 2005-01-26 21:26:38

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

Re: Modules and multiple kernels

like xerxes said... you can just throw a big old bash "if `uname -r` = "KERNEL-X"; then ...." in rc.conf

Offline

#4 2005-01-26 21:28:39

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: Modules and multiple kernels

thanks.
but suppose I would want to use extra files, where would they go? - something like /etc/modules-2.6.10-ARCH.conf ?

Offline

#5 2005-01-26 21:31:27

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: Modules and multiple kernels

I don't know if that's possible because /etc/rc.sysinit loads the modules array from /etc/rc.conf so I think you must work from there,
I'm not an expert but it seems like the way to go,


arch + gentoo + initng + python = enlisy

Offline

#6 2005-01-26 21:46:55

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: Modules and multiple kernels

I just had a quick look, it would be definitly possible to use different files, because both rc.sysinit and rc.conf are just bash script files, where rc.sysinit includes rc.conf. and because I think the rc.conf should hold all settings, I added the code to the rc.conf file:

case $(uname -r) in
"2.6.10-morph17-ARCH")
MODULES=(supermount usbhid snd-intel8x0 soundcore snd snd-pcm snd-pcm-oss usb-storage ohci-hcd lp)
;;

"2.6.10-ARCH")
MODULES=(snd-intel8x0 soundcore snd snd-pcm snd-pcm-oss usb-storage sis900 ohci-hcd lp)
;;

*)
# load no modules at all
MODULES=()
;;
esac

Offline

#7 2005-01-26 21:49:30

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

Re: Modules and multiple kernels

wow, be careful with the "*" case... I'd add some defaults there... like network or something... though you don't seem like a noob, so I'll let you be 8)

Offline

#8 2005-01-27 13:45:18

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: Modules and multiple kernels

If I ever get to this point, something seems to be wrong with my system and then I will have to load the needed modules by hand, but that isn't such a big deal.
When I was thinking about this, I came up with a kind of interactive startup, where you will be presented with a list of modules and services. Then you would be able to just specify which modules to load - it would defintly ease the use of a rescue disk.
Something like:

Found modules:
sis900
ntfs
...
Which modules do you want to load?
>> sis900 ntfs 

I will start to think about it this afternoon.

And I have another question: Is there any way to pass strings from the boatloader (currently lilo, because I the default install of grub was broken) to the kernel or bash?

btw.: thanks for not thinking me noob, but I have only been using a real linux for a half a year - started with Suse, but this can hardly be called a real distribution, then I proceeded with Fedora Core 2 and finnaly came to Arch, the greatest distro I tried so far. - I also tried Debian for 1/2 days, but was quite dissapointed, maybe because I didn't know the stuff I know now.

Offline

Board footer

Powered by FluxBB