Solved

Loading a Kernel Module in Linux

Posted on 2006-07-19
5
298 Views
Last Modified: 2010-04-20
HI expert
I am new to kernel module Loading under linux , i compiled the sample program

but  i could not load the module using insmod  , modprobe
i am using Mandriva 10.0      kernel version   uname -r    2.6.12-12mdk-i686-up-4GB

insmod: error inserting 'hello-2.o': -1 Invalid module format

FATAL: Module hello-2.o not found  

are the 2 errors that i got ,

please let me what is the correct way to load a kernel module
0
Comment
Question by:mmadhuso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 125 total points
ID: 17139164
insmod /path/to/kernel/module/hello-2.o

I presume that you are working through this "howto?":

http://www.tldp.org/LDP/lkmpg/2.6/html/index.html

(   (()
(`-' _\
 ''  ''
0
 

Author Comment

by:mmadhuso
ID: 17139856
thanks , its working now


One more stuff   have u used

according to http://puggy.symonds.net/~abhi/files/mm/node122.html

De-Allocating a Memory Region

 Function sys_munmap()
 Function do_munmap()

To modify heap

 Function sys_brk()  
 Function do_brk()

thanks for the help
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17140631
I'm afraid that I've done very little work with kernel modules, other than the odd patch of other people's work. The only advice that I can offer, is make sure that allocations in the init are deallocated in the exit, otherwise, your kernel will have stability problems!

(   (()
(`-' _\
 ''  ''

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question