FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-31-2009, 03:52 PM
Harry Putnam
 
Default Kernel upgrading and linux symlink

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?
 
Old 10-31-2009, 05:00 PM
Nikos Chantziaras
 
Default Kernel upgrading and linux symlink

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.
 
Old 10-31-2009, 05:09 PM
Harry Putnam
 
Default Kernel upgrading and linux symlink

Nikos Chantziaras <realnc@arcor.de> writes:

> 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.

Why is that obvious? That's what seemed confusing to me.

Nothing about creating it with USE=symlin, eselect, or by hand is a
problem. Or hard to follow, and I've always just done it by hand.
 
Old 10-31-2009, 05:24 PM
Denis
 
Default Kernel upgrading and linux symlink

On Sat, Oct 31, 2009 at 12:52 PM, Harry Putnam <reader@newsguy.com> wrote:
> And in fact does it really matter if its pointing at the newly
> installed or actual running kernel, when kernel compiling operations
> take place?

When I upgrade a kernel, I first change the symlink using eselect to
point to the source I'm about to install. Then, after I configure and
compile the kernel, I use the "module-rebuild rebuild" to rebuild any
kernel modules against the new source. Move the bzImage to /boot,
reboot, and that's it. I don't know how genkernel changes any of this
- I use manual menuconfig.
 
Old 10-31-2009, 05:41 PM
Nikos Chantziaras
 
Default Kernel upgrading and linux symlink

On 10/31/2009 08:09 PM, Harry Putnam wrote:

Nikos Chantziaras<realnc@arcor.de> writes:


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.


Why is that obvious? That's what seemed confusing to me.


How obvious it is probably depends in prior knowledge here. There's
absolutely nothing in a running system that needs anything from
/usr/src/linux. If fact, you could, completely uninstall all kernel
sources and totally wipe out /usr/src. It's only needed when you build
something that needs kernel sources.


Of course if you didn't know that, then yes, it's not obvious
 

Thread Tools




All times are GMT. The time now is 08:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org