LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 05-23-2006, 04:08 AM   #1
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 356

Rep: Reputation: 31
Help - strange problems with kernel headers and 'make'


okay i have had some problems compiling modules from source...
full applications seem okay but not modules.. I since did:
apt-get install automake1.9
then i got errors about gcc-3.4
so. $ sudo apt-get install gcc-3.4
then i got errors saying that /lib/modules/2.6.12-10-386/build and source do not exist
so
$ cd /lib/modules/2.6.12-10-386
$ ln -s /usr/src/linux source
$ ln -s /usr/src/linux build

/usr/src/linux is a symlink to /usr/src/linux-headers-2.6.12-10-386

the module now compiled perfectly however.....

It placed it in /lib/modules/2.6.12/extra (which the 'make install' command created)
when i $modprobe <modulename>

it says ... Module not found

i can go into /lib/modules/2.6.12/extra and do '$ sudo insmod <modulename> and it works perfectly but i have stuffed something up here bigtime!!

can anyone help me pls?
firstly /lib/modules/2.6.12 is a problem.
secondly, the modprobe modulename is conerning...

thanks!
 
Old 05-23-2006, 07:26 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
i can go into /lib/modules/2.6.12/extra and do '$ sudo insmod <modulename> and it works perfectly but i have stuffed something up here bigtime!!
I'm sorry, but what is the problem - it appears you have successfully compiled and installed a module.
Quote:
firstly /lib/modules/2.6.12 is a problem.
In what way? What behaviour were you expecting?
Quote:
secondly, the modprobe modulename is conerning...
... again: in what way?

I guess you may have been expecting modprobe to look for modules in /lib/modules/`uname -r`/extra ... only you found that it didn't. Did you have some indication that it should?

But this is a guess. Unless you state your issues, nobody can help with them.
 
Old 05-23-2006, 09:01 AM   #3
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 356

Original Poster
Rep: Reputation: 31
My issue is why has the module been placed in /lib/modules/2.6.12 as a pose to ../(uname -r)/ ... yes.
Also, why can i not load from anywhere using modprobe as a pose to specifying the full path and using insmod

in other distributions i have not had this problem and also not had to use insmod except on older kenels. I am new to ubuntu and thought i was missing something if i cannot do a simple build with make.

other people i know using the same distro have not had this problem.... Hence my post..
 
Old 05-23-2006, 09:42 AM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
My issue is why has the module been placed in /lib/modules/2.6.12 as a pose to ../(uname -r)/ ... yes.
(aside: "opposed" rather than "a pose", surely?)

I see, uname -r returns "2.6.12-10-386"?

- is there a /lib/modules/2.6.12-10-386 at all?
- is there anything in /lib/modules/2.6.12 besides the "extra" directory?

At a guess - the makefile for the module seems to be making bad assumptions. If you go through it (it will open with less or in a text editor), you should find the command to create the "extra" directory... when you find that, you will understand what happened.

Modprobe will find the module if you put it somewhere in modprobes search path. Like /lib/modules/2.6.12-10-386/extra perhaps? Or if you add the path to modules.conf(5). See the modprobe man pages for this.

Last edited by Simon Bridge; 05-23-2006 at 09:49 AM.
 
Old 05-24-2006, 06:55 AM   #5
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 356

Original Poster
Rep: Reputation: 31
thanks for the eye opener. Yes the makefile does seem to create the /extra directory and no there is nothing else in /lib/modules/2.6.12 other than extra.

i dont seem to have an /etc/modules.conf
i have /etc/modprobe.conf which has alias' in it
i also have /etc/modules which lists some modules that load at boot..

Either way - thanks for your help.. i should be good for here.
 
Old 05-24-2006, 06:57 AM   #6
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 356

Original Poster
Rep: Reputation: 31
further to this i have copied the module to /lib/modules/2.6.12-10-386/extra and now the modprobe works great.

Thanks!
 
Old 05-24-2006, 07:54 AM   #7
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Well done:

chances are the makefile created the 2.6.12 directory as well.
I suspect the makefile contains a variable to specify the modules path, which you are supposed to edit to suit your distro.

(this is the sort of thing that ./config step is supposed to take care of - in the good old days, editing the makefile by hand was routine.)

And you're right: I meant modprobe.conf good to see some people are on the ball.
 
  


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
Unable to compile (make, make install):need linux-headers smiley_lauf Linux - Newbie 3 01-31-2006 01:05 AM
How to make own kernel headers? kule Linux - Software 7 03-31-2005 07:42 AM
Strange problems after compiling kernel (SuSE 9.1) Mikessu Linux - General 0 05-22-2004 05:19 PM
Strange file access restrictions in kernel-headers directory zero79 Debian 3 04-30-2004 11:17 PM
strange problems with new kernel shadow.blue Linux - General 4 09-06-2003 09:03 PM


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