LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-05-2007, 12:49 AM   #1
ryanoa
Member
 
Registered: Jan 2006
Location: Santa Cruz, CA
Distribution: Slack 10.2 and 11.0
Posts: 102

Rep: Reputation: 15
rc.modules-2.6.19.2


I've recently compiled 2.6.19.2 and it works flawlessly. I need to load some modules during boot but I don't have /etc/rc.d/rc.modules-2.6.19.2, do I need to create one? If so, what's the best way to do this? Or, can I load modules somewhere else?

Thanks,
Ryan
 
Old 02-05-2007, 02:58 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
If you have /etc/rc.d/rc.modules you can put them there. Another way is to use /etc/rc.d/rc.local to load the modules you want
 
Old 02-05-2007, 09:29 AM   #3
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Just remember, if you use the rc.local file, it is apparently the first and ONLY modules file that will be checked, so be sure everything you need is in there.
I have had good success keeping ONE rc.modules file for each kernel-version I happen to be using/testing, and using a symlink called rc.modules to point to the correct modules file to be used at the moment.
Lately all my kernels are 2.6.x.x, so I have named the modules file rc.modules-2.6.x.x, and I created a symlink called rc.modules, which points to it.
 
Old 02-05-2007, 06:14 PM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Assuming they are related enough (and they are), you might wanna start with the rc.modules-2.6.x from one of the Slackware 2.6.x kernels, fix whatever you need to, rename it to match your kernel, and symlink rc.modules to it. If not, then I guess you'll have to write it from scratch.

Last edited by H_TeXMeX_H; 02-05-2007 at 06:15 PM.
 
Old 02-05-2007, 06:36 PM   #5
kevmccor
Member
 
Registered: Aug 2004
Location: Tyler TX
Distribution: slackware, mandrake
Posts: 58

Rep: Reputation: 17
Have a look at your /etc/rc.M file. This loads things on startup in multi-user mode (the normal mode). The services you want should be identified by rc.[ service ] scripts which are set to executable if they are to be run. The printing module (parport_pc, lp, etc.), usb modules (ohci_hcd, sg, usb_storage, etc.), and sound modules (snd_*) are among those that are not started there. The firewall (iptables) modules are also not loaded there. Generally, any script in the rc.d directory that is executable will be run at startup. Your kernel may have automatic module loading and unloading as well, in which case the modules will be loaded when a need is detected. You can put module parameters in /etc/modprobe.conf.

There are so many possible variations that it really requires that you become familiar with your hardware and program needs. Run /sbin/lsmod to see what you have and then read up on what you need or think you need.
 
Old 02-05-2007, 07:16 PM   #6
ryanoa
Member
 
Registered: Jan 2006
Location: Santa Cruz, CA
Distribution: Slack 10.2 and 11.0
Posts: 102

Original Poster
Rep: Reputation: 15
Thank you for all the replies,
I made a copy my old rc.modules-2.6.18 and renamed it rc.modules-2.6.19.2, then symlinked rc.modules to the new one. Seems to work just fine, no problems yet.

Thanks again,
Ryan
 
Old 02-06-2007, 10:46 AM   #7
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
no need to symlink. Symlinkin is a pain if you keep on upgradin....

it always searches for rc.modules-'uname -r' first.
then goes for rc.modules.

rc.local is totally different and unrelated. You can put modprobe there but its not wat I would recommend.
 
Old 02-06-2007, 01:25 PM   #8
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by duryodhan
it always searches for rc.modules-'uname -r' first.
then goes for rc.modules.
you sure ? I wouldn't put too much trust in that statement. I'd say "almost always".
 
Old 02-06-2007, 05:56 PM   #9
drumz
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ, USA
Distribution: Slackware
Posts: 188

Rep: Reputation: 33
This is from rc.S:

Code:
# This loads any kernel modules that are needed.  These might be required to
# use your ethernet card, sound card, or other optional hardware.
# Priority is given first to a script named "rc.modules.local", then
# to "rc.modules-$FULL_KERNEL_VERSION", and finally to the plain "rc.modules".
# Note that if /etc/rc.d/rc.modules.local is found, then that will be the ONLY
# rc.modules script the machine will run, so make sure it has everything in
# it that you need.
if [ -x /etc/rc.d/rc.modules.local -a -r /proc/modules ]; then
  echo "Running /etc/rc.d/rc.modules.local:"
  /bin/sh /etc/rc.d/rc.modules.local
elif [ -x /etc/rc.d/rc.modules-$(uname -r) -a -r /proc/modules ]; then
  echo "Running /etc/rc.d/rc.modules-$(uname -r):"
  . /etc/rc.d/rc.modules-$(uname -r)
elif [ -x /etc/rc.d/rc.modules -a -r /proc/modules -a -L /etc/rc.d/rc.modules $
  echo "Running /etc/rc.d/rc.modules -> $(readlink /etc/rc.d/rc.modules):"
  . /etc/rc.d/rc.modules
elif [ -x /etc/rc.d/rc.modules -a -r /proc/modules ]; then
  echo "Running /etc/rc.d/rc.modules:"
  . /etc/rc.d/rc.modules
fi
So the order of preference is rc.modules.local, rc.modules-`uname -r`, and finally rc.modules. The script even tells you if rc.modules is a symlink! The first one found is used, and the rest are ignored.

Edit: Clarification (For you non-Bashers out there)
The first on in the list found that is also executable is used.

Last edited by drumz; 02-06-2007 at 05:58 PM.
 
Old 02-07-2007, 12:30 AM   #10
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
ya rc.modules.local not rc.local. I don't have any rc.modules.local. I only have a rc.local and that has nothing to do with modules. There I just put something like 915resolution etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FATAL: Could not load /lib/modules/2.6.14-default/modules.dep no such file exist dr_zayus69 Linux - Software 3 12-26-2005 06:44 PM
Update-modules: No longer managing /lib/modules/modprobe.conf? geekzen Debian 0 04-03-2004 06:49 PM
Slack9 - no PPP (can't open dependencies file /lib/modules/2.4.18/modules.dep) bluehz Slackware 1 05-04-2003 02:32 PM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM


All times are GMT -5. The time now is 05:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration