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, 06:18 PM
Alan McKinnon
 
Default Kernel upgrading and linux symlink

On Saturday 31 October 2009 20:09:37 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.
>
> 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.
>

Nikos is being kind to the document writers :-)

In fact, the documentation is flat out wrong - there is no requirement for the
symlink to point to the currently running kernel. It must point to the kernel
sources you want to *configure* or use for an emerge that installs a kernel
driver.

For instance, you might be running 2.6.31-r4 and also have 2.6.31-r3
installed. To install nvidia-drivers, you must build it *twice* - against each
kernel you want to use it with (nvidia-drivers builds and installs a kernel
driver into /lib/modules/<kernel version>)

USE="symlink" just runs
ln -sfn /usr/src/<new_version> linux
at the end of the merge , no further magic. It's purely a convenience thing,
you can just as easily do that step yourself


--
alan dot mckinnon at gmail dot com
 
Old 10-31-2009, 07:03 PM
Nikos Chantziaras
 
Default Kernel upgrading and linux symlink

On 10/31/2009 09:18 PM, Alan McKinnon wrote:

On Saturday 31 October 2009 20:09:37 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.

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.



Nikos is being kind to the document writers :-)

In fact, the documentation is flat out wrong - there is no requirement for the
symlink to point to the currently running kernel. It must point to the kernel
sources you want to *configure* or use for an emerge that installs a kernel
driver.

For instance, you might be running 2.6.31-r4 and also have 2.6.31-r3
installed. To install nvidia-drivers, you must build it *twice* - against each
kernel you want to use it with (nvidia-drivers builds and installs a kernel
driver into /lib/modules/<kernel version>)


It's a bit more obfuscated than that. Maybe nvidia-drivers work
different, but ati-drivers will build against /usr/src/linux but install
the actual modules in /lib/modules/running_kernel. If /usr/src/linux
doesn't point to the running kernel, the modules will be installed in
the wrong place.
 
Old 10-31-2009, 07:06 PM
Harry Putnam
 
Default Kernel upgrading and linux symlink

Alan McKinnon <alan.mckinnon@gmail.com> writes:

> Nikos is being kind to the document writers :-)

Thanks for saving me from the Dunce cap...hehe.

But I might yet acquire full rights to it..

So, is the symlink not really necessary? Doe something look at
/usr/src/linux for files?

For example, if you cd 'ed into the sources top dir. And started
`make' (after the makeconfig step), would it matter if there was a
symlink or not?

(In the instant case I did create the symlink looking at newest
sources, so all is well I hope... have yet to boot the creation.
Waiting on some emerging left in emerge -vuD system)
 
Old 10-31-2009, 07:50 PM
Neil Bothwick
 
Default Kernel upgrading and linux symlink

On Sat, 31 Oct 2009 20:00:35 +0200, Nikos Chantziaras wrote:

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

I don't use ati, but with other modules, this is not necessary. As long
as /usr/srx/linux contains a valid .config, you can build modules against
that kernel without running or even compiling it.


--
Neil Bothwick

Thesaurus: ancient reptile with an excellent vocabulary
 
Old 10-31-2009, 08:03 PM
Alan McKinnon
 
Default Kernel upgrading and linux symlink

On Saturday 31 October 2009 22:06:35 Harry Putnam wrote:
> Alan McKinnon <alan.mckinnon@gmail.com> writes:
> > Nikos is being kind to the document writers :-)
>
> Thanks for saving me from the Dunce cap...hehe.
>
> But I might yet acquire full rights to it..
>
> So, is the symlink not really necessary? Doe something look at
> /usr/src/linux for files?

Yes, almost every app that installs kernel drivers will go to /usr/src/linux/
looking for kernel sources

> For example, if you cd 'ed into the sources top dir. And started
> `make' (after the makeconfig step), would it matter if there was a
> symlink or not?

It doesn't matter at all. There's a Makefile in that directory and it will do
whatever it's supposed to do. The symlink to it is irrelevant and is only
there as a shortcut with a known name


--
alan dot mckinnon at gmail dot com
 
Old 10-31-2009, 08:07 PM
Alan McKinnon
 
Default Kernel upgrading and linux symlink

On Saturday 31 October 2009 22:03:04 Nikos Chantziaras wrote:
> > For instance, you might be running 2.6.31-r4 and also have 2.6.31-r3
> > installed. To install nvidia-drivers, you must build it twice - against
> > each kernel you want to use it with (nvidia-drivers builds and installs a
> > kernel driver into /lib/modules/<kernel version>)
>
> It's a bit more obfuscated than that. Maybe nvidia-drivers work
> different, but ati-drivers will build against /usr/src/linux but install
> the actual modules in /lib/modules/running_kernel. If /usr/src/linux
> doesn't point to the running kernel, the modules will be installed in
> the wrong place.


That is just so mind-bogglingly absurdly stupid I doubt if ATI should even be
allowed near a computer....

Compiling code never depends on something running, it only depends on things
being present that can be linked against.

Thanks for reminding me why I insist on NVidia GPUs, I'd forgotten.

--
alan dot mckinnon at gmail dot com
 
Old 10-31-2009, 08:26 PM
Dale
 
Default Kernel upgrading and linux symlink

Denis wrote:
> 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.
>
>
>

I'm about the same. I update the symlink, build the kernel, update
nvidia-drivers against the new kernel before I forget, copy bzImage to
/boot and edit grub. I reboot when I get the chance.

If the kernel is borked, I change the symlink back and reboot to my old
kernel. I try to keep the symlink pointing to the kernel I am running
even if it is not absolutely necessary.

