Hi,
i guess i'll write a faq 'bout all those questions
first of all:
your kernel headers can be found by doing an:
apt-get search kernel | grep headers
after that you should see lots of header packages
now you have to check out which kernel is installed, just do a:
uname -r
and now you see the kernel-version.
if you would do an
apt-cache search $(uname -r)
then you'll find the packages you need. the kernel headers are inside the header package, after an
apt-get install kernel-headers-$version
you can find your kernel headers in /usr/src/$(uname -r)
and now you've got your kernel headers to compile the nvidia module.
BUT:
you should do all that the debian way with make-kpkg:
first of all if you need a few packages to build the modules (kernel):
1. required packages
=================
the following packages are required...
ncurses-dev, gcc, g++, make, kernel-package,dpkg-dev, fakeroot, xlibmesa3, xlibmesa3-dev and bison
do an:
apt-get install ncurses-dev gcc g++ bison make kernel-package dpkg-dev fakeroot xlibmesa3 xlibmesa-dev
to install them. There has to be the non-free option in your sources.list in /etc/apt, check this, if not run apt-setup to change it.
also you have to remove the old glide libs:
apt-get remove '.*glide.*'
if you don't want to build your own kernel skip this step and go on with step 3
2. Building Kernel
==============
download the latest kernel source from ftp.kernel.org (or a mirror near you)
USE A STABLE ONE (2.4)
f.e.: wget
ftp://ftp.kernel.org/pub/linux/kerne...2.4.21.tar.bz2
after that put your tarball to /usr/src and untar it
f.e.: mv linux-4.2.1.tar.bz2 /usr/src && tar xvfj linux-2.4.21.tar.bz2
now you have to link to the kernel directory:
ln -s /usr/src/linux /usr/src/linux-2.4.21
change to the directory
cd linux
and do a:
make menuconfig
now configure your kernel and save the new kernel config.
2. building NVIDIA Drivers
======================
now run an:
apt-get install nvidia-glx-src nvidia-kernel-src
after that you should find two packages in /usr/src:
nvidia-glx_1.0.4349-1.tar.gz
nvidia-kernel-src.tar.gz
change to /usr/src
cd /usr/src
and untar them by running:
tar xvfz nvidia-*.gz
now you have a directory called modules where the nvidia kernel module resides in
now change back to /usr/src/linux
and do a:
make-kpkg buildpackage
after that, the kernel and the modules will be build with the whole documentation and so on ...
if you just want to build the nvidia kernel package do a:
make-kpkg modules_image
so only the modules will be build that reside in /usr/src/modules
ok, so far...
after the packages are build you have to build the nvidia glx package
change to /usr/src/nvidia-glx-$version
and do a
dpkg-buildpackage -us -uc -rfakeroot
now dpkg builds the glx package for the X servers
after everything is done fine you can find lots of packages in /usr/src
change there
cd /usr/src
and do a
dpkg --install kernel-image*.deb
after dpkg has installed the kernel image and you have answered the questions of dpkg correctly you can install the nvidia kernel and glx module with
dpkg --install nvidia-*.deb
now the kernel and the X module have been installed.
After (!) you've got a running X with the normal nv driver (try to setup your X with xf86config on the command line)
you have to change the following in the /etc/X11/XF86Config file:
comment out the lines with "dri" in it (if they exist)
change the Driver option from "nv" to "nvidia" in the Graphics device section
and load the module "glx" in the modules section (it should be already there and you only have to comment it out)
after that, login as normal user and try a startx
that's it enjoy the NVIDIA logo that appears everytime you start X and have a lot of fun
cu