Solved

Loading a Kernel Module in Linux

Posted on 2006-07-19
5
299 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

696 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