LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-22-2006, 11:26 PM   #1
jeb083079
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core, Red Hat
Posts: 18

Rep: Reputation: 0
How to automatically reload a driver or module during boot up


HOW DO I ADD AN INIT SCRIPT TO RUN AUTOMATICALLY DURING BOOT UP


Here is the present modules when I start the computer:

bash-2.05b# lsmod
Module Size Used by Not tainted
soundcore 6532 0 (autoclean)
autofs 13348 0 (autoclean) (unused)
via-rhine 15628 1
mii 2156 0 [via-rhine]
iptable_filter 2412 0 (autoclean) (unused)
ip_tables 14936 1 [iptable_filter]
mousedev 5524 1
keybdev 2976 0 (unused)
hid 22244 0 (unused)
input 5888 0 [mousedev keybdev hid]
usb-uhci 26188 0 (unused)
usbcore 77024 1 [hid usb-uhci]
ext3 70368 2
jbd 52212 2 [ext3]

Then I change to the directory of the init script which I wanted to run automatically during bootup:

bash-2.05b# cd /usr/src/fx3_sdk/
bash-2.05b# ./fx2000.init start
Loading fx2000 (loading file ./fx2000.o)...OK
remove: fx2000_0 fx2000_1 fx2000_2 fx2000_3 fx2000_4 fx2000_5 fx2000_6 fx2000_7 fx2000_8 fx2000_9
major= 254
.

And here is the modules after running the script, notice the fx2000 module:

bash-2.05b# lsmod
Module Size Used by Not tainted
fx2000 4360 0 (unused)
soundcore 6532 0 (autoclean)
autofs 13348 0 (autoclean) (unused)
via-rhine 15628 1
mii 2156 0 [via-rhine]
iptable_filter 2412 0 (autoclean) (unused)
ip_tables 14936 1 [iptable_filter]
mousedev 5524 1
keybdev 2976 0 (unused)
hid 22244 0 (unused)
input 5888 0 [mousedev keybdev hid]
usb-uhci 26188 0 (unused)
usbcore 77024 1 [fx2000 hid usb-uhci]
ext3 70368 2
jbd 52212 2 [ext3]

But when I try to add using chkconfig, this is the error:

bash-2.05b# chkconfig --add fx2000.init
service fx2000.init does not support chkconfig
bash-2.05b#
 
Old 08-23-2006, 04:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
chkconfig works by rading metadata tags at the top of the script to provide default start numbers and such. you can add this data in by copying the logic from another file, but you don't really need it. just copy the script to /etc/init.d/ and then create a symlink to it from /etc/rc3.d/ calling it somethign like "S50myscript". the S50 part means it will start the script at position 50, so you may need to tune this to put it into the most suitblae positino relative to the other scripts.
 
  


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
Tomcat reload servlet is very slow, but reload jsp is fast and good? gsbarry Programming 2 04-28-2006 09:34 PM
Why do I have to reload the wireless module to make it work?? kloss Linux - Wireless Networking 3 02-19-2006 12:45 PM
how to reload sbp2 module /Flush terminal command cache Lakota Mandriva 1 12-07-2004 02:08 PM
NIC Driver Module Problem at Boot Up redsky Linux - Networking 0 05-26-2004 12:53 PM
Loading a module automatically Tomasfuego Linux - Hardware 2 01-12-2003 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:16 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
Open Source Consulting | Domain Registration