Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Kernel upgrading and linux symlink
Date: Sat, 31 Oct 2009 18:01:07
Message-Id: hchtvu$1et$
In Reply to: [gentoo-user] Kernel upgrading and linux symlink by Harry Putnam
1 On 10/31/2009 06:52 PM, Harry Putnam wrote:
2 > Looking at the kernel upgrade pages at
3 >
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?
28 The link is created only if you have the "symlink" USE flag enabled.
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.
36 And, btw, the symlink is changed easily with eselect:
38 eselect kernel list
40 to get a list and:
42 eselect kernel set N
44 to point the symlink to the Nth kernel.
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:
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/
58 But it general, just boot the new kernel and emerge external modules
59 again; safer and more straight forward.


Subject Author
[gentoo-user] Re: Kernel upgrading and linux symlink Harry Putnam <reader@×××××××.com>
Re: [gentoo-user] Re: Kernel upgrading and linux symlink Neil Bothwick <neil@××××××××××.uk>