LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-14-2007, 08:53 AM   #1
masg
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
Red face insmod: error inserting in 2.6


Hi,
I have compiled the code on 2.6 kernel. Compilation doesn't through any error. But, when i try to insert the module i get this error,
insmod ./hello.o
insmod: error inserting './hello.o': -1 Invalid module format
I read some of threads, the compilation in 2.6 kernel is different.
Can anyone let me know the difference in 2.4 and 2.6. or please let me know you to compile for 2.6.
If i compile same code in 2.4 it works fine.

Regards,
masg
 
Old 03-15-2007, 03:09 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Kernel 2.6 uses .ko not .o ... did you compile a 2.4 module
by accident?



Cheers,
Tink
 
Old 03-15-2007, 08:16 PM   #3
fr33z
LQ Newbie
 
Registered: Mar 2007
Distribution: Gentoo 2006.1 && Slackware 11.0
Posts: 11

Rep: Reputation: 0
One more thing to say - it's much better to use modprobe instead of insmod

Last edited by fr33z; 03-15-2007 at 09:00 PM.
 
Old 03-15-2007, 08:45 PM   #4
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
Typically you just use modprobe module_name without the .ko.

example: modprobe hello
 
  


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
insmod: error inserting 'usbip.ko': -1 Invalid module format barunparichha Linux - Software 1 01-13-2007 08:51 PM
insmod: error inserting 'module.o': -1 Invalid module format ksrinivas Linux - Newbie 5 10-11-2006 07:29 AM
Error inserting ndiswrapper awj78 Linux - Laptop and Netbook 2 01-31-2006 10:52 PM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-26-2005 10:52 AM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-24-2005 10:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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