Dale

:-) :-)
 
Old 10-31-2009, 08:27 PM
Nikos Chantziaras
 
Default Kernel upgrading and linux symlink

On 10/31/2009 11:07 PM, Alan McKinnon wrote:

On Saturday 31 October 2009 22:03:04 Nikos Chantziaras wrote:

For instance, you might be running 2.6.31-r4 and also have 2.6.31-r3
installed. To install nvidia-drivers, you must build it twice - against
each kernel you want to use it with (nvidia-drivers builds and installs a
kernel driver into /lib/modules/<kernel version>)


It's a bit more obfuscated than that. Maybe nvidia-drivers work
different, but ati-drivers will build against /usr/src/linux but install
the actual modules in /lib/modules/running_kernel. If /usr/src/linux
doesn't point to the running kernel, the modules will be installed in
the wrong place.



That is just so mind-bogglingly absurdly stupid I doubt if ATI should even be
allowed near a computer....

Compiling code never depends on something running, it only depends on things
being present that can be linked against.

Thanks for reminding me why I insist on NVidia GPUs, I'd forgotten.


This isn't ATI's installer. It's the ebuild that does this.
 
Old 10-31-2009, 08:43 PM
Mark Knecht
 
Default Kernel upgrading and linux symlink

On Sat, Oct 31, 2009 at 2:27 PM, Nikos Chantziaras <realnc@arcor.de> wrote:
> On 10/31/2009 11:07 PM, Alan McKinnon wrote:
>>
>> On Saturday 31 October 2009 22:03:04 Nikos Chantziaras wrote:
>>>>
>>>> For instance, you might be running 2.6.31-r4 and also have 2.6.31-r3
>>>> installed. To install nvidia-drivers, you must build it twice - against
>>>> each kernel you want to use it with (nvidia-drivers builds and installs
>>>> a
>>>> kernel driver into /lib/modules/<kernel version>)
>>>
>>> It's a bit more obfuscated than that. *Maybe nvidia-drivers work
>>> different, but ati-drivers will build against /usr/src/linux but install
>>> the actual modules in /lib/modules/running_kernel. *If /usr/src/linux
>>> doesn't point to the running kernel, the modules will be installed in
>>> the wrong place.
>>
>>
>> That is just so mind-bogglingly absurdly stupid I doubt if ATI should even
>> be
>> allowed near a computer....
>>
>> Compiling code never depends on something running, it only depends on
>> things
>> being present that can be linked against.
>>
>> Thanks for reminding me why I insist on NVidia GPUs, I'd forgotten.
>
> This isn't ATI's installer. *It's the ebuild that does this.

And from deep memory it seems like there were other packages that
operated this way 8-10 years ago. I know in 1999 I had to be very
careful about where the linux link pointed, and while it's not as
necessary today to do so i'm still quite careful.

I use the ATI drivers on my AMD64 machine. I think I've always found
that I needed to emerge fglrx after the new kernel had been booted but
never understood why. This email is helpful. It seems to me that if it
is the ebuild that's doing this is needs to be fixed. If I understand
correctly I could be building for 2.6.31 but installing in 2.6.29?
That's not right...

Thanks to all for the info.

Cheers,
Mark
 
Old 10-31-2009, 09:17 PM
Alan McKinnon
 
Default Kernel upgrading and linux symlink

On Saturday 31 October 2009 23:43:21 Mark Knecht wrote:
> On Sat, Oct 31, 2009 at 2:27 PM, Nikos Chantziaras <realnc@arcor.de> wrote:
> > On 10/31/2009 11:07 PM, Alan McKinnon wrote:
> >> On Saturday 31 October 2009 22:03:04 Nikos Chantziaras wrote:
> >>>> For instance, you might be running 2.6.31-r4 and also have 2.6.31-r3
> >>>> installed. To install nvidia-drivers, you must build it twice -
> >>>> against each kernel you want to use it with (nvidia-drivers builds and
> >>>> installs a
> >>>> kernel driver into /lib/modules/<kernel version>)
> >>>
> >>> It's a bit more obfuscated than that. Maybe nvidia-drivers work
> >>> different, but ati-drivers will build against /usr/src/linux but
> >>> install the actual modules in /lib/modules/running_kernel. If
> >>> /usr/src/linux doesn't point to the running kernel, the modules will be
> >>> installed in the wrong place.
> >>
> >> That is just so mind-bogglingly absurdly stupid I doubt if ATI should
> >> even be
> >> allowed near a computer....
> >>
> >> Compiling code never depends on something running, it only depends on
> >> things
> >> being present that can be linked against.
> >>
> >> Thanks for reminding me why I insist on NVidia GPUs, I'd forgotten.
> >
> > This isn't ATI's installer. It's the ebuild that does this.
>
> And from deep memory it seems like there were other packages that
> operated this way 8-10 years ago. I know in 1999 I had to be very
> careful about where the linux link pointed, and while it's not as
> necessary today to do so i'm still quite careful.
>
> I use the ATI drivers on my AMD64 machine. I think I've always found
> that I needed to emerge fglrx after the new kernel had been booted but
> never understood why. This email is helpful. It seems to me that if it
> is the ebuild that's doing this is needs to be fixed. If I understand
> correctly I could be building for 2.6.31 but installing in 2.6.29?
> That's not right...

I agree, the ebuild should be fixed. I can't think of any valid reason for
that behaviour.

--
alan dot mckinnon at gmail dot com
 

Thread Tools




All times are GMT. The time now is 01:41 AM.

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