LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-02-2006, 09:15 PM   #1
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
How to not rebuild NVIDIA drivers for each kernel?


Is it possible to not rebuild the NVIDIA drivers for each kernel build, if not for different versions of the kernel at least for rebuilds of the same kernel?
 
Old 06-03-2006, 04:37 AM   #2
doc.nice
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Debian
Posts: 274

Rep: Reputation: 34
yes, before doing make modules_install simply backup the old nvdia module and copy it back afterwards...
(works only for rebuild of the same kernel version)
 
Old 06-03-2006, 07:14 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Actually, there is a way. Here's the short steps:
Code:
1. Boot with the new kernel.
2. Then cd to the following directory : /lib/modules/OLDKERNELVERSION/kernel/drivers/video/
(replace OLDKERNELVERSION with your own specific version)
3. Make a copy of the old driver: "cp nvidia.(k)o nvidia.(k)o.old"
4. Run the Nvidia installer
(this will create the new driver in /lib/modules/CURRENTKERNELVERSION/kernel/drivers/video/)
5. In the same directory mentioned under 2 do a rename to the original name
"mv nvidia.(k)o.old nvidia.(k)o"
These 5 simple steps will give you the Nvidia module in both kernels,
and you can quite happily boot into either one without re-installing.

Evidence:
Code:
dave@matthews:~$ ls /lib/modules/2.4.32/kernel/drivers/video/
aty/              fbcon-cfb4.o.gz        hgafb.o.gz     nvidia.o       sis/
aty128fb.o.gz     fbcon-hga.o.gz         intel/         pm2fb.o.gz     sstfb.o.gz
clgenfb.o.gz      fbcon-mfb.o.gz         it8181fb.o.gz  pm3fb.o.gz     tdfxfb.o.gz
cyber2000fb.o.gz  fbcon-vga-planes.o.gz  matrox/        radeonfb.o.gz  tridentfb.o.gz
fbcon-cfb2.o.gz   fbgen.o.gz             neofb.o.gz     riva/          vga16fb.o.gz
dave@matthews:~$ ls /lib/modules/2.6.16.19/kernel/drivers/video/
nvidia.ko
I've had these instructions for a year or more, but just tried
them on a customer's box. I've done it, rebooted a few times, and
it's nice how they work.
 
Old 06-03-2006, 07:31 AM   #4
doc.nice
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Debian
Posts: 274

Rep: Reputation: 34
I think it's not the problem building two nvidia-modules for different kernels, but keeping the nvidia module when rebuilding the kernel... (what is solved with my idea)

Your method can be achieved much easier using NVIDIA-INSTALLER -N (see advanced installer options)
 
Old 06-03-2006, 07:48 AM   #5
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
So now we know how to keep the Nvidia module for a rebuild
of the same kernel version, and how to keep if for a rebuild
of a different kernel version. Nice to work together, eh?
 
Old 06-03-2006, 06:42 PM   #6
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Original Poster
Rep: Reputation: 30
Thanks everyone for your help, this'll make things easier.
 
Old 06-03-2006, 07:03 PM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Looking at "man nvidia-installer" I see these:
Quote:
-n, --no-precompiled-interface
Disable use of precompiled kernel interfaces.

-N, --no-network
This option instructs the installer to not attempt to connect to the NVIDIA
ftp site (for updated precompiled kernel interfaces, for example).

-K, --kernel-module-only
Install a kernel module only, and do not uninstall the existing driver.
This is intended to be used to install kernel modules for additional ker-
nels (in cases where you might boot between several different kernels). To
use this option, you must already have a driver installed, and the version
of the installed driver must match the version of this kernel module.
doc.nice,

Don't forget that *nix commands are case sensitive. As for the -N switch, I always tell it NOT to go to the Nvidia FTP site, because it's just an unnecessary waste of time. When I first ran Slackware in 2003 I would let it try, but it never reached the site. Same with trying the "nvidia-installer --update" option. It can get there to tell me there's a new version, but it can't download it for me (never gets past 1%). Today it's hung here:
Code:
Downloading:
  ftp://download.nvidia.com/XFree86/Linux-x86/1.0-8762/NVIDIA-Linux-x86-1.0-8762-pkg1.run
____________________________________________________________________________________________
Downloading
                                             0%
 
Old 07-12-2006, 11:35 AM   #8
philippeP
LQ Newbie
 
Registered: Sep 2005
Location: Germany
Distribution: Debian sarge/etch
Posts: 18

Rep: Reputation: 0
Might wanna check this thread of mine.

See the "-K -k <kernel_number>" option, but only works with the "*pkg1.run" shell script, not with the "nvidia-installer" executable.
 
Old 07-15-2006, 07:56 AM   #9
doc.nice
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Debian
Posts: 274

Rep: Reputation: 34
nice co-working here...

sorry for the confusion, of course I meant -K, not -N...

CMIIW:
you can add these parameters to the .run files an to the nvidia-installer script contained inside, as the .run script passes them on.

the download-problem seems specific to your system, as it works perfectly for me (and btw. also using a browser pointing to the address given by your output).
 
  


Reply

Tags
nvidia, solution



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New kernel + NVidia drivers Mad Merlin Linux - General 2 06-03-2006 07:36 PM
Nvidia drivers and kernel? Shady195 Linux - Newbie 11 10-22-2005 04:30 AM
kernel 2.6.13 and nvidia drivers fllabron Debian 4 09-18-2005 11:18 AM
Kernel 2.6.3 + nVidia drivers wiBo Linux - General 2 02-26-2004 03:35 PM
nvidia drivers in kernel?? Zig Linux - Software 3 06-29-2003 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05: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