1 |
Digby Tarvin schreef: |
2 |
> Something which I havn't found any explicit elaboration of in the |
3 |
> documentation... |
4 |
> |
5 |
> The convention in the Linux/gentoo filesystem seems to be to have a |
6 |
> unique directory for each installed kernel in /usr/src, with a |
7 |
> symbolic link to the 'current' kernel directory named |
8 |
> /usr/src/linux.. |
9 |
> |
10 |
> The question is - is this just a user convenience, or will parts of |
11 |
> the system break if it is not maintained correctly? |
12 |
> |
13 |
> The reason I ask is that if I have several kernels which I have |
14 |
> configured grub to allow me to select from at boot time, where should |
15 |
> this symlink point? The newest kernel? An experimental one being |
16 |
> worked on? The one most recently booted from. If the latter case then |
17 |
> it is likely to be wrong for a finite period following boot until |
18 |
> the system has come up far enough to allow me to update it. |
19 |
|
20 |
The symlink has nothing to do with the compiled kernels in /boot at all. |
21 |
|
22 |
What it has to do with are applications, libraries and external kernel |
23 |
modules that are compiled against the kernel source. |
24 |
|
25 |
For example, ati-drivers is a kernel module which compiles against the |
26 |
kernel source. In order for it to do so, it needs to know what kernel |
27 |
source to compile against. The easiest way for it to know that is for it |
28 |
to seek the target of the /usr/src/linux symlink, which generally points |
29 |
to either 1) the source of the currently running kernel, or 2) the |
30 |
source of the kernel that *will* be the currently-running kernel, after |
31 |
you compile/install/reboot to it. |
32 |
|
33 |
> |
34 |
> Anyone know what is likely to break (if anything) if I boot from a |
35 |
> kernel other than the one which corresponds to the directory |
36 |
> /usr/src/linux points to, and neglect to update the link? Does it |
37 |
> direct (for instance) the target directory for an emerge of new |
38 |
> kernel components? Or does it perhaps have to point to the kernel |
39 |
> being built during any recompile? |
40 |
|
41 |
|
42 |
Nothing, no (all internal kernel components are in the kernel source, |
43 |
and if you are emerging external kernel modules, they'll just be |
44 |
compiled against some other kernel than the one you're booting to, so |
45 |
they won't be available for that kernel-- but that is not, strictly |
46 |
speaking, "broken"), and no, whatever recompile you might be doing is |
47 |
unrelated to the symlink, unless it involves external kernel modules or |
48 |
one of the relatively rare applications or libraries that compile |
49 |
directly against the kernel source. |
50 |
|
51 |
You might consider, however, activating the "symlink" USE flag, which |
52 |
will update the symlink when you install a new kernel source. |
53 |
|
54 |
Hope this helps. |
55 |
Holly |
56 |
|
57 |
> |
58 |
> Regards, DigbyT |
59 |
|
60 |
-- |
61 |
gentoo-user@g.o mailing list |