LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-03-2008, 02:42 AM   #1
nikhil86
LQ Newbie
 
Registered: Apr 2007
Posts: 17

Rep: Reputation: 0
Exclamation How to autoload a kernel module using rc.local?


Hi
I've written a simple helloworld kernel module, and tried insmod on it and it worked perfectly.
I'd like to put this module into the kernel automatically at bootup, without manually typing #insmod hello.ko
I've inserted an entry into rc.local as
modprobe hello.ko
But where do i put the hello.ko file?? For now i've left it in the same dir as rc.local but it doesn't work.

I'm using Fedora 8...

thanks
Nikhil
 
Old 04-03-2008, 04:21 AM   #2
tiagoreul
LQ Newbie
 
Registered: Jun 2007
Location: Campina Grande, PB - Brazil
Distribution: Fedora 8
Posts: 20

Rep: Reputation: 0
Quote:
Originally Posted by nikhil86 View Post
Hi
I've written a simple helloworld kernel module, and tried insmod on it and it worked perfectly.
I'd like to put this module into the kernel automatically at bootup, without manually typing #insmod hello.ko
I've inserted an entry into rc.local as
modprobe hello.ko
But where do i put the hello.ko file?? For now i've left it in the same dir as rc.local but it doesn't work.

I'm using Fedora 8...

thanks
Nikhil

The kernel modules directory is
/lib/modules/<kernel-version>/
(for booth 32 or 64-bit versions)


It's recommended to put your custom modules in
/lib/modules/<kernel-version>/misc
directory.

Last edited by tiagoreul; 04-03-2008 at 04:24 AM.
 
  


Reply



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
prevent module autoload tovis Debian 2 10-02-2007 03:53 AM
after compiling kernel: failed to load /etc/modules.autoload.d jay73 Linux - Software 1 04-18-2007 09:51 AM
[Error] Kernel Module : No kernel module build environment saman007uk Debian 7 09-09-2006 06:34 PM
Disable hotplug autoload of usb_storage module exodist Linux - General 3 08-16-2006 07:44 AM
mepis 3.3 with 2.6.10 kernel e1000 nic module autoload bredfern Linux - Hardware 0 06-02-2005 04:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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