So you were directed to this URL by a bot from irc.freenode.net more than likely. Chances are, you were sent here because you got errors when trying to install something that needs the kernel-source package. If you got an error, it's more than likely you got the error because your kernel-source package does not exactly match your running kernel. Below I will explain what you need to do to fix this problem by showing some examples and commands.

First you need to verify your running kernel with the following command:

uname -r

Then you need to verify your installed kernel-source package with the following command:

rpm -qa | grep kernel-source

If they match exactly they will look like the example below:

kernel-2.6.17.6mdv-1-1mdv2007.0
kernel-source-2.6.17.6mdv-1-1mdv2007.0

Notice they both have .6mdv which is usually where things don't match. Most users will have something similar to the following:

kernel-2.6.17.5mdv-1-1mdv2007.0
kernel-source-2.6.17.6mdv-1-1mdv2007.0

Notice the running kernel is the .5mdv kernel, and the kernel-source package is the .6mdv package. These do NOT match and will not work when trying to install/compile modules, such as nvidia drivers, or the ATI drivers.

If you have a newer kernel-source package than your running kernel, you can do one of two things. You can either update your kernel to the matching kernel-source and reboot to the new kernel or you can downgrade to the older kernel-source package. I will show you how to accomplish both fairly simple.

Upgrading to a new kernel

Let's see exactly what the name of the kernel is so you can install it. The easiest and quickest way to do this is to do the following command:

urpmq -y kernel

This will usually output quite a long list. Below is a short list of what I get currently from running that command:

kernel-2.6.17.5mdv kernel-2.6.17.6mdv kernel-doc-2.6.17.5mdv kernel-enterprise-2.6.17.5mdv kernel-enterprise-2.6.17.6mdv kernel-legacy-2.6.17.5mdv kernel-legacy-2.6.17.6mdv kernel-linus-2.6.18.2-1mdv kernel-linus-2.6.18.3-1mdv kernel-linus-2.6.18.rc7.1mdv kernel-linus-doc-2.6.18.2-1mdv kernel-linus-doc-2.6.18.3-1mdv kernel-linus-doc-2.6.18.rc7.1mdv kernel-linus-smp-2.6.18.2-1mdv kernel-linus-smp-2.6.18.3-1mdv kernel-linus-smp-2.6.18.rc7.1mdv kernel-linus-source-2.6.18.2-1mdv kernel-linus-source-2.6.18.3-1mdv kernel-linus-source-2.6.18.rc7.1mdv kernel-linus-source-stripped-2.6.18.2-1mdv kernel-linus-source-stripped-2.6.18.3-1mdv kernel-linus-source-stripped-2.6.18.rc7.1mdv kernel-multimedia-desktop-2.6.17.13-3mdv kernel-multimedia-desktop-latest kernel-multimedia-desktop-smp-2.6.17.13-3mdv kernel-multimedia-desktop-smp-latest kernel-multimedia-laptop-2.6.17.13-3mdv kernel-multimedia-laptop-latest kernel-multimedia-laptop-smp-2.6.17.13-3mdv kernel-multimedia-laptop-smp-latest kernel-multimedia-source-2.6.17.13-3mdv kernel-multimedia-source-latest kernel-multimedia-source-stripped-2.6.17.13-3mdv kernel-multimedia-source-stripped-latest kernel-source-2.6.17.5mdv kernel-source-2.6.17.6mdv kernel-source-stripped-2.6.17.5mdv kernel-source-stripped-2.6.17.6mdv kernel-tmb-desktop-2.6.17.13-4mdv kernel-tmb-desktop-latest kernel-tmb-desktop-smp-2.6.17.13-4mdv kernel-tmb-desktop-smp-latest kernel-tmb-desktop586-2.6.17.13-4mdv kernel-tmb-desktop586-latest kernel-tmb-desktop586-smp-2.6.17.13-4mdv kernel-tmb-desktop586-smp-latest kernel-tmb-server-2.6.17.13-4mdv kernel-tmb-server-latest kernel-tmb-server-smp-2.6.17.13-4mdv kernel-tmb-server-smp-latest kernel-tmb-source-2.6.17.13-4mdv kernel-tmb-source-latest kernel-tmb-source-stripped-2.6.17.13-4mdv kernel-tmb-source-stripped-latest

Since I'm using a processor that supports HT(HyperThreading) I can install and run the standard kernel. To do this I will install the latest version available with the following command:

urpmi kernel-2.6.17.6mdv

This will install the kernel for me and then run the command lilo when its done installing to verify there are no errors and that it's been added to my lilo menu for when I reboot. Then I simply reboot to the new kernel.

Since that is the latest and most up to date kernel on the assigned mirrors, installing the kernel-source package will be easy.

Downgrading the kernel-source

If you would prefer to keep the current kernel that you have running and downgrade your kernel-source you can certainly do that. What you have to do first is remove the current kernel-source package that is installed. To do that, perform the following command:

urpme kernel-source-2.6.17.6mdv-1-1mdv2007.0.i586

To find the kernel-source package you need to match your running, you will need to search somewhere like Pbone.net or something similar that hosts all kinds of rpms. You just have to make sure that it matches your running kernel exactly as stated above.

A direct link to the .5mdv kernel-source package is here: Kernel-Source Package Download

You can install the default kernel-source package that came with Mandriva by doing the following commands:

urpme kernel-source-2.6.17.6mdv-1-1mdv2007.0.i586
urpmi --media main kernel-source-2.6.17.5mdv

Once you have a matching kernel and kernel-source then you shouldn't have any further issues trying to install such things like the nvidia drivers or the ATI drivers.

If you are still having problems or don't fully understand this how-to or parts of it, please feel free to join us on irc.freenode.net in the #LFD channel for further assistance on getting a matching kernel and kernel-source package.