Another way to prevent an install-under-kernel-B
from trashing the module already installed-under-kernel-A
is to move the installed kernel-A module first
to a place where modprobe can find it but
nvidia-installer can't, then run the nvidia-installer normally.
E.g. I have kernels "2.4.18-bigmem" and
"2.4.20-xfs". I've already run nvidia-installer
under 2.4.18-bigmem; it created a file
which I want to keep.
Now I boot to 2.4.20-xfs, but before running
nvidia-installer, I say
mv kernel/drivers/video/nvidia.o misc/
Moving nvidia.o out of the kernel/... subtree
also means (for better or worse) that if I
"make modules_install" on that kernel's
source tree, it won't erase nvidia.o.
That's good if I make only small changes,
but bad if I make a kernel .config change that breaks compatibility.
Find out by running "depmod -ae".
If nvidia.o has undefined symbols,
then rm /lib/modules/whatnot/misc/nvidia.o
and then mv
... as above.