LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-24-2006, 08:52 AM   #1
hguts
LQ Newbie
 
Registered: Jul 2003
Location: Canada
Distribution: RedHat
Posts: 2

Rep: Reputation: 0
Load module at boot time


Is there a way to load my own module (it doesnt rely to any hardware) at boot time.

In the the file etc/modules.conf I added
path=/home/my_module/
alias kixa kilo_poli.o

After botting up, the module is not loaded but running modprobe kixa will do it (after all thats the purpose of modules.conf).
But, my purpose is to see my module loaded at boot time (at the same time when other modules e.g. net device drivers or serial port are being loaded at boot time).

Well, thru google, I saw some guys talking about a file /etc/modules.autoload/kernel-version but I guess this is specific to a such distro and I do not want to rely to a specific distro.


Best regards.

Thanx.
 
Old 01-24-2006, 10:02 AM   #2
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
Ok, from what i can tell, this is a distro specific process. the /etc/modules.autoload/kernel-version you mentioned is the way gentoo handles it, and it is very simple.

this link has some information on compileing modules, and then configuring your distro to auto load them. It says that debian and redhat have identical boot procedures, so they can be configured the same.

Directly from the website:

Having logged in as root, use your favourite text editor to create a new file called /etc/rc.d/init.d/modules.init with the following contents therein:

Code:
# Modules initialisation.
#
# Start up the module auto-loading daemon.
/sbin/kerneld

# Mount all currently unmounted auto-mounted partitions.
/sbin/mount -a
Having created the above file, perform the following steps whilst logged on as root:

Code:
cd /etc/rc.d
chmod 755 init.d/*
cd rc3.d
ln -s ../init.d/modules.init 05modules.init
i haven't had to try this, i use gentoo now, but it should work for you.
 
  


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
ndiswrapper module takes an awfully long time to load xiang83 Linux - Hardware 0 02-12-2005 11:58 AM
how to load a module at boot time appas Linux - Software 7 09-29-2004 07:04 AM
How to load a module at boot time om Feodra 2? jp2004 Linux - Software 5 09-24-2004 08:30 AM
how to load a module at boot time trutnev Linux - Newbie 1 03-14-2004 01:54 PM
Load module(s) at boot time LordChaos Linux - General 2 01-18-2003 04:28 PM


All times are GMT -5. The time now is 11:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration