LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-12-2011, 05:50 PM   #1
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Rep: Reputation: 0
Question Slackware kernel-headers, nvidia driver module


This was my first time configuring and compiling a linux kernel. I used alienbob's guide for a reference (excellent resource, I might add); everything went (somewhat) smoothly, but I have a few questions.

The first one is, in short, how do I update the kernel-headers?

The guide says that if one was to recompile software, glibc would rely on the kernel headers in /usr/include/linux (which would be the headers from kernel version 2.6.37.6 I presume). Wouldn't I have to copy the headers from the new kernel into /usr/include/linux?

This leads to the second question; when I attempted to startx I found that the previous nvidia driver I had installed wasn't recognized by the new kernel. I ran the nvidia driver installer again and it came up with an installation error, was this because I hadn't updated the kernel-headers or... ?

Last edited by ADX; 08-12-2011 at 05:52 PM.
 
Old 08-12-2011, 07:15 PM   #2
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
The general rule is to keep the kernel headers that glibc was built against so you don't update the headers when just updating the kernel.
When you run a new kernel you will have to rebuild any modules and so Nvidia will have to be rebuilt - you should post the errors here from the Nvidia rebuild and folks could help out with that. Don't update the kernel headers though.
 
1 members found this post helpful.
Old 08-12-2011, 08:34 PM   #3
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bgeddy View Post
The general rule is to keep the kernel headers that glibc was built against so you don't update the headers when just updating the kernel.
When you run a new kernel you will have to rebuild any modules and so Nvidia will have to be rebuilt - you should post the errors here from the Nvidia rebuild and folks could help out with that. Don't update the kernel headers though.
Thanks for the reply.

Okay, I think I understand. If glibc is updated then that means the kernel-headers need to be updated as well?

Also, here is the nvidia install log:


Code:
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Fri Aug 12 15:05:54 2011
installer version: 260.19.12

PATH: /usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

option status:
  license pre-accepted               : false
  update                             : false
  force update                       : false
  expert                             : false
  uninstall                          : false
  driver info                        : false
  precompiled interfaces             : true
  no ncurses color                   : false
  query latest version               : false
  no questions                       : false
  silent                             : false
  no recursion                       : false
  no backup                          : false
  kernel module only                 : false
  sanity                             : false
  add this kernel                    : false
  no runlevel check                  : false
  no network                         : false
  no ABI note                        : false
  no RPMs                            : false
  no kernel module                   : false
  force SELinux                      : default
  no X server check                  : false
  no cc version check                : false
  run distro scripts                 : true
  no nouveau check                   : false
  run nvidia-xconfig                 : false
  sigwinch work around               : true
  force tls                          : (not specified)
  force compat32 tls                 : (not specified)
  X install prefix                   : (not specified)
  X library install path             : (not specified)
  X module install path              : (not specified)
  OpenGL install prefix              : (not specified)
  OpenGL install libdir              : (not specified)
  compat32 install chroot            : (not specified)
  compat32 install prefix            : (not specified)
  compat32 install libdir            : (not specified)
  utility install prefix             : (not specified)
  utility install libdir             : (not specified)
  installer prefix                   : (not specified)
  doc install prefix                 : (not specified)
  kernel name                        : (not specified)
  kernel include path                : (not specified)
  kernel source path                 : (not specified)
  kernel output path                 : (not specified)
  kernel install path                : (not specified)
  precompiled kernel interfaces path : (not specified)
  precompiled kernel interfaces url  : (not specified)
  proc mount point                   : /proc
  ui                                 : (not specified)
  tmpdir                             : /tmp
  ftp mirror                         : ftp://download.nvidia.com
  RPM file list                      : (not specified)
  selinux chcon type                 : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 260.19.12.
-> There appears to already be a driver installed on your system (version: 260.
   19.12).  As part of installing this driver (version: 260.19.12), the existin
   g driver will be uninstalled.  Are you sure you want to continue? ('no' will
   abort installation) (Answer: Yes)
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/3.0.0/source'
-> Kernel output path: '/lib/modules/3.0.0/build'
ERROR: If you are using a Linux 2.4 kernel, please make sure
       you either have configured kernel sources matching your
       kernel or the correct set of kernel headers installed
       on your system.
       
       If you are using a Linux 2.6 kernel, please make sure
       you have configured kernel sources matching your kernel
       installed on your system. If you specified a separate
       output directory using either the "KBUILD_OUTPUT" or
       the "O" KBUILD parameter, make sure to specify this
       directory with the SYSOUT environment variable or with
       the equivalent nvidia-installer command line option.

       Depending on where and how the kernel sources (or the
       kernel headers) were installed, you may need to specify
       their location with the SYSSRC environment variable or
       the equivalent nvidia-installer command line option.
ERROR: Installation has failed.  Please see the file
       '/var/log/nvidia-installer.log' for details.  You may find suggestions
       on fixing installation problems in the README available on the Linux
       driver download page at www.nvidia.com.

Last edited by ADX; 08-12-2011 at 08:47 PM.
 
Old 08-12-2011, 08:44 PM   #4
hf2046
Member
 
Registered: Mar 2011
Distribution: Slack64
Posts: 111

Rep: Reputation: 20
Try copying the kernel source tree to /usr/src, e.g. sudo cp -R linux-3.0 /usr/src. Do a make clean beforehand in the kernel source directory to speed things up. Then try reinstalling the nvidia driver.
 
