Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Headers for the system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Wed Jun 28, 2006 10:33 am    Post subject: Kernel Headers for the system Reply with quote

I have been done a bad things recently and messed up my /usr/src directory symlink (yeah well I was playing around), I broke the link to the original kernel headers for the Gentoo system that everything was originally emerged under.

Now I don't know what the symlink should be for the kernel I am now running. Built in ~/kernel and then only installed as root in /boot and for make modules_install

I relinked the linux directory to the original kernel but I am really casting about here - is it possible that portage has changed the requirements for that symlink since updating system and world many times??

How do I go about determining the system is healthy?

I am currently running a kernel.org 2.6.17.1 kernel and Gnome 2.14 so it is kind of experimental I know, but I would like to understand the principals at play here: can I find out if there are any packages on the system built with kernel headers that are not what the system is going to be looking at???

Code:

stardotstar@geko ~ $ ls /usr/src -l
total 40264
-rw-r--r--  1 root        root           32352 Mar 22 20:13 bak.config
lrwxrwxrwx  1 root        root              23 Jun 28 16:47 linux -> linux-2.6.15-gentoo-r1/
drwxr-xr-x 21 root        root            4096 Mar 29 19:59 linux-2.6.15-gentoo-r1
drwxr-xr-x 19 root        root            4096 Apr 28 22:57 linux-2.6.16-gentoo-r3
drwxr-xr-x 19 root        root            4096 Jun 27 10:15 linux-2.6.16-gentoo-r9
drwxrwxrwx 20 root        root            4096 Jun 26 19:12 linux-2.6.16.11


BTW nothing seems broken or wierd I am just beginning to learn some of the subtelties of good system design and maintenance.
_________________
]8P
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55440
Location: 56N 3W

PostPosted: Wed Jun 28, 2006 10:47 am    Post subject: Reply with quote

stardotstar,

Your system has two sets of kernel headers (at least).
One set is from the kernel-headers package and is what the system uses to build most things that need kernel headers.
It provides a stable set of headers that do not change when you update the /usr/src/linux symbolic link.

A few packages, like 3rd party kernel modules, need to compile against the kernel they will work with.
These packages use the /usr/src/linux link to find the kernel of the day that you wish to build them against.
You should probably point /usr/src/linux to your latest or running kernel and not worry about that symlink causing other problems.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Thu Jun 29, 2006 1:37 am    Post subject: Reply with quote

Thank you that is very informative.
Some of the packages you mention I have been pointing to the running kernel manually to be sure - VMWare, ipw2200/ieee80211 and suspend2.

Just worries me when I keep getting Linus' quote thrown at me from other sources:

Quote:

I would suggest that people who compile new kernels should:

- NOT do so in /usr/src. Leave whatever kernel (probably only the
header files) that the distribution came with there, but don't touch
it.

- compile the kernel in their own home directory, as their very own
selves. No need to be root to compile the kernel. You need to be root
to _install_ the kernel, but that's different.

- not have a single symbolic link in sight (except the one that the
kernel build itself sets up, namely the "linux/include/asm" symlink
that is only used for the internal kernel compile itself)

And yes, this is what I do. My /usr/src/linux still has the old 2.2.13
header files, even though I haven't run a 2.2.13 kernel in a _loong_
time. But those headers were what glibc was compiled against, so those
headers are what matches the library object files.


So that maybe I have misinterpreted the context of this quote.

Certainly, Linus does not speak for a metadistro like Gentoo and therefore I am not presuming to know that one way is better than any other.

Will
_________________
]8P
Back to top
View user's profile Send private message
curtis119
Bodhisattva
Bodhisattva


Joined: 10 Mar 2003
Posts: 2160
Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

PostPosted: Thu Jun 29, 2006 2:30 am    Post subject: Reply with quote

stardotstar wrote:
Thank you that is very informative.
Some of the packages you mention I have been pointing to the running kernel manually to be sure - VMWare, ipw2200/ieee80211 and suspend2.

Just worries me when I keep getting Linus' quote thrown at me from other sources:

Quote:

I would suggest that people who compile new kernels should:

- NOT do so in /usr/src. Leave whatever kernel (probably only the
header files) that the distribution came with there, but don't touch
it.

- compile the kernel in their own home directory, as their very own
selves. No need to be root to compile the kernel. You need to be root
to _install_ the kernel, but that's different.

- not have a single symbolic link in sight (except the one that the
kernel build itself sets up, namely the "linux/include/asm" symlink
that is only used for the internal kernel compile itself)

And yes, this is what I do. My /usr/src/linux still has the old 2.2.13
header files, even though I haven't run a 2.2.13 kernel in a _loong_
time. But those headers were what glibc was compiled against, so those
headers are what matches the library object files.


So that maybe I have misinterpreted the context of this quote.

Certainly, Linus does not speak for a metadistro like Gentoo and therefore I am not presuming to know that one way is better than any other.

Will


Linus is talking about binary distributions. Gentoo is a from-source distro so what he is saying there doesn't apply to us (but it very much DOES apply to any of the binary distros).

There was a post here somewhere from one of the kernel devs explaining why Gentoo's use of /usr/src/linux is OK but I can't seem to find it now.
_________________
Gentoo: it's like wiping your ass with silk.
Back to top
View user's profile Send private message
stardotstar
l33t
l33t


Joined: 10 Feb 2006
Posts: 887
Location: 2074/SYD/NSW/AU

PostPosted: Thu Jun 29, 2006 3:58 am    Post subject: Reply with quote

Thank you that clears it up for me :)
_________________
]8P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum