Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wrong kernel folder is used for modules. [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
blacke
n00b
n00b


Joined: 17 Mar 2006
Posts: 2

PostPosted: Fri Mar 17, 2006 8:26 am    Post subject: Wrong kernel folder is used for modules. [SOLVED] Reply with quote

Doing an emerge of shfs renderd it unusable because it was placed in a different kernel module tree then the one i'm using. I have 2 kernel installed, 2.6.12-gentoo-r6 and 2.6.15-gentoo-r1. I am using 2.6.15 but the module of shfs was placed in the 2.6.12 module tree.

What can be done to fix this?


Last edited by blacke on Fri Mar 17, 2006 8:40 am; edited 1 time in total
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Fri Mar 17, 2006 8:34 am    Post subject: Reply with quote

you have to delete the symlink /usr/src/linux and create one to the kernel-source of the kernel you want the modules built for.
Code:
cd /usr/src && rm linux && ln -s linux-2.6.15-gentoo-r1 linux

for example.
That way it is controlled what kernel external modules are built for.

HTH
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
blacke
n00b
n00b


Joined: 17 Mar 2006
Posts: 2

PostPosted: Fri Mar 17, 2006 8:40 am    Post subject: Reply with quote

Ahh, didn't occure to me that they used that linking. So used to manual source compailing and they use `uname -r`. :P
Back to top
View user's profile Send private message
stevyn
n00b
n00b


Joined: 26 Aug 2004
Posts: 70
Location: USA

PostPosted: Fri Mar 17, 2006 4:38 pm    Post subject: Reply with quote

You can also add the "symlink" USE flag to your /etc/make.conf to automatically delete the old symlink and make the new one. Usually what I do when portage wants to upgrade the kernel is emerge the sources, go to /usr/src/[old kernel] and copy the .config file to /usr/src/linux. Then run "make menuconfig" to make sure everything works and run "make && make modules_install && make install"

make install is really convienent if you use grub. Then re-emerge any drivers like nvidia or wifi that you need as external modules.

Another tip is when you notice you have 10 old versions of the kernel sources in /usr/src is to run "emerge -pP [kernel-sources]" where [kernel-sources] is whatever kernel you're getting from portage. Mine happens to be ck-sources. This will prune the old kernels and leave the current one untouched. Although this process can be a bit slow. A trick I found was to actually delete the directories under /usr/src and then prune the kernels. This will make portage think only the correct kernel is there and deleting them manually is faster and it makes sure to get rid of all the uneeded files.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum