Kernel source?


New to SuSE, but not Linux. Trying to install the source for, but YAST only has a different kernel version. Try downloading Kernel rpm in the hope that would help, but am getting into dependency hell.

Anyone able to help with which repository would solve this please?


In YaST Software Management, if you select View > Versions You will find kernel files on the installation media or the distribution (11.4) OSS repository. However there have been security updates since then, and you should have performed an on-line update to get the latest patches. By default YaST will suggest the latest parched version of the 2.6.37 kernel. Unless you have a special reason you should allow YaST to update the kernel to and install the corresponding source package. Mostly for compiling kernel modules you need the kernel-devel packages rather than or as well as the kernel-source package.

Normally to compile a kernel source file you should consider doing the following:

Open YaST / Software / Software Management - Select the View Button on the top left and pick Patterns. Now, you will see several Patterns listed and you want to select:

[X] Base Development 
[X] Linux Kernel Development 
[X] C/C++ Development 

Then Press the Accept button on the bottom right and allow these applications to install.

The present kernel is up to and there should be no reason to not install this kernel version. If you want to maintain multiple kernel versions then:

Yes, it is possible to keep both your old and new kernels. You need to change how YaST Software Management works with kernel updates, to allow you to maintain both the old kernel and the newer kernel.

edit the file /etc/zypp/zypp.conf as root to say:
    ## Packages which can be installed in different versions at the same time.
    ## Packages are selected either by name, or by provides. In the later case
    ## the string must start with "provides:" immediately followed by the capability.
    ## Example:
    ##    kernel                - just packages whith name 'kernel'
    ##    provides:multiversion(kernel)   - all packages providing 'multiversion(kernel)'
    ##                      (kenel and kmp packages should do this)
    ## Valid values:
    ##    Comma separated list of packages.
    ## Default value:
    ##    empty
    multiversion = provides:multiversion(kernel)

Just remove the comment symbol # from the front of the line that says multiversion = provides:multiversion(kernel) save the file and reboot.

In KDE, run the menu Run Command:

kdesu kwrite /etc/zypp/zypp.conf 

in Gnome you would use:

gnomesu gedit /etc/zypp/zypp.conf

Following these two steps should allow you to have the sources and keep more than one kernel version if you need to do that.

Thank You,