# Where are kernel sources ?

**URL:** <https://forums.suse.com/t/where-are-kernel-sources/29580>\
**Category:** SLES Configure-Administer\
**Created:** [March 26, 2017, 10:02am UTC](https://forums.suse.com/t/where-are-kernel-sources/29580 "2017-03-26T10:02:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilansch](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@ilansch](https://forums.suse.com/u/ilansch)\
**Post date:** [March 26, 2017, 10:02am UTC](https://forums.suse.com/t/where-are-kernel-sources/29580/1 "2017-03-26T10:02:56Z")

</div>

Hi all,  
I am compiling my kernel driver on top of SLES12 X86-64 3.12.28-4 (more at the bottom).  
I am using #include in my source code for couple of .h files that located in btrfs filesystem folder.  
for this i need kernel sources…

Where do I find the kernel source package ? I saw  
[http://kernel.opensuse.org/packages/SLE12](http://kernel.opensuse.org/packages/SLE12)  
and [http://download.opensuse.org/repositories/Kernel:/SLE12/](http://download.opensuse.org/repositories/Kernel:/SLE12/) is empty ☹

and when i want to search the package with: “zypper search kernel”  
I get:  
Refreshing service ‘SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64’.  
Problem retrieving the repository index file for service ‘SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64’:  
Download (curl) error for ‘[https://scc.suse.com/access/services/1106/repo/repoindex.xml?cookies=0&credentials=SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64](https://scc.suse.com/access/services/1106/repo/repoindex.xml?cookies=0&credentials=SUSE_Linux_Enterprise_Server_12_x86_64)’:  
Error code: Connection failed  
Error message: Failed to connect to [scc.suse.com](http://scc.suse.com) port 443: Connection refused

Where do i download the package for kernel source ?

Linux SLES12X86-64 3.12.28-4-default  
SLES12X86-64:/home/builder # cat /etc/\*release  
SUSE Linux Enterprise Server 12 (x86\_64)  
VERSION = 12  
PATCHLEVEL = 0

# This file is deprecated and will be removed in a future service pack or release.

# Please check /etc/os-release for details about this release.

NAME=“SLES”  
VERSION=“12”  
VERSION\_ID=“12”  
PRETTY\_NAME=“SUSE Linux Enterprise Server 12”  
ID=“sles”  
ANSI\_COLOR=“0;32”  
CPE\_NAME=“cpe:/o:suse:sles:12”

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [March 26, 2017, 11:50pm UTC](https://forums.suse.com/t/where-are-kernel-sources/29580/2 "2017-03-26T23:50:56Z")

</div>

Hi.

Am 26.03.2017 um 09:04 schrieb ilansch:[color=blue]

> and when i want to search the package with: “zypper search kernel”  
> I get:  
> Refreshing service ‘SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64’.  
> Problem retrieving the repository index file for service  
> ‘SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64’:  
> Download (curl) error for  
> ‘[https://scc.suse.com/access/services/1106/repo/repoindex.xml?cookies=0&credentials=SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64](https://scc.suse.com/access/services/1106/repo/repoindex.xml?cookies=0&credentials=SUSE_Linux_Enterprise_Server_12_x86_64)’:  
> Error code: Connection failed  
> Error message: Failed to connect to [scc.suse.com](http://scc.suse.com) port 443: Connection  
> refused[/color]

I recommend you fix this. While there are other ways, getting the  
matching sources vie the online repos is the easiest and proper way. Not  
to mention it also seems you should be able to pacth your system once in  
a while. 😉

## CU,

Massimo Rosen  
Micro Focus Knowledge Partner  
No emails please!  
[http://www.cfc-it.de](http://www.cfc-it.de)

---

<div class="post-metadata">

**Author:** ![ilansch](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@ilansch](https://forums.suse.com/u/ilansch)\
**Post date:** [March 27, 2017, 8:38am UTC](https://forums.suse.com/t/where-are-kernel-sources/29580/3 "2017-03-27T08:38:24Z")

</div>

Hi,

I am working on it, I solved the 443 issue (SSL FW permissions) and now I re-subscribe my partnership.  
This specific machine is used only to compile my kernel driver.  
It is not the used to something else - just for compilation and then the driver is used on other places (customers)

Where are the online repos that contains the kernel sources ? are they in suse site ?

Thanks

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [March 27, 2017, 1:21pm UTC](https://forums.suse.com/t/where-are-kernel-sources/29580/4 "2017-03-27T13:21:11Z")

</div>

On 27/03/17 06:44, ilansch wrote:  
[color=blue]

> I am working on it, I solved the 443 issue (SSL FW permissions) and now  
> I re-subscribe my partnership.  
> This specific machine is used only to compile my kernel driver.  
> It is not the used to something else - just for compilation and then the  
> driver is used on other places (customers)
> 
> Where are the online repos that contains the kernel sources ? are they  
> in suse site ?[/color]

Source packages exist in the same repository which contains the compiled  
package.

If you are looking for a source package you can use “zypper search -t  
srcpackage ” i.e. “zypper search -t srcpackage kernel”.

If you then want to install it use “zypper install -t srcpackage ”.

## HTH.

Simon  
SUSE Knowledge Partner

* * *

## If you find this post helpful and are logged into the web interface, please show your appreciation and click on the star below. Thanks.

---

<div class="post-metadata">

**Author:** ![ilansch](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@ilansch](https://forums.suse.com/u/ilansch)\
**Post date:** [March 27, 2017, 2:41pm UTC](https://forums.suse.com/t/where-are-kernel-sources/29580/5 "2017-03-27T14:41:39Z")

</div>

Hi,  
When trying to run the zypper search, I receive the following:  
SLES12X86-64:~ # zypper search -t srcpackage kernel  
Refreshing service ‘SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64’.  
Permission to access ‘[https://updates.suse.com/SUSE/Products/SLE-SERVER/12/x86\_64/product\_debug/repodata/repomd.xml?c5dbgsODQ-Pe\_bnW\_ntVpx16WdgRkOQrclnrZmB8xHE6R6R8snpHmvl1NExGUpy-DcMeLdzk3S0N-LihkGpANmPAq\_xJ0-66jGCDe8Q7musVyT3T4SGAX2pPsZCt383za6vUtNRuNg5UfKAzbGo8](https://updates.suse.com/SUSE/Products/SLE-SERVER/12/x86_64/product_debug/repodata/repomd.xml?c5dbgsODQ-Pe_bnW_ntVpx16WdgRkOQrclnrZmB8xHE6R6R8snpHmvl1NExGUpy-DcMeLdzk3S0N-LihkGpANmPAq_xJ0-66jGCDe8Q7musVyT3T4SGAX2pPsZCt383za6vUtNRuNg5UfKAzbGo8)’ denied.

Abort, retry, ignore? [a/r/i/? shows all options] (a):

Why is that ?

---

<div class="post-metadata">

**Author:** ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)\
**Post date:** [March 27, 2017, 4:55pm UTC](https://forums.suse.com/t/where-are-kernel-sources/29580/6 "2017-03-27T16:55:30Z")

</div>

On 27/03/17 12:44, ilansch wrote:  
[color=blue]

> When trying to run the zypper search, I receive the following:  
> SLES12X86-64:~ # zypper search -t srcpackage kernel  
> Refreshing service ‘SUSE\_Linux\_Enterprise\_Server\_12\_x86\_64’.  
> Permission to access  
> ‘[https://updates.suse.com/SUSE/Products/SLE-SERVER/12/x86\_64/product\_debug/repodata/repomd.xml?c5dbgsODQ-Pe\_bnW\_ntVpx16WdgRkOQrclnrZmB8xHE6R6R8snpHmvl1NExGUpy-DcMeLdzk3S0N-LihkGpANmPAq\_xJ0-66jGCDe8Q7musVyT3T4SGAX2pPsZCt383za6vUtNRuNg5UfKAzbGo8](https://updates.suse.com/SUSE/Products/SLE-SERVER/12/x86_64/product_debug/repodata/repomd.xml?c5dbgsODQ-Pe_bnW_ntVpx16WdgRkOQrclnrZmB8xHE6R6R8snpHmvl1NExGUpy-DcMeLdzk3S0N-LihkGpANmPAq_xJ0-66jGCDe8Q7musVyT3T4SGAX2pPsZCt383za6vUtNRuNg5UfKAzbGo8)’  
> denied.
> 
> Abort, retry, ignore? [a/r/i/? shows all options] (a):[/color]

There can be a few reasons either at your end or SUSE’s.

Is your server registered with SUSE Customer Center (SCC) or a local  
SUSE Manager/SMT server?

Which repositories does your server have configured? What is the output  
from “zypper lr -u”

You should be aware that general support for SLES12 (SP0) ended in June  
2016 and ends in May (2017) for SP1 with the current and latest release  
being SP2.

Given your earlier curl error I suspect it’s a server issue.

## HTH.

Simon  
SUSE Knowledge Partner

* * *

## If you find this post helpful and are logged into the web interface, please show your appreciation and click on the star below. Thanks.

---

<div class="post-metadata">

**Author:** ![schwarts1984](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@schwarts1984](https://forums.suse.com/u/schwarts1984)\
**Post date:** [November 21, 2017, 9:30am UTC](https://forums.suse.com/t/where-are-kernel-sources/29580/7 "2017-11-21T09:30:56Z")

</div>

Hi,  
output of repository is:  
1 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | SUSE-Linux-Enterprise-Server-11-SP4 11.4.4-1.109 | Yes | No | cd:///?devices=/dev/sr0

Anyway, i have successfully downloaded the packages manually via the website - via the patches url - kernel security patches…

But isnt there a possibility to add a repository of old kernels and install via there ? like there is in other distros

thanks
