LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-14-2011, 02:50 AM   #1
me-$-on
Member
 
Registered: May 2007
Posts: 64

Rep: Reputation: 15
Slackware with new Kernel - rc.modules is called more than once?


Hello.

After I have chosen to use my new compiled and installed kernel ( 2.6.35-stable ) with my Slackware 12.2, i relinkend the rc.modules against the rc.modules.local.

In this I just added

Code:
 echo "rc.modules->rc.modlues.local is called, without any commands but this".
And during the bootup dmesg screen I can see, that this modules is called more than once.

Now my question : is that right? I Suppose this should not be, should it ?


THX in advance.


Greetings

me-$-on
 
Old 01-14-2011, 03:49 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Can't recall having seen an rc.modules.local ... is that something
you did yourself? If you're concerned about "repeat handling" of it
I'd be grepping /etc/rc.d for files with rc.modules.local in them.


Cheers,
Tink
 
Old 01-14-2011, 04:19 AM   #3
me-$-on
Member
 
Registered: May 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Ok

As I have seen, the rc.S calls a rc.modules.local, a modules.uname -r or at least one other rc.modules-whatever, but only one of them, checking rc.modules.local prior to the other two. ( I hope, I do not have a typo )
After I had installed my new kernel, I saw that rc.modules was still pointing to the modules-2.6.27.7-smp and called it during boot.
After reading some things, I chose the possibility of redirecting it to an file, which several posts on the web recommended:

rc.modules.local.

So the rc.S usually should be called more than once, because this decides, which rc.modules shall be called.

I should take a look at the dmesg from my ditro-stock kernel paying attention whether this happens there, too.

But it is really interesting, I did nothing but compiled a new kernel and installed it. And the modules. Following a Wiki-how to.

If it wll be the same with stock kernel, I really do not see any reason why linux should call one script more than ....... oh, perhaps because of dependencies in some way..... hmmmm.

Greetings


me-$-on

Last edited by me-$-on; 01-14-2011 at 04:23 AM.
 
Old 01-17-2011, 03:10 AM   #4
me-$-on
Member
 
Registered: May 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Seems solved : Must be like this

Hello again.

At the weekend I started my stock-kernel , and saw, that the rc.modules ( we, know, how rc.S uses its calls ) one time calls a rc.modules-"uname -r" ( which is found during bootup, because I started the stock kernel ) , and later, at the end it also calls the rc.local.
That means , the call is really redundant, if i set the link rc.modules to rc.local and start my own kernel.
It really means, that relinking rc.modules to a rc.local is even not so good,
because the rc.S script does not rely on the link-target of rc.modules.

At least i assume this now.

So, I will remove this link as long I do not tend to start any special modules.

I still have to thank.

Greetings

me-$-on.
 
Old 01-17-2011, 03:54 AM   #5
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware32-stable, Debian32 stable, LFS 7.1
Posts: 385

Rep: Reputation: 44
If I understand you right, it sounds like all you need to do is update the symlink /etc/rc.d/rc.modules, which by default points to /etc/rc.d/rc.modules-<kernel ver>

So if you're using 2.6.35-stable

ln -sf /etc/rc.d/modules-2.6.35-stable /etc/rc.d/rc.modules

But if you're compiling from scratch, you'd have to provide your own rc.modules file.

Someone will hopefully correct me if I'm wrong, but in most cases, in modern kernels, modules will load automatically. So the only thing you might want to have in your new modules files is this excerpt ( which is contained in /etc/rc.d/rc.modules-2.6.33.4-smp), but should work for other versions since it's using variables and stuff.

Code:
### Update module dependencies ###
# 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 -mindepth 2 -type f -newer /lib
/modules/$RELEASE/modules.dep)"
  # Only rebuild dependencies if new module(s) are found:
  if [ ! "" = "$NEWMODS" ]; then
    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
Any modules that aren't loading automatically could be added after that snippet, using modprobe.

One more thing: rc.local and rc.modules are two completely separate files, and have nothing to do with each other.

So, did I understand your question somewhat correctly?
 
Old 01-18-2011, 03:35 AM   #6
me-$-on
Member
 
Registered: May 2007
Posts: 64

Original Poster
Rep: Reputation: 15
Yes,

You are absolutely right, the rc.modules link seems to be some kind of customizing, for adding or removing individual modules.

What made me wonder, was the fact, that the rc.modules-(ker-ver) was filled with many entries.
This was with my stock Slackware.
But after removing its link, the distro started also correctly, so I would agree, that the kernel itself checks for its activated modules, which reside in /lib/modules. ( At least I think so ).

LFS ?

Tried that ten times, will try this the eleventh very soon, would like to build an own distro, flat, fast, highly compatible witht the recent and most common multimedia hardware, it shall be the distro for a mediacenter, enabling
lirc , a vm , and so on. I surely will be here again, if something will not work properly.

See ya.
 
  


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
Why Slackware 10.0 kernel driver modules is in .o.gz format yangsongx Slackware 3 05-19-2008 11:42 PM
Slackware 11/2.6 kernel: no mouse and no modules JockVSJock Slackware 6 10-16-2006 10:57 AM
No sound modules after compiling kernel-2.6.11.11 on Slackware 10.1 Basel Slackware 11 06-17-2005 05:38 PM
kernel modules in slackware e1000 Slackware 8 12-16-2003 12:12 AM
Updated Slackware Kernel - no modules Freaksta Linux - Software 6 02-28-2003 11:53 AM


All times are GMT -5. The time now is 01:48 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration