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
I withdraw this now. I can put the link-checking code in /etc/conf.d/local.start. Sorry for wasting your time
Don't your modules get installed into /lib/modules/kernel-version?
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
user sets that link