LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Find out kernel source path? (https://www.linuxquestions.org/questions/linux-mint-84/find-out-kernel-source-path-941204/)

moxieman99 04-22-2012 08:22 PM

Find out kernel source path?
 
Dual booting Win7 on a Gateway 4850 computer with Linux Mint 12. TRYING to install the latest nvidia driver(295.40) for my geForce 420 video card, and ran into a heck of a time preventing nouveau drivers from loading (went into /etc/default/grub and added nouveau.blacklist=1 to grub and that seemed to take care of nouveau, after many other attempts), but I now have a different error, specifically:

ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.


So, where and how can I find the kernel source path? Win7 takes up three or four partitions on the system (recovery partitions and all), and I installed Linux Mint 12 after Win7 with partitions for /boot / /home /usr /opt and swap. I assume that the kernel path is in root, but right now my brain is fried with how ridiculously hard this has all been.

Any suggestions as to where I should look and what to do once I get there? Keep in mind this is a family web site.

coolbeans777 04-22-2012 11:48 PM

Did you buy the GeForce 420 because of the marijuana reference? Lol, just kidding.

I would know how to fix it if I knew how to access the kernel configurations on debian based systems, but I unfortunately don't. I'm sure there's a way. If you can access the config file used to compile the kernel on your system, then you can recompile your kernel with nouveau DISABLED, and that will get rid of it for good. Then you can remove all of the blacklisting nonsense, 'sudo apt-get purge xserver-xorg-video-nouveau (or something like that)', and just reinstall the NVIDIA driver. Everytime you recompile your kernel, you also have to reinstall NVIDIA drivers. If you end up finding the configuration file, then post again here, and I'll help you recompile your kernel, re-install nvidia drivers, etc.

jschiwal 04-23-2012 12:10 AM

The kernel source is probably at:
/lib/modules/$(uname -r)/source

but for compiling a single module, you may need to enter /lib/modules/$(uname -r)/build or maybe /lib/modules/$(uname -r)/

uname -r returns your kernel version. The build system is organized to contain this name.

moxieman99 04-23-2012 07:46 AM

Quote:

Originally Posted by jschiwal (Post 4660363)
The kernel source is probably at:
/lib/modules/$(uname -r)/source

but for compiling a single module, you may need to enter /lib/modules/$(uname -r)/build or maybe /lib/modules/$(uname -r)/

uname -r returns your kernel version. The build system is organized to contain this name.

Thank you. I will try it out after work.

moxieman99 04-23-2012 07:51 AM

Quote:

Originally Posted by coolbeans777 (Post 4660352)
Did you buy the GeForce 420 because of the marijuana reference? Lol, just kidding.

I would know how to fix it if I knew how to access the kernel configurations on debian based systems, but I unfortunately don't. I'm sure there's a way. If you can access the config file used to compile the kernel on your system, then you can recompile your kernel with nouveau DISABLED, and that will get rid of it for good. Then you can remove all of the blacklisting nonsense, 'sudo apt-get purge xserver-xorg-video-nouveau (or something like that)', and just reinstall the NVIDIA driver. Everytime you recompile your kernel, you also have to reinstall NVIDIA drivers. If you end up finding the configuration file, then post again here, and I'll help you recompile your kernel, re-install nvidia drivers, etc.

<Chuckle> No, the Gateway 4850 comes with the GeForce 420 chip. It's low end, but I don't do any demanding video, so it suits my purposes.

NVIDIA discovered a security hole in drivers prior to 295.40, so I'd like to patch this thing, in addition to getting audio over HDMI. The nouveau driver problem is just inane.


All times are GMT -5. The time now is 10:58 PM.