# nvidia-kernel and MTRR

## waldosr

While trying to emerge nvidia-kernel I get the following error:

>>> emerge (2 of 2) media-video/nvidia-kernel-1.0.5336-r4 to /

>>> md5 src_uri  :Wink:  NVIDIA-Linux-x86-1.0-5336-pkg1.run

 * This version needs MTRR support for most chipsets!

 * Please enable MTRR support in your kernel config, found at:

 *

 *   Processor type and features -> [*] MTRR (Memory Type Range Register) support

 *

 * and recompile your kernel ...

!!! ERROR: media-video/nvidia-kernel-1.0.5336-r4 failed.

!!! Function mtrr_check, Line 36, Exitcode 0

!!! MTRR support not detected!

I have setup MTRR in the kernel.  What am I doing wrong?

----------

## NeddySeagoon

waldosr,

The nvidia driver builds against your running kernel so after fixing the mttr support you need to build and run the kernel before nvidia-kernel will build. 

1.0.5336 is at least two versions out of date too.

----------

## waldosr

After attempting to rebuild my kernel it still boots up with the old kernel.  I have been trying to use the instalation instructions but when I go to copy the file it says the directory is not there.

----------

## NeddySeagoon

waldosr,

The copy command is

```
cp arch/i386/boot/bzImage /boot/<SomeUsefulName>
```

The capital I in bzImage is important.

Remember to mount /boot before you do the copy.

<SomeUsefulName> must match exactly in grub.conf.

----------

## waldosr

tux / # mount /boot

mount: special device /dev/BOOT does not exist

Any ideas?

----------

## soupus

 *waldosr wrote:*   

> tux / # mount /boot
> 
> mount: special device /dev/BOOT does not exist
> 
> Any ideas?

 

Yeah, try 

mount /dev/hda1 /boot

But change hda1 to whatever partition has your boot drive

----------

## waldosr

It looked like it mounted fine but I still get this error:

tux / # cp arch/i386/boot/bzImage /boot/kernel-2.4.20-gaming-r11

cp: cannot stat `arch/i386/boot/bzImage': No such file or directory

----------

## papal_authority

Well you have to be in /usr/src/linux and if you use lilo, you'll need to re-run it. I just did this upgrade yesterday myself  :Very Happy: 

----------

## waldosr

still get the same error in that directory

----------

## Gandalf the White

You did of course actually build the kernel after you finished configuring? I.e., while in /usr/src/linux you issued 

```
make dep && make bzImage modules modules_install
```

???

----------

## waldosr

I noticed this at the of make dep.  Could this cause any problems?  If so what do I need to remove from the kernel?

sched.c:461:1: warning: "/*" within comment

sched.c: In function `set_cpus_allowed':

sched.c:1465: error: structure has no member named `cpus_runnable'

sched.c:1468: error: structure has no member named `processor'

sched.c:1475: error: structure has no member named `cpus_runnable'

sched.c: At top level:

sched.c:2122: error: redefinition of `set_cpus_allowed'

sched.c:1454: error: `set_cpus_allowed' previously defined here

make[2]: *** [sched.o] Error 1

make[2]: Leaving directory `/usr/src/linux-2.4.20-gaming-r11/kernel'

make[1]: *** [first_rule] Error 2

make[1]: Leaving directory `/usr/src/linux-2.4.20-gaming-r11/kernel'

make: *** [_dir_kernel] Error 2

tux linux #

----------

## Artherio

does /usr/src/linux point to your current source tree?  Here are the exact steps you need to follow:

```

1. cd /usr/src/

2. ls -l

3. make sure linux is pointing to current source

4. if it is, goto step 5, if it isn't then

a) rm linux

b) ln -s path-to-current-source linux

5. cd linux

6. make && make modules_install (if you are running a 2.6.* kernel)

7. mount /boot

8. cp arch/i386/boot/bzImage /boot/name-of-kernel

9. nano -w /boot/grub/grub.conf

10.  edit grub to point to new kernel, exit and save

11. umount /boot

12. restart
```

----------

## NeddySeagoon

waldosr,

Any errors are terminal to the build. Warnings may be  ignored.

It looks like you are building a SMP kernel and have some bits not configured that SMP needs.

If you dont need SMP turn it off.

----------

## waldosr

I don't have a problem until I get to step 7.

 *Quote:*   

> 
> 
> ```
> 
> 5. cd linux
> ...

 

----------

## NeddySeagoon

waldosr,

Your /etc/fstab isn't set up

You are supposed to change the words BOOT and ROOT to be the partition names lile hda1 or whatever you used.

Also fix the filesystem types. You are probably not using the defualt xfs

Until you fix /etc/fstab you will need to use the long form of mount

mount /dev/hd?? /mnt/boot -t <fstype>

Fill in the ?? and <fstype> to suit your install

----------

## waldosr

Ok my fstab was screwed up.  I can mount /boot now but when I tryto cp it still kicks back an error.  Any ideas?

----------

## Gandalf the White

Well, what is the error?

----------

## waldosr

```

bash-2.05b# mount /boot

bash-2.05b# cp arch/i386/boot/bzImage /boot/kernel-2.4.20-gaming-r11

cp: cannot stat `arch/i386/boot/bzImage': No such file or directory

bash-2.05b#

```

----------

## Gandalf the White

Yay! And we're right back where we started  :Laughing:  How did you build your kernel? You are using a 2.4 series kernel, so make && make modules_install will not work to compile your kernel. As I said before, you need to use 

```
make dep && make bzImage modules modules_install
```

----------

## waldosr

yes that is how I compiled it

----------

## Artherio

what does 

```
ls /usr/src/linux/arch/i386/boot
```

show?

----------

## waldosr

No such directory

----------

## Artherio

When you compile the kernel, does it complete successfully or error out?

----------

## waldosr

Now that I figured out that the gaming kernel won't work I emerged the vanilla-sources.  It copied and every thing and i did:

```

ls /usr/src/linux/arch/i386/boot

```

Then I get:

```

bash-2.05b# ls /usr/src/linux/arch/i386/boot/

Makefile   bbootsect.o  bootsect.S  bsetup.o  bzImage     install.sh  tools

bbootsect  bbootsect.s  bsetup      bsetup.s  compressed  setup.S     video.S

bash-2.05b#

```

Am i using the vanilla or how can I tell?

----------

## Gandalf the White

To tell which kernel version you are using you need to look at where the linux symlink points to in /usr/src. First, cd to /usr/src, and then 

```
ls -l
```

 should show where the linux symlink is pointing to.  If it isn't pointing to the vanilla sources directory, then:

```
cd /usr/src

rm linux

ln -s /usr/src/vanillasources /usr/src/linux

```

----------

## waldosr

Ok thanks for everyones help.  Between me being an idiot and that damn gaming kernel not working I was completely confused.  Thanks for everything it is working now.

----------

