Help - Search - Members - Calendar
Full Version: Gentoo Install Take 2
Linuxhelp > Support > Technical Support
So I think something got totally screwd up durring my linux install (probably had something to do with loosing power in the middle) when I went to see what my kernel was called for my grub configuration there wasn't anything in the /boot folder (except the grub folder and the lost&found) and that didn't seem right, I just thought I would put up a post to make sure before I went through that all again.
If you use the genkernel script to make the kernel, it should copy the kernel and the initrd files to the /boot directory....
No, I tried to do it the hard way and I scewed up. What ever, its not important now, I redid it with genkernel and now I am up and running. Now what I need is a good list of packages to install (or emerge) so that I can have the basics like a graphical GUI and what not. Got any suggestions?

Never mind, I found it, anyone else who wants to know this, its all on the page under docs just where I should have looked before posting.
ok, so new problem. So I am configuring my XFree system, and I got it up, but now I want to install the nvidia modules so I can run my dual head. So this is what is happening...

The docs say to run these commands
# emerge nvidia-glx
# emerge nvidia-kernel
# nano -w /etc/X11/XF86Config
(Change "nv" to "nvidia" in the Device section)
# modprobe nvidia

the first two emerges finish with no errors (that I can see at least) I changed the drive in the config file, but when I tryp modprobe nvidia this is what I get

#modprobe nvidia
FATAL: Error inserting nvidia (/lib/modules/2.6.7-gentoo-r5/video/nvidia.ko): Invalid module format

So what? Any ideas of where to go? I am going to go try stuff, but I don't have any real ideas.
Another questions, I just went to edit my grub.conf file and found out that my boot partition wasn't mounted to /boot, why isn't my boot partition mounting, this is the fstab line...

/dev/hdb1  /boot  ext2  noauto,noatime  1 1
They don't automatically mount boot ... so your kernel can't change unless you want it to.

It is a security feature. I mount go ahead and set the /boot partition to mount.

Is this machine a NFORCE 2 board? If so, you will need to make sure you set your NVIDIA gart agp on before you compiled your kernel.
ya, ok, NVIDIA gart agp on, got it let me just figure out what that means
OK ... now that I am at home, beside my gentoo box, let me see if I can tell you what I meant smile.gif

Run either make menuconfig (or make xconfig) ...

go to:

Device Drivers -> Character Devices

make sure that the option:

/dev/agpgart (AGP Support) is selected as a <M>

and under it, at least:

NVIDIA nForce/nForce2 chipset support is selected as <M>

If you had to change anything, recompile the kernel....

make sure you have hotplug starting on bootup....

emerge -UuD hotplug
rcupdate add hotplug default

You should have agpgart running in (do lsmod).

You should be able to start X
agpgart is already running. I can get the xserver to start if I just use nv as the driver its actually installing the nvidia drivers that I am getting the error, not the start up.
New question: after you emerge something, it seems like it always has you run the command env-update && source /etc/profile which not only gives you a different looking prompt, but it seems like it gives me a different bash, what am I suposed to be using and why does it feel like the commands I need aren't there?
I usually run each command seperately (not on the same line) without the &&

What each one does is:

env-update - resets your environment variables and loads any new items required by a new compiled program ... based on what portage knows is installed.

source /etc/profile - this is a default set of environment variables ... since we rest the variables above, we need to reload the default environemnt again. (the Source command allows you to do this in bash ... /etc/profile is the actual file loaded that contains the environment variables).

It shouldn't give you a new bash ... it does reset your environment. You should either be running these commands in the console ... or in a bash terminal window.
well, there are some commands that I can run before I run source /etc/profile and than can't after, or can't before and can after, thats why I get confused.

Like when I start up the system, I still have it loading a command line, and so I log in, and than in order to run kdm to get KDE I have to first run source /etc/profile or it doesn't know what the command is.

And than ounce I am in kde, I can't run anything graphical programs after I run source /etc/profile because it complains about my x enviroment not being something.... I don't remeber, I will get back to you on that.

I am just a little confused, thats all.
Here is my .bashrc
# /etc/skel/.bashrc:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.8 2003/02/28 15:45:35 azarah Exp $

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"
alias df="df -h"

# Change the window title of X terminals
case $TERM in
 PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}07"'
 PROMPT_COMMAND='echo -ne "33_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}33\"'

##uncomment the following to activate bash-completion:
#[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion

And here is my .bash_profile
# /etc/skel/.bash_profile:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bash_profile,v 1.10 2002/11/18 19:39:22 azarah Exp $

#This file is sourced by bash when you log in interactively.
[ -f ~/.bashrc ] && . ~/.bashrc

I have been looking at how gentoo boots ... basically, /etc/profile should be getting sourced when you startup already. You should only need to re-source it after you install a new program.

It is very important that you do etc-update if required....

Once the programs are installed and you reboot, everything should be automatic, and /etc/profile should load without intervention.

Only root normally has /sbin and /usr/sbin in the PATH...maybe some of the commands you can't run are in one of those directories.
as far as KDE is concerned, there should be 3 files in /etc/env.d concerning kde (at least in my install) ... they are:


(some other files in /etc/env.dwill also affect KDE ... like the Xfree files and the opengl files).
So here is how it works .... on boot up, the script /sbin/rc calls the script which generates the file /etc/profile.env by using the info in the /etc/env.d directory ... then /etc/profile should get sourced on login. All that should be automatic.
ok, well its not getting loaded at log in. Well it is and it isn't.

When I log in as root I have to run it in order to be able to run KDM to get my login manager. I shouldn't have to use my loginmanager but I can't figure out why it wont start KDE when I type startx right now, but I am working on that.

Where it for sure isn't loaded is when I open up a xterm or soething like that inside KDE. When I start out my prompt looks like this


than after I run source /etc/profile I get this

jim@argento jim $

and the commands I can run are different. It seems like I am being taken from single user mode to something else. don't know, I still confused. But your helping, I think the problem is that its just not getting loaded right.
This is what I was talking about last night with the x errors when I try to run graphical programs as root.

root@argento grub # emacs grub.conf
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.

root@argento grub # source /etc/profile
argento grub # emacs grub.cof
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.

argento grub #
Wow, I am just driving up my post count today. OK, back to the NVIDIA kernel thing. I had to recompile the kernel to get NTFS support any way, so I double checked and made sure the box you told me we checked, it was. So now both the commands emerge nvidia-glx and emerge nvidia-kernel work with out error but I still get an error when I try to load the nvidia module.

root@argento jim # modprobe nvidia
FATAL: Error inserting nvidia (/lib/modules/2.6.7-gentoo-r5/video/nvidia.ko): Invalid module format
root@argento jim #

I tried it with and without the graphical system running, I did a few other things, its not already running, I checked that. What do I do now?
There is a new feature of the new kernel called 4k stacks (in 2.6.6 and higher kernels)... vice the old default of 8K stacks.

The NVIDIA driver does not work with the 4K stacks...which I think is the default setting.

The setting is in the Kernel Hacking section ... unselect the 4K option and recomile the kernel.

Also in the /etc/X11/XF86Config file make sure DRI is removed.
Recompiled, still no go. I also tried just downloading the package off the nvidia sight, it gave me the same error when I tried to run make install. This is really starting to frustrate me.
Any ideas on hwow to make the nvidia drivers work with Gentoo, other wise I am going to ditch this and go to something else, its totally worthless to me if I can't have both my monitors working.
I am using the Nvidia drivers on my gentoo box right now. All I did was:

emerge -uUD nvidia-kernel nvidia-glx yanc nvoption

Make sure you have X in your use flags
X is in the use flags by default and I didn't take it out so its there. I ran the full command you suggested and this is what i got back.
root@argento jim # emerge -uUD nvidia-kernel nvidia-glx yanc nvoption
Calculating dependencies -
!!! all ebuilds that could satisfy "yanc" have been masked.
!!! possible candidates are:
- media-video/yanc-0.2.0 (masked by: ~keyword)
- media-video/yanc-0.2.1-r1 (masked by: ~keyword)
- media-video/yanc-0.2.1 (masked by: ~keyword)

!!! Error calculating dependencies. Please correct.
root@argento jim #

if I take out the yanc option than it compiles fine. So than I run env-update and what not and try to load the module I still get.

root@argento jim # env-update
* Caching service dependencies...
root@argento jim # source /etc/profile
argento jim # modprobe nvidia
FATAL: Error inserting nvidia (/lib/modules/2.6.7-gentoo-r5/video/nvidia.ko): Invalid module format
argento jim #

I don't get it at all.
What happens if you put nvidia into your /etc/X11/XF86Config file as the Display driver and reboot?

Yanc is a test only install (sorry).

I am using the:


(But I don't recommend that ... it installs experimental software)
The X server doesn't start, it says that is can't load the nvidia kernel module. I have nvidia in my modules.preload file, it errors out durring boot up to. There has to be something else wrong that isn't letting me load the module. Is there so setting I would have to have in order to be able to load a .ko module?
After doing some checking, it seems that you must use the newest () ebuild with the NVIDIA drivers on new kernels....

So try this:

emerge sync

when completed, do this:

ACCEPT_KEYWORDS="~x86" emerge -uUp nvidia-kernel nvidia-glx nvoption

if it says it is going to install the 5336 drivers, then take out the pretend option and do the install:

ACCEPT_KEYWORDS="~x86" emerge -uU nvidia-kernel nvidia-glx nvoption

After doing this, whenever doing emerges, remember to use the -U option ... or else, it might try to DOWNGRADE your nvidia drivers in the future.
Ok, we are getting closer. It finally finished and I was able to load the nvidia module. So that was good. Problem is, now when I try to start X with the NVIDIA module I just get a black screen and the system locks up. I tried it without the Twinview options and its the same result.

You said that from now on I need to compile with the -U option, do I need to go back and recompile things with the U option to get it to work? I will probably just start redoing some stuff here, but still get back to me. Progress is being made, and that is good.
A good:

emerge sync


emerge -UuD world

might clear some things up....

So ... the kernel you are running has 8K stacks option and NVIDIA agpgart as a module?
The new version of NVIDIA driver is out and included in Gentoo.


emerge sync

ACCEPT_KEYWORDS="~x86" emerge -uU nvidia-kernel nvidia-glx nvoption

I had to re-compile my kernel to take out riva support, but I got it installed. I can load the nvidia module, but now my X server errors out. I think we actually have made good progress. I think now its just down to a problem with my XF86Config file because the error is the whole "Screens found, none with usable configuration" bit. So I am going to dink around with it for a wile, and than I will probably come back on later and through up the whole file. I dont asume there will be much action around here tonight but tomorrow there might be some.

Talk to you guys later.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.