On 10/31/2009 06:52 PM, Harry Putnam wrote:
Looking at the kernel upgrade pages at
   http://www.gentoo.org/doc/en/kernel-upgrade.xml

Its a bit confusing about the symlink creation.  I've wondered about
it a few times.

At the top, you're told how to get the sources and then a discussion
of the symlink follows.

It appears you are expected to change the symlink to the newly
installed sources.

But then it says:
4.  Updating the /usr/src/linux symbolic link

   "Gentoo requires that the /usr/src/linux symbolic link points to the
   sources of the kernel you are running."

So if gentoo `requires' the symlink to point to the running kernel
why are we changing it to the newly installed but not yet compiled or
started kernel?

And in fact does it really matter if its pointing at the newly
installed or actual running kernel, when kernel compiling operations
take place?

The link is created only if you have the "symlink" USE flag enabled.

Also, "Gentoo requires that the [...] symbolic link points to the sources of the kernel you are running" is not entirely correct. It is required only when you want to build something against that kernel. Obviously, you need to create the symlink if you want to build the newly installed kernel, even though the system is still running an older one.

And, btw, the symlink is changed easily with eselect:

  eselect kernel list

to get a list and:

  eselect kernel set N

to point the symlink to the Nth kernel.

So, to sum it up, when you update to a new kernel, first update the symlink (or let the ebuild take care of it), build the kernel, boot it, *then* rebuild external modules (like ati-drivers). If you know what you're doing, you don't need to reboot before rebuilding external modules, for example I do:

ebuild /usr/portage/x11-drivers/ati-drivers/ati-drivers-N.ebuild compile
mkdir /lib/modules/KERNEL_VERSION/video
cp /var/tmp/portage/x11-drivers/ati-drivers-N/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko /lib/modules/KERNEL_VERSION/video/

But it general, just boot the new kernel and emerge external modules again; safer and more straight forward.


Reply via email to