Old 08-12-2011, 08:49 PM   #5
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hf2046 View Post
Try copying the kernel source tree to /usr/src, e.g. sudo cp -R linux-3.0 /usr/src. Do a make clean beforehand in the kernel source directory to speed things up. Then try reinstalling the nvidia driver.
I actually compiled the new kernel inside the /usr/src folder as recommended by the guide. No go.
 
Old 08-13-2011, 02:45 AM   #6
hf2046
Member
 
Registered: Mar 2011
Distribution: Slack64
Posts: 111

Rep: Reputation: 20
Quote:
Originally Posted by ADX View Post
I actually compiled the new kernel inside the /usr/src folder as recommended by the guide. No go.
Duh. I should've read your post more carefully. Two things I noticed - are you sure you need the 260.x.x driver series? The latest is 280.13. Also from the installer log it says the kernel source path is '/lib/modules/3.0.0/source' - does that exist and/or point to your kernel source directory?
 
Old 08-13-2011, 03:28 AM   #7
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hf2046 View Post
Duh. I should've read your post more carefully. Two things I noticed - are you sure you need the 260.x.x driver series? The latest is 280.13. Also from the installer log it says the kernel source path is '/lib/modules/3.0.0/source' - does that exist and/or point to your kernel source directory?
Oh wow, 280.13? I must have have grabbed what I thought was the latest driver from a third-party mirror.

As far as the kernel source path, the "source" and "build" directories are linked as shown:

Code:
# ls
build@               modules.dep.bin      modules.seriomap
kernel/              modules.devname      modules.softdep
modules.alias        modules.ieee1394map  modules.symbols
modules.alias.bin    modules.inputmap     modules.symbols.bin
modules.builtin      modules.isapnpmap    modules.usbmap
modules.builtin.bin  modules.ofmap        source@
modules.ccwmap       modules.order
modules.dep          modules.pcimap
# file source
source: symbolic link to `/usr/src/linux-3.0'
# file build
build: symbolic link to `/usr/src/linux-3.0'
Perhaps the driver is the culprit. I'll install the new version later today and post back.

Last edited by ADX; 08-13-2011 at 03:29 AM.
 
Old 08-13-2011, 04:05 AM   #8
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by ADX View Post
Code:
# file source
source: symbolic link to `/usr/src/linux-3.0'
# file build
build: symbolic link to `/usr/src/linux-3.0'
I sense a lot of confusion here. First of all, how did you install this kernel? If you built it yourself, and if you use modules (which you have to for the Nvidia driver even if the rest of the kernel is static) you call
Code:
make modules_install
as part of the kernel build process. That will create a /lib/modules subdirectory with all the correct links. Btw, I personally do NOT think /usr/src is a good place for manual kernel builds but that's your choice.

NOTE: the /lib/modules subdirectory will match the kernel release as specified in the Makefile. At runtime you can check it via
Code:
uname -r
In your case the correct directory name would be /lib/modules/3.0.0 ! You can override it for the Nvidia installer using the -k flag, but the kernel tools expect it there.
 
Old 08-13-2011, 12:11 PM   #9
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Martinus2u View Post
I sense a lot of confusion here. First of all, how did you install this kernel? If you built it yourself, and if you use modules (which you have to for the Nvidia driver even if the rest of the kernel is static) you call
Code:
make modules_install
as part of the kernel build process. That will create a /lib/modules subdirectory with all the correct links. Btw, I personally do NOT think /usr/src is a good place for manual kernel builds but that's your choice.
I should have been more specific, the following was from inside the /lib/modules/3.0.0 directory - as far as I can tell, it has the correct links. Also, I did do a "make modules_install" after the kernel and module compile.

Code:
# ls
build@               modules.dep.bin      modules.seriomap
kernel/              modules.devname      modules.softdep
modules.alias        modules.ieee1394map  modules.symbols
modules.alias.bin    modules.inputmap     modules.symbols.bin
modules.builtin      modules.isapnpmap    modules.usbmap
modules.builtin.bin  modules.ofmap        source@
modules.ccwmap       modules.order
modules.dep          modules.pcimap
# file source
source: symbolic link to `/usr/src/linux-3.0'
# file build
build: symbolic link to `/usr/src/linux-3.0'

Quote:
NOTE: the /lib/modules subdirectory will match the kernel release as specified in the Makefile. At runtime you can check it via
Code:
uname -r
In your case the correct directory name would be /lib/modules/3.0.0 ! You can override it for the Nvidia installer using the -k flag, but the kernel tools expect it there.
The "uname -r" command output "3.0.0" as it should have; I suppose this means everything is working as it should. The new driver works as well. It must of not been compatible with the new kernel or something.

Last edited by ADX; 08-13-2011 at 12:12 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NVIDIA kernel module version is different from NVIDIA driver lalik Linux - Newbie 2 09-16-2010 03:32 PM
kernel module and driver dont match- nvidia mtdew3q Linux - General 5 07-12-2008 12:45 PM
Installing NVIDIA driver error with the kernel header does not exist io13 Linux - Software 10 07-20-2006 06:34 AM
nvidia driver 8762 kernel module mismatch x module openfun Ubuntu 5 06-27-2006 10:02 PM
Kernel header files needed for Nvidia driver installation natalinasmpf Linux - Hardware 10 12-08-2003 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration