LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2011, 04:44 AM   #1
ryan20fun
LQ Newbie
 
Registered: May 2011
Posts: 7

Rep: Reputation: Disabled
Question How to Install Nvidia Driver NVIDIA-Linux-x86-270.41.19.run


Hi All.
as you should know (from where im posting this) that im an Absolute noob at Ubuntu (ive been using Windows a Lot and wanted to see how hard it would be to include Ubuntu in my App / Game Dev)

now onto the question.
ive downloaded the Nvidia Drivers from there site and followed a Tutorial on how to install it, But i run into this error:
ERROR: nvidia-installer must be run as root

what should i do ?
where is this "root"
and forgive me if this has been asked, but i could not find a question / article / tutorial that got me past this error.

so Many Thanks in Advance.
 
Old 05-30-2011, 06:14 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Since you are a newbie I would strongly recommend to install the driver from Ubuntu's repositories. You can use Ubuntu's driver installer for that. If you use the driver from the website you can run into serious troubles when updating the system.

To your question, in Ubuntu the root is user is disabled by default. If you want to execute a command as root user you have to put the command sudo in front of it, like this
Code:
sudo <Your-Command-Here>
You will be asked for your password, be aware that the password will not show up while typing and the cursor will not move. This is normal, just type your password and press Enter.
 
Old 05-30-2011, 06:19 AM   #3
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Hi

"root" is the most privileged account available on your system. It is the "super user" the user who can do "anything" - delete any file, read any file, and execute any system maintenance task.

The Nvidia installer needs to be run "as root" because it needs to change and modify aspects of the system that, because they are critical to system operation, are only accessible to the root user - e. g. the most powerful user.

I've found that the best way to install the Nvidia "run" files for updating my Nvidia graphics driver is the following. I'm using Fedora, but the basics should remain the same for your distro. (Make sure you save .run file in your home folder, so you know where to get hold of it WITHOUT having the GUI (graphics mode) active.)

VERY IMPORTANT

Make SURE you have your kernel source available!!! I'm not sure how you do this under Ubuntu, or where you get a hold of it, but you MUST have a "kernel-devel" pacakge installed that is for the kernel you are currently running! If you do NOT have this, you might have trouble installing the new Nvidia driver, or you might not be able to do an upgrade at all since the driver NEEDS your current kernel source to be available to compile against - if you're going to do this by hand, which is what I'm describing here...)

1. Open a terminal

Usually, if you're on the desktop of your system, there is a way to "open a terminal". What this means is that you need to find the icon of a terminal emulator program, like xterm or Konsole. These are usually to be found under "utilities" or "system tools". Look in your installation's menu and click on the relevant icon for the relevant terminal emulator.

2. You should now get a display or screen where you can type commands. The first thing to do is to type

Code:
su
Doing this will "turn you into" the root user. Note that you will need to provide your "root password" which you chose during installation of Ubuntu (I think.) Hope you remember what it is - type it in at the "Password:" prompt you should now see.

3. Once you've typed in the password you should get a new prompt that has a "#" at the end. On my system, when I'm root, it looks like this:

Code:
[root@stefanlinux ~]#
and when I'm a normal (non-root) user it looks like this:

Code:
[stefan@stefanlinux php]$
Note that, in my case "$" denotes I'm a normal user, "#" denotes I'm root - most likely your setup will do this too to let you know "who" you are while using the terminal.

4. What you now need to do is switch your system out of "GUI" mode to text mode, so that, in text mode, you can install the NVidia driver. To do this, at the # prompt you now have, type

Code:
vi /etc/inittab
and press enter.

5. BE CAREFUL: What you are now going to do is sensitive and if you make a mistake you can potentially make your Linux install completely unusable.

6. You should see something similar to this:

Code:
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/event.d/rcS
#
# Individual runlevels are started by /etc/event.d/rc[0-6]
#
# Ctrl-Alt-Delete is handled by /etc/event.d/control-alt-delete
#
# Terminal gettys (tty[1-6]) are handled by /etc/event.d/tty[1-6] and
# /etc/event.d/serial
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(8), initctl(8), and events(5).
#
# Default runlevel. The runlevels used are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
7. Press the down arrow until the cursor is on the line that says:

Code:
id:5:initdefault
8. Press the letter A on your keyboard. You'll note that very bottom line of the terminal window now should say "-- INSERT --" - this means you can now edit that line's text.

9. Place the cursor on the "5" in the line

Code:
id:5:initdefault
and change the 5 to a 3, like so:

Code:
id:3:initdefault
10. Press escape (ESC). Then type

Code:
:wq!
to WRITE and QUIT the file.

11. What you've now done is change the runlevel of your system for the next boot. E. g. if you now reboot, you WON'T just go to the graphical desktop you now have, you'll go to TEXT MODE. That is what "id:3:initdefault" means - it means "start up in text mode, with no GUI active."

12. Now, reboot your system. Since you're root, at the "#" prompt, you should be able to just type "reboot":

