LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 11-12-2003, 04:22 PM   #1
murray_linux
Member
 
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210

Rep: Reputation: 30
rc.modules vs. modules.conf


Perhaps someone can point me to the right documentation here, or give me the answer.

So slackware uses etc/rc.d/rc.modules to load up its modules. Is this a standard, or is this a slackware specific thing?

When installing alsa, it asks me to put in the "modules.conf" these lines:

# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-intel8x0
# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

Unless I'm mistaken, Slackware doesn't have modules.conf. Should i put these in rc.modules? I see that the lines in rc.modules are set up like this

/sbin/modprobe <module name>

Will the alias command work in rc.modules? or do i need to modify the lines to something like this:

/sbin/modprobe sound-service-0-12 snd-pcm-oss
 
Old 11-12-2003, 04:27 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Yes, you will want to put them in rc.modules.

Compared to other Linux Distro's, its more of a Slackware thing really as Slackware tends to put most of its startup scripts, etc in /etc/rc.d
 
Old 11-12-2003, 04:36 PM   #3
murray_linux
Member
 
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210

Original Poster
Rep: Reputation: 30
coolio,

and that alias command works in rc.modules?

i'd test it out, but i'm at work right now. I should be working at work, shouldn't i?
 
Old 11-22-2003, 05:35 PM   #4
flipper333
Member
 
Registered: Nov 2003
Posts: 51

Rep: Reputation: 15
no, no, guys, rc.modules is old stuff, read the header.

compile kernel module loader and devfs in, slack uses kmod.

autoload is done with entries in modules.conf included by modules.devfs.

y
tom
 
Old 11-22-2003, 06:33 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by flipper333
no, no, guys, rc.modules is old stuff, read the header.

compile kernel module loader and devfs in, slack uses kmod.

autoload is done with entries in modules.conf included by modules.devfs.

y
tom
Maybe your not familiar with Slackware at all but it actually uses /etc/rc.d/rc.modules to load modules at boot up instead of /etc/modules.conf

Regards.
 
Old 11-22-2003, 06:41 PM   #6
flipper333
Member
 
Registered: Nov 2003
Posts: 51

Rep: Reputation: 15
sir,

# On systems using KMOD this file will be mostly commented out,

roger that?

y
tom
 
Old 11-22-2003, 06:51 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by flipper333
sir,

# On systems using KMOD this file will be mostly commented out,

roger that?

y
tom
And I don't see anywhere in his post saying he patched his system to use kmod instead. Reread his first post, he wanted to know the difference. With Slackware 9.1, it uses the rc.modules file by default. Yes, slackware does come with a modules.conf file but most of the time its empty and by default, the modules will be called or read from rc.modules.

Regards.

PS. kmod from what I've read is a replacement for kerneld which only loads modules in a sense. It doesn't actually use the file modules.conf but rather loads them by using the modprobe command which then in turn will read from the modules.conf file but in Slackware will read from the rc.modules if you initially loaded from there, etc.

Taken from kernel documentation lists:

-Kmod is a simple replacement for kerneld. It consists of a
-request_module() replacement and a kernel thread called kmod. When the
-kernel requests a module, the kmod wakes up and execve()s modprobe,
-passing it the name that was requested.

Last edited by trickykid; 11-22-2003 at 07:16 PM.
 
Old 11-23-2003, 04:36 AM   #8
flipper333
Member
 
Registered: Nov 2003
Posts: 51

Rep: Reputation: 15
dear Sir,

i dont agree, but if you like handywork do as you want, here's all a bootup calling rc.modules does :

### Update module dependencies ###
RELEASE=`uname -r`
# If /usr is mounted and we have 'find', we can try to take a shortcut:
if [ -x /usr/bin/find -a -e /lib/modules/$RELEASE/modules.dep \
-a /lib/modules/$RELEASE/modules.dep -nt /etc/*****modules.conf***** ]; then
NEWMODS="`/usr/bin/find /lib/modules/$RELEASE -type f -newer /lib/modules/$RELEASE/modules.dep`"
# Only rebuild dependencies if new module(s) are found:
if [ ! "" = "$NEWMODS" ]; then
echo "New kernel modules have been found in /lib/modules/$RELEASE/:"
echo "$NEWMODS"
echo "Updating module dependencies for Linux $RELEASE:"
/sbin/depmod -a
else
echo "Module dependencies up to date (no new kernel modules found)."
fi
else # we don't have find, or there is no existing modules.dep, or it is out of date.
echo "Updating module dependencies for Linux $RELEASE:"
/sbin/depmod -A
fi

...rest is commented out.

...using rc.modules instead of the kernel autoloader/REMOVER means youve to MANAGE drivers all by manual work, i wont do so.

kind regards,
tom
 
Old 11-23-2003, 08:51 PM   #9
shepper
Member
 
Registered: Mar 2003
Location: Dry, Dusty and Conservative
Distribution: OpenBSD, Debian Wheezy/Jessie
Posts: 449

Rep: Reputation: 33
For Slackware 9.1 I have my scripts for Alsa 0.9.8 in modules.conf along with some scripts that load winmodem modules. It works GREAT.

Last edited by shepper; 11-23-2003 at 08:53 PM.
 
  


Reply



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
Conf.modules Vs Modules.conf Issue, lost eth0 initialization LinuxFreebie41 Linux - General 3 11-04-2004 06:02 AM
Update-modules: No longer managing /lib/modules/modprobe.conf? geekzen Debian 0 04-03-2004 06:49 PM
/etc/conf.modules is more recent than /lib/module/2.2.15-4mdk/modules.dep Derek-kun Linux - Newbie 3 09-26-2003 02:56 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration