Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 08-19-2006, 07:22 AM   #1
LQ Newbie
Registered: Jun 2006
Posts: 28

Rep: Reputation: 15
how to load a kernel module at boot time

Hi all,
In my project i have written one driver on top of the parallel port.Now i want to Load my driver which is a kernel module to load into the kernel at boot time whenever i starts the system.
I am using Fedora Core 3 of 2.6 kernel. I have gone through some articles for loading a kernel module at boot time what they are saying is that add modules to /etc/modules and aliases in the /etc/module.conf but these two files are not there in my system. So please help me in this. I also want to load the application daemon which initializes the driver which will also wants to start at boot time.
I am greatful if you explain how to do it with a sample shell script example for both daemon application and driver module.
Old 08-19-2006, 07:48 AM   #2
Senior Member
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Reading old articles??????

Try /etc/modprobe.conf you can also add the module loading to someplace like /etc/rc.d/rc.local if need be.

$ cat /etc/rc.d/rc.local
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

# I2C adapter drivers
modprobe i2c-sis96x
# I2C chip drivers
# modprobe eeprom
# sleep 2 # optional
/usr/bin/sensors -s # recommended

# My system tweaks

/usr/sbin/ntpdate -u

/sbin/modprobe evdev
/sbin/modprobe -r snd_intel8x0m
Added a couple of examples (above) starting at the comment; # My system tweaks

$ cat /etc/modprobe.conf
alias net-pf-10 off
alias eth0 sis900
alias eth1 orinoco_cs
alias eth2 prism54
# I2C module options
alias char-major-89 i2c-dev
alias snd-card-0 snd-intel8x0
options snd-card-0 index=0

install snd-intel8x0 /sbin/modprobe --ignore-install snd-intel8x0 && /usr/sbin/alsactl restore >/dev/null 2>&1 || :

remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-intel8x0

alias usb-controller ehci-hcd
alias usb-controller1 ohci-hcd


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
Load module at boot time hguts Programming 1 01-24-2006 09:02 AM
how to load a module at boot time appas Linux - Software 7 09-29-2004 06:04 AM
How to load a module at boot time om Feodra 2? jp2004 Linux - Software 5 09-24-2004 07:30 AM
how to load a module at boot time trutnev Linux - Newbie 1 03-14-2004 12:54 PM
Load module(s) at boot time LordChaos Linux - General 2 01-18-2003 03:28 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration