Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22252 - baselayout: suggest linking /usr/src/linux to booted kernel
Summary: baselayout: suggest linking /usr/src/linux to booted kernel
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-05 03:09 UTC by Peter Ruskin
Modified: 2003-06-09 08:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Ruskin 2003-06-05 03:09:10 UTC
If you are running more than one kernel and have modules that depend 
on kernel version, like lm-sensors, nvidia-kernel, alsa-driver, etc., 
it is wise to make sure that /usr/src/linux is linked to the booted 
kernel early in the boot process, before modules are loaded.

I suggest that the following be added to /etc/init.d/bootmisc:

# Ensure that /usr/src/linux points to booted kernel
if [ "/usr/src/linux-$(uname -r)" != "$(ls -l /usr/src/linux|cut -f2 -d\>|cut
-f2,3,4 -d' ')" ]
then
	if [ -L /usr/src/linux ]
	then
		rm -f /usr/src/linux
		ln -s /usr/src/linux-$(uname r) /usr/src/linux
	fi
fi
Comment 1 Peter Ruskin 2003-06-05 06:56:13 UTC
I withdraw this now.  I can put the link-checking code in /etc/conf.d/local.start. 
 
Sorry for wasting your time 
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2003-06-05 14:20:47 UTC
Don't your modules get installed into /lib/modules/kernel-version? 
 
 
Comment 3 Peter Ruskin 2003-06-05 14:29:18 UTC
Yes they do.  The main problem I have is this: 
If I've just built a new kernel and boot into it, I have to remerge stuff 
like lm-sensors, nvidia-kernel, alsa-driver, etc. to suit that kernel. 
nvidia-kernel looks in /usr/src/linux for the kernel, so it's important 
that the link points to the booted kernel. 
 
Anyway, it doesn't matter now because I check that in /etc/conf.d/local.start 
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-09 08:26:38 UTC
user sets that link