1 |
On 10/31/2009 06:52 PM, Harry Putnam wrote: |
2 |
> Looking at the kernel upgrade pages at |
3 |
> http://www.gentoo.org/doc/en/kernel-upgrade.xml |
4 |
> |
5 |
> Its a bit confusing about the symlink creation. I've wondered about |
6 |
> it a few times. |
7 |
> |
8 |
> At the top, you're told how to get the sources and then a discussion |
9 |
> of the symlink follows. |
10 |
> |
11 |
> It appears you are expected to change the symlink to the newly |
12 |
> installed sources. |
13 |
> |
14 |
> But then it says: |
15 |
> 4. Updating the /usr/src/linux symbolic link |
16 |
> |
17 |
> "Gentoo requires that the /usr/src/linux symbolic link points to the |
18 |
> sources of the kernel you are running." |
19 |
> |
20 |
> So if gentoo `requires' the symlink to point to the running kernel |
21 |
> why are we changing it to the newly installed but not yet compiled or |
22 |
> started kernel? |
23 |
> |
24 |
> And in fact does it really matter if its pointing at the newly |
25 |
> installed or actual running kernel, when kernel compiling operations |
26 |
> take place? |
27 |
|
28 |
The link is created only if you have the "symlink" USE flag enabled. |
29 |
|
30 |
Also, "Gentoo requires that the [...] symbolic link points to the |
31 |
sources of the kernel you are running" is not entirely correct. It is |
32 |
required only when you want to build something against that kernel. |
33 |
Obviously, you need to create the symlink if you want to build the newly |
34 |
installed kernel, even though the system is still running an older one. |
35 |
|
36 |
And, btw, the symlink is changed easily with eselect: |
37 |
|
38 |
eselect kernel list |
39 |
|
40 |
to get a list and: |
41 |
|
42 |
eselect kernel set N |
43 |
|
44 |
to point the symlink to the Nth kernel. |
45 |
|
46 |
So, to sum it up, when you update to a new kernel, first update the |
47 |
symlink (or let the ebuild take care of it), build the kernel, boot it, |
48 |
*then* rebuild external modules (like ati-drivers). If you know what |
49 |
you're doing, you don't need to reboot before rebuilding external |
50 |
modules, for example I do: |
51 |
|
52 |
ebuild /usr/portage/x11-drivers/ati-drivers/ati-drivers-N.ebuild compile |
53 |
mkdir /lib/modules/KERNEL_VERSION/video |
54 |
cp |
55 |
/var/tmp/portage/x11-drivers/ati-drivers-N/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko |
56 |
/lib/modules/KERNEL_VERSION/video/ |
57 |
|
58 |
But it general, just boot the new kernel and emerge external modules |
59 |
again; safer and more straight forward. |