Digby Tarvin schreef:
> Something which I havn't found any explicit elaboration of in the 
> documentation...
> 
> The convention in the Linux/gentoo filesystem seems to be to have a 
> unique directory for each installed kernel in /usr/src, with a 
> symbolic link to the 'current' kernel directory named 
> /usr/src/linux..
> 
> The question is - is this just a user convenience, or will parts of 
> the system break if it is not maintained correctly?
> 
> The reason I ask is that if I have several kernels which I have 
> configured grub to allow me to select from at boot time, where should
>  this symlink point? The newest kernel? An experimental one being 
> worked on? The one most recently booted from. If the latter case then
>  it is likely to be wrong for a finite period following boot until
> the system has come up far enough to allow me to update it.

The symlink has nothing to do with the compiled kernels in /boot at all.

What it has to do with are applications, libraries and external kernel
modules that are compiled against the kernel source.

For example, ati-drivers is a kernel module which compiles against the
kernel source. In order for it to do so, it needs to know what kernel
source to compile against. The easiest way for it to know that is for it
to seek the target of the /usr/src/linux symlink, which generally points
to either 1) the source of the currently running kernel, or 2) the
source of the kernel that *will* be the currently-running kernel, after
you compile/install/reboot to it.

> 
> Anyone know what is likely to break (if anything) if I boot from a 
> kernel other than the one which corresponds to the directory 
> /usr/src/linux points to, and neglect to update the link? Does it 
> direct (for instance) the target directory for an emerge of new 
> kernel components? Or does it perhaps have to point to the kernel 
> being built during any recompile?


Nothing, no (all internal kernel components are in the kernel source,
and if you are emerging external kernel modules, they'll just be
compiled against some other kernel than the one you're booting to, so
they won't be available for that kernel-- but that is not, strictly
speaking, "broken"), and no, whatever recompile you might be doing is
unrelated to the symlink, unless it involves external kernel modules or
one of the relatively rare applications or libraries that compile
directly against the kernel source.

You might consider, however, activating the "symlink" USE flag, which
will update the symlink when you install a new kernel source.

Hope this helps.
Holly

> 
> Regards, DigbyT

-- 
gentoo-user@gentoo.org mailing list

Reply via email to