LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 07-05-2005, 10:57 AM   #1
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Rep: Reputation: 15
insert module failure


I recently upgraded Kernel to 2.6.8.1 from 2.4.x

I am now trying to insert module as shown below:

insmod ./sgi_hostid.ko

I get:

Error inserting 'sgi_hostid.ko': Invalid module format!

Could this be because insmod expects sgi_hostid.o instead?
I understand that modules will now be in the .ko format for 2.6 kernels.
What do I do?


help!?
 
Old 07-05-2005, 11:11 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Firstly, you don't have to specify the ./ or the .o or extension in the name..

Either an:

insmod sgi_hostid

or

modprobe sgi_hostid

And that all depends on if its compiled with support in your current kernel..
 
Old 07-05-2005, 11:24 AM   #3
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Original Poster
Rep: Reputation: 15
Now it just says:

insmod: Can't read 'sgi_hostid': NO SUCH FILE OR DIRECTORY.

I'm not sure why. I can see the files in /root and /root is in my path

Any ideas?
 
Old 07-05-2005, 11:40 AM   #4
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by iansoundz
Now it just says:

insmod: Can't read 'sgi_hostid': NO SUCH FILE OR DIRECTORY.

I'm not sure why. I can see the files in /root and /root is in my path

Any ideas?
The module wouldn't be in /root

Have you tried using modprobe instead? Is the support compiled into your kernel?
 
Old 07-05-2005, 11:51 AM   #5
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Original Poster
Rep: Reputation: 15
The module wouldn't be in /root

Have you tried using modprobe instead? Is the support compiled into your kernel?

**************************************************************************************************** ******
it is in /root. I downloaded this Makefile and sgi_hostid.c file to the /root dr.

I tried modprobe but it gave me a similar error:

FATAL: module sgi_hostid not found

Is the support compiled into your kernel?

Support fo what? Sorry, I have only been using linux for 4 weeks now. Whatever your answer will be can I find out if the support for whatever your answer will be in my .config file?

Thanks again Trickykid...
 
Old 07-05-2005, 02:18 PM   #6
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
Let's backup a minute. What execatly are you trying to accomplish? In most cases, a kernel module is not something that you can download; it must be compiled with (or at least into) the kernel.

Also, as a general rule of thumb, downloading untrusted code and attempting to compile it into the kernel is a *really* bad idea.
 
Old 07-05-2005, 02:56 PM   #7
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by iansoundz
it is in /root. I downloaded this Makefile and sgi_hostid.c file to the /root dr.

I tried modprobe but it gave me a similar error:

FATAL: module sgi_hostid not found

Is the support compiled into your kernel?

Support fo what? Sorry, I have only been using linux for 4 weeks now. Whatever your answer will be can I find out if the support for whatever your answer will be in my .config file?
Now your making more sense. You downloaded a driver to support some hardware and now your wanting to insert it into your running kernel as a module, well then, you can't just download a .c file and then insmod it, you have to compile it. Read the README or INSTALL documentation to learn how to properly compile the module to load into your system..
 
Old 07-05-2005, 03:02 PM   #8
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Original Poster
Rep: Reputation: 15
I got the following files sent to me with instructions as shown below:

Makefile
sgi_hostid.c
license.lic

************************************************************
Below are the instructions I recieved with it:


Only written for 2.6.x linux kernel and
will not work on any other kernel version

written by examples from
http://www.diku.dk/hjemmesider/stud...html/node3.html

make with: make -C /usr/src/linux-'uname -r` SUBDIRS=`pwd` modules

mimics SGI's hostid proc file entry /proc/sgi_sn/licenseID `

After compiling:

insmod ./sgi_hostid.ko

echo HOSTID >/proc/sgi_sn/licenseID

Where HOSTID is the host id defined in the flex license file.

BTW, I need to do this so I can run this license server on my box.
 
Old 07-05-2005, 03:07 PM   #9
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
That link gives a "File Not Found" and those are some very crappy instructions without any details. Perhaps you need to submit them to the author for help since their apparent instructions are not working.
 
Old 07-05-2005, 04:27 PM   #10
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Original Poster
Rep: Reputation: 15
You will get a "file not found" because you don't have it!


I was provided those files via a .tgz sent to me via email
once uncompressed, I was left with:

Makefile
sgi_hostid.c
and these instructions.

Should I just move the sgi_hostid.ko mod to the modules directory myself and then try insmod again? I just assumed that make would have placed files in the locaiton insmod expects to find them. Perhaps that explains the error message "Error inserting 'sgi_hostid.ko': Invalid module format!??

Your thoughts?

BTW, thanks for working on this with me!
 
Old 07-05-2005, 08:21 PM   #11
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by iansoundz
You will get a "file not found" because you don't have it!


I was provided those files via a .tgz sent to me via email
once uncompressed, I was left with:

Makefile
sgi_hostid.c
and these instructions.

Should I just move the sgi_hostid.ko mod to the modules directory myself and then try insmod again? I just assumed that make would have placed files in the locaiton insmod expects to find them. Perhaps that explains the error message "Error inserting 'sgi_hostid.ko': Invalid module format!??

Your thoughts?

BTW, thanks for working on this with me!
You can try anything you like. Like I said, not knowing anything more than what you've explained here, I don't think anyone would be much help except the provider of this module.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to insert oss module linuxmandrake Debian 1 09-30-2005 07:29 PM
insert module problem euslisu Fedora 8 02-07-2005 06:45 AM
cannot insert module fglrx for ati ar1 Linux - General 1 05-31-2004 09:03 PM
failled tp insert module into kernel actteoh Linux - Hardware 2 05-07-2004 11:18 AM
Can't insert module into kernel swamysk Linux - Newbie 14 08-22-2003 06:27 PM


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