It is not really needed to compile a new kernel. You need to install for example the kernel headers package: apt-get install kernel-headers-2.4.18-bf (this was the name in my case, in other cases use "uname -r" to find the kernel name)
When you would try to compile the kernel module it will still spit out an error about modversions.h and that's because the kernel headers/source dir is: /usr/src/kernel-2.4.18-bf. To make the nvidia kernel module happy you can do two things:
fix 1 do: make SYSINCLUDE=/usr/src/kernel-2.4.18-bf
fix 2: "ln -s /usr/src/kernel-2.4.18-bf linux" and after this compile the kernel module.