Slackware with new Kernel - rc.modules is called more than once?
Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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-220.127.116.11-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:
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.
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.
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-18.104.22.168-smp), but should work for other versions since it's using variables and stuff.
### 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
# Only rebuild dependencies if new module(s) are found:
if [ ! "" = "$NEWMODS" ]; then
echo "Updating module dependencies for Linux $RELEASE:"
echo "Module dependencies up to date (no new kernel modules found)."
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:"
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?
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 ).
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.