LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Loading moduls at startup? (https://www.linuxquestions.org/questions/linux-general-1/loading-moduls-at-startup-3542/)

Marcel 06-20-2001 04:13 AM

Loading moduls at startup?
 
I've setup my tv-card on RedHat 7.1.
The module is inserted like this: insmod bttv card=2
How do i set up my system so that this is loaded at bootup?
I saw modules.conf but i didn't really understand the alias parts.

Thanks
:Pengy:

jharris 06-20-2001 07:20 AM

What distro are you using? On Slackware you would edit /etc/rc.d/rc.modules and put it in there. Also you probably want to use modprobe not insmod as modprobe will also load any dependencies that the module has.

cheers.

Jamie...

Marcel 06-20-2001 01:16 PM

I use RedHat 7.1

DavidPhillips 06-24-2001 10:48 AM

Did you set dependency
 
I think you did not do depmod -a

jharris 06-24-2001 02:31 PM

Depmod shouldn't have any effect on loading a module at startup... it just lists the modules that need to be loaded first.

Jamie...

DavidPhillips 06-25-2001 01:04 AM

Oh
 
:cool:

I thought it wrote them to the depfile.

:newbie:

I think you have to put them in /lib/modules/2.x.xwhatever/kernel/somefolder/

every thing under the /kernal folder is a module.

this is what I am going by I know it's not a network card but it is a module and it is RedHat


C. Installation guide using Redhat 5.XX
=======================================

Step 1 : Copy tulip.o into the latest kernel's modules:
cp tulip.o /lib/modules/2.0.XX/net/tulip.o
Where the XX is the version number of the latest kernel.

Step 2 : Update kernel's module dependencies:
/sbin/depmod -a


on 7.1 our modules are in the kernel folder



2.4.2-2enterprise
|-- build -> ../../../usr/src/linux-2.4.2
|-- kernel
| |-- arch
| | `-- i386
| | `-- kernel
| | |-- cpuid.o
| | |-- microcode.o
| | `-- msr.o
| |-- drivers
| | |-- atm
| | | |-- ambassador.o
| | | |-- atmtcp.o
| | | |-- eni.o
:Pengy: :Pengy:


Your driver options should go in the /etc/modules.conf file

The alias is the module like bttv

the device name is hardware like eth0 or sound_slot_0 or parport_lowlevel

so it would go like this

alias devicename driver

alias eth0 tulip

options tulip options=x debug=x

you will probably have to check around to see how to do it

maybe something like

alias devicename bttv

options bttv options=card=2

I Have no Idea if this will work. You will have to check for the device name also.

Maybe just take the easy way out and put the command to load it in /etc/rc.d/rc.local


Let us know what you do, We are learning here





jharris 06-25-2001 02:43 AM

Re: Oh
 
Quote:

Originally posted by DavidPhillips

I thought it wrote them to the depfile.

It does create the dependencies that are stored in the depfile (AFAIK) but this won't actually force the module to be loaded at boot time, which was the original question "How do i set up my system so that this is loaded at bootup?". Clearly if you're trying to use modprobe then it may not work without the dependencies wether loading at boot time or not, so its a valid comment to make... I just didn't want to add to the confusion by letting it sound like depmod controlled when modules got loaded.

As you suggested, editing something like /etc/rc.d/rc.local is a winner in this situation... I didn't want to guess at the names of the rc files as I can't remember their names off the top of my head in Redhat.

cheers!

Jamie...


All times are GMT -5. The time now is 02:21 PM.