Code:
[root@stefanlinux ~]# reboot
13. Your GUI should now shutdown and the system should reboot. If you dual-boot, select your Linux install when GRUB or Lilo comes up. Don't be alarmed if the system starts up in text mode, this is what you want.

14. Log in as root at the prompt. E. g. type "root" at the prompt, then the root password (e. g. the same one you used when typing "su" just now.

15. At the # prompt (See? it is the same one you saw when you typed "su" just a few moments ago, inside your terminal emulator) go to your home directory, where you saved the .run file (see the start of the reply above.)

E. g., on my system, to get to my home folder I'd do:

Quote:
[root@stefanlinux ~]# cd /home/stefan/
16. Now you need to make the .run file executable, if it isn't already. In your home folder do

Code:
chmod a+x NVIDIA-Linux-x86-270.41.06.run
and obviously, press ENTER (note you can just type the NV of "NVIDIA" (case sensitive) and press TAB and it should auto-compelete)

17. Once you've done the above, type the name of the .run file and press enter. This will start up the Nvidia installer itself.

18. Follow the onscreen prompts. The installer will check for an existing "kernel interface" for your kernel, if it finds one, great. If not, follow the prompts and allow it to compile a new kernel interface against your kernel. This is where the kernel source referred to above comes in - if it is in a standard location (as your kernel-source package hopefully installs, it should be) the installer will find it, but you might need to type the full path to the source if it cannot - I've got no idea where Ubuntu puts kernel sources if installed via the Ubuntu package management facilities).

19. Once the procedure is complete, the installer should report success.

20. Once you're back in the text terminal, again edit the /etc/inittab file as detailed above. Only now, change the "3" in the line

Code:
id:3:initdefault

back to a 5, like so:

Code:
id:5:initdefault
and wq! the file.

21. Again type reboot. You've now switched back from "boot into text mode" (3) to "boot into GUI mode" (5).

22. Hopefully, when your system now starts up, it will be in GUI mode with the new Nvidia driver active...

Last edited by rylan76; 05-30-2011 at 06:42 AM.
 
Old 05-30-2011, 06:26 AM   #4
ryan20fun
LQ Newbie
 
Registered: May 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
@rylan76
ok, will try that.

oh, i should have mentioned that i have downloaded and installed Ubuntu 11.X through the wubi under windows XP.

i also looked at the Additional Drivers Window, but it wanted to download the drivers and i dont have a fast internet connection spped (192BKs)
 
Old 05-30-2011, 06:52 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
@rylan76: Your HowTo will not work on Ubuntu for several reasons.

To your points:
2. Will not work, Ubuntu has not an activated root account by default.

4.-12. Will not work, Ubuntu is (like the most Debian based distros) using runlevel 2 by default. If you want to stop X from starting you have to do that by disabling the display-manager' startup.

The rest of your HowTo is for that reasons not really applicable.

As I said before, for a newbie I recommend strongly to let the driver installer install the drivers, or you will run into serious problems when the kernel or X is updated.
 
Old 05-30-2011, 07:17 AM   #6
deto86
Member
 
Registered: Oct 2010
Location: goa,India
Distribution: Slackware64-Current
Posts: 66

Rep: Reputation: 0
@ryan20fun
In Ubuntu, there is not a specific account as "root" but you can run command as a root(i mean, having the same permissions as root ) by prefixing "sudo" followed by your command i.e
Quote:
sudo <your_command>
.It will ask you for the password.
Or else,you can run all commands as a root.In order to login as a root you can use
Quote:
sudo su
.
Then make that nvidia binary executible which you have downloaded from the nvidia site.
This can be done by running
Quote:
chmod +x NVIDIA-Linux-x86-270.41.06.run
Then execute it by running
Quote:
./NVIDIA-Linux-x86-270.41.06.run
It will do the rest.Run
Quote:
nvidia-xconfig
and
Quote:
nvidia-settings
if it doesn't showed up during installation.
Quote:
nvidia-setting
is optional since
Quote:
nvidia-xconfig
will configure yr graphics card
 
Old 05-30-2011, 11:55 AM   #7
ryan20fun
LQ Newbie
 
Registered: May 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by deto86 View Post
@ryan20fun
In Ubuntu, there is not a specific account as "root" but you can run command as a root(i mean, having the same permissions as root ) by prefixing "sudo" followed by your command i.e .It will ask you for the password.
Or else,you can run all commands as a root.In order to login as a root you can use .
Then make that nvidia binary executible which you have downloaded from the nvidia site.
This can be done by running
Then execute it by running
It will do the rest.Run and if it doesn't showed up during installation. is optional since will configure yr graphics card
what directory should i put the drivers under ?
because i tried the home folder and desktop but it keeps saying that no such command exits.
and i tried draging the run file to the console window but the best i can get it to do is have the same error as what i posted in my first post.
is there a simple script or something i can run that will install the drivers ?
 
Old 05-30-2011, 12:12 PM   #8
deto86
Member
 
Registered: Oct 2010
Location: goa,India
Distribution: Slackware64-Current
Posts: 66

Rep: Reputation: 0
There is no restriction of using any directory unless you have permission of that particular directory to access especially /root directory.
If you downloaded NVIDIA-Linux-x86-270.41.06.run under desktop directory then you can use
Quote:
cd /home/abc/Desktop
where abc is your user name.Then you can followed the above commands starting from
Quote:
sudo su
Above method which I have explained can be used for almost all linux distros.

http://www.webupd8.org/2010/06/how-t...5-display.html
The above link explains about installing nvidia-driver in Ubuntu only.Try out if it works
 
Old 05-30-2011, 12:15 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,639

Rep: Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653
what directory should i put the drivers under ?

YOU DO NOT
the installer will put it where it belongs

BUT I WOULD RECOMMEND using the driver in the ubuntu repo

for the .run you MUST reinstall it for EVERY AND ALL kernel ,X11,and mesa updates
basicaly for EVERY major update you will have to reinstall
BUT HERE IS THE KIKER
your system will boot ONLY into TEXT ONLY
there will be NO GUI TO USE TO REINSTALL THE .run
 
Old 05-30-2011, 12:19 PM   #10
ryan20fun
LQ Newbie
 
Registered: May 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
nope, not working
this is what i did:
administrator@ubuntu:~$ cd /home/administrator/desktop
bash: cd: /home/administrator/desktop: No such file or directory
administrator@ubuntu:~$ sudo su
[sudo] password for administrator:
root@ubuntu:/home/administrator# NVIDIA-Linux-x86-270.41.19.run
NVIDIA-Linux-x86-270.41.19.run: command not found
root@ubuntu:/home/administrator# sudo NVIDIA-Linux-x86-270.41.19.run
sudo: NVIDIA-Linux-x86-270.41.19.run: command not found
root@ubuntu:/home/administrator# chmod +x NVIDIA-Linux-x86-270.41.19.run
root@ubuntu:/home/administrator# sudo su NVIDIA-Linux-x86-270.41.06.run
Unknown id: NVIDIA-Linux-x86-270.41.06.run
root@ubuntu:/home/administrator#

so what am i doing wrong ?

---edit---
i take it that in the additional drivers window:
when i click the activate button it will download and install the driver ?
if so, i could just leave my PC overnight to do that.

Last edited by ryan20fun; 05-30-2011 at 12:21 PM. Reason: edit
 
Old 05-30-2011, 12:20 PM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
administrator@ubuntu:~$ cd /home/administrator/desktop
It's Desktop, with capital D

Kind regards
 
Old 05-30-2011, 12:43 PM   #12
ryan20fun
LQ Newbie
 
Registered: May 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
nope still not working, do i have to do anything special to get it to install ?
because ive tried all sorts of stuff in the terminal window and the best i can get is
ERROR: nvidia-installer must be run as root
and that is from the nvidia .run file
 
Old 05-30-2011, 12:57 PM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
ERROR: nvidia-installer must be run as root
In the terminal type:
Code:
cd /home/administrator/Desktop
sudo ./NVIDIA-Linux-x86-270.41.19.run
Kind regards
 
Old 05-30-2011, 01:17 PM   #14
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,639

Rep: Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653
for the .run if you REALLY want to use it
copy it to /
that way it is easy to find ( you need to be root to copy it there )
when you dl'ed it in ff it automatically dl'ed it to Downloads - in your home folder
Code:
su
cd ~/Downloads 
cp *.run / 
telinit 3 /* or 2 for a debain based distro */
relogin as root in the text only screen
Code:
cd /
sh *.run
fallow the onscreen instructions
then repeat EVERY TIME you have a kernel update
but there will be NO gui to use
only the text only terminal
 
Old 05-30-2011, 09:26 PM   #15
deto86
Member
 
Registered: Oct 2010
Location: goa,India
Distribution: Slackware64-Current
Posts: 66

Rep: Reputation: 0
@ryan20fun
Did you follow the link of webupd8? I think it configure my nvidia card on other PC.Most of the Ubuntu user installed the driver for their nvidia card through third-party repo instead of downloading from nvidia official site and the configure.
And after installationfrom their respective repo,you need to activate this additional driver in System->Preference/Administration(I'm not remembering exactly) after a reboot

In Ubuntu there is no point in running "telinit" as Ubuntu doesn't have "/etc/inittab" file.So fix runlevel
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] NVIDIA-Linux-x86-270.41.06 Install ? prickee Debian 3 05-05-2011 07:26 AM
NVIDIA (NVIDIA-Linux-x86-1.0-7667-pkg1.run) undef00 Linux - Hardware 8 08-21-2005 02:35 PM
NVIDIA-Linux-x86-1.0-5111-pkg1.run ?? dolphans1 Mandriva 7 09-01-2004 09:39 AM
kernel 2.6.3--bk8 and NVIDIA-Linux-x86-1.0-5336 video driver from Nvidia zdenkod Linux - Hardware 2 03-09-2004 05:38 AM
Big problems installing NVIDIA-Linux-x86-1.0-4349.run ludwig W Linux - Software 4 04-19-2003 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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