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.
Do you want to know how modprobe works (Google's your friend for this) or do you need to know how modules are scheduled for loading at boot? In this case, to a certain amount, it depends on the distribution you're using, so for more exact information, you'd need to provide a bit more information.
Use Google to find out about modprobe (Wikipedia helps, too) or use man modprobe - documentation's on-board with GNU/Linux.
The rest is sifting through all of /etc/init.d - it's a bit of work, but it's extremely informative. I'd start by carefully reading the output of dmesg | less (less lets you scroll back and forth, leave the listing with "q") to find out something about what gets configured when. With that information (especially init states), it's easier to find a particular module or configuration script. It's a very educating experience.
Okay, I didn't give you the best advice - I directed you to a directory where you find important scripts, but the actual information is elsewhere. But it's not really easier...
I'm not an expert on the stuff I'm going to talk about, so please, don't come down too hard on any shortcomings, I'm just trying to make things understandable, but what follows is far from complete.
Booting up means that an initial process, called init, takes the system through different phases, called "runlevels"; during every phase, certain parts of the system get configured and several services and sometimes applications are started. All hardware recognition and configuration happens in one of those phases. When exactly a specific module is called is visible in the configuration files within the runlevels' configuration directories. Those sit in /etc and are called "rc*.d" (where the "*" marks a number from 0 to 6 and the letter "S"). Looking through those directories gives you an idea of what gets done how and when. But as I said, if you don't use a file like /etc/modules to load specific modules, you'll find everything that's important somewhere in there. For instance, all "restricted" modules (those are mostly highly specific to the machine you're on - and for that reason, crucial) get loaded very early by a special tool; the script for that sits - accordingly - in /etc/rc0.d. Other stuff is only useful later, so it gets called in a later phase.
ya thanks a lot...actually i am having the file called "/etc/modules"...
sharief@sharief-desktop:~$ cd /etc
sharief@sharief-desktop:/etc$ cat modules # /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
Well, sharief, you've been a little too vague with your questions for us to answer you very clearly. If you're looking to load a specific module at boot time (say, your video driver or wireless driver) then you've already found what you're looking for. You can simply add the name of your driver's kernel module (whatever it is that you type in when you load it, i.e.
root@yourbox:/# modprobe DRIVER_NAME
Add DRIVER_NAME to that file (/etc/modules) just below lp.
If you're looking for some other type of information, you need to go about asking a bit differently.
Thanks for your reply...actually i disabled the USB support when i compile the kernel...after that i planned to do that module manually i tried to insert dynamically...and it works nice when i use insmod "insmod".....but my USB port didnt work....so i decided to do with modprobe,so that all nessary module will install automatically....but when i use "modprobe" it tells that "FATAL :module not found"...so i used "depmod -a"....but i dont know the use of that command,one of my friend told me to use that...
after that i used "modprobe" now it works...and i saw that module in the "lsmod" too....but still my USB port is not working...
Well I'm not too sure about your USB problem, that seems a little strange. What modules are loaded in your lsmod?
modprobe is a simple command that takes the name you give it as a parameter and checks against a list of built modules it has. If the module exists then it loads the module, and all of the modules upon which the first is dependent. The 'list' of current modules and their dependcies is created and maintained by using depmod. When you run a depmod -a, you tell your computer to search through the current module tree (/lib/modules/*Your_Kernel_Name*/) and find any modules that have been added since the last time the list was updated, and find out about their dependencies, etc. Hence why your usb module didn't work w modprobe until you established it with depmod.