Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get linux headers or source code for debian 8.0 kernel 3.16.0-4-amd64 ?

620 views
Skip to first unread message

Kiyanovski, Arthur

unread,
Dec 14, 2021, 11:20:05 AM12/14/21
to
Hi,

TL;DR - How do I get the Linux headers or source code for kernel 3.16.0-4-amd64 Debian 8.0?

What I tried and failed doing:
---------------------------------------
I have an AWS instance with kernel:
3.16.0-4-amd64

apt-cache search doesn’t find a relevant package.

I tried updating the etc/apt/sources.list file with the archive so it now looks like this:

deb http://cloudfront.debian.net/debian jessie main
deb-src http://cloudfront.debian.net/debian jessie main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://cloudfront.debian.net/debian jessie-updates main
deb-src http://cloudfront.debian.net/debian jessie-updates main
deb http://archive.debian.org/debian jessie main contrib non-free
deb-src http://archive.debian.org/debian jessie main contrib non-free

At first running apt-get update gave me an error
W: GPG error: http://archive.debian.org jessie Release: The following signatures were invalid: KEYEXPIRED 1587841717

Then I used the solution of going back in time described in https://www.reddit.com/r/debian/comments/g9is3p/debian_8_jessie_keyexpired_drive_my_crazy/:
date 010100002020; [apt-get update / upgrade / whatever]; ntpdate 2.pool.ntp.org

This stopped the GPG error but I still don’t see the headers package.

I tried getting the sources for the Linux-image package like this:
sudo apt-get source linux-image-3.16.0-4-amd64

But it got the sources for kernel linux-3.16.84 and not 3.16.0-4

Can you please help me? I need to make sure my code compiles on this kernel but I can't get its sources or headers ☹

Thanks!
Arthur

Christian Britz

unread,
Dec 14, 2021, 12:00:07 PM12/14/21
to
On 2021-12-14 17:00 UTC+0100, Kiyanovski, Arthur wrote:
> Hi,
>
> TL;DR - How do I get the Linux headers or source code for kernel 3.16.0-4-amd64 Debian 8.0?

Hi Arthur,

I don't find this kernel version on snapshots.debian.org. I assume that
AWS uses it's own kernel build which never was distributed by Debian.

Please issue the command uname -a. linux-3.16.84 might be really the
source for 3.16.0-4.

Regards,
Christian

deloptes

unread,
Dec 14, 2021, 12:10:04 PM12/14/21
to
Kiyanovski, Arthur wrote:

> But it got the sources for kernel linux-3.16.84 and not 3.16.0-4
>
> Can you please help me? I need to make sure my code compiles on this
> kernel but I can't get its sources or headers ☹

you sure you are not on ubuntu
https://howtoinstall.co/en/linux-headers-3.16.0-4-amd64

--
FCD6 3719 0FFB F1BF 38EA 4727 5348 5F1F DCFE BCB0

Thomas Schmitt

unread,
Dec 14, 2021, 12:20:04 PM12/14/21
to
Hi,

> How do I get the Linux headers or source code for kernel
> 3.16.0-4-amd64 Debian 8.0?

Are you sure that this is the version code which you should be looking for
if interested in source ?

According to my mail archives uname -a on a Debian 8.1 says:
Linux ts6 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64 GNU/Linux

The string "3.16.0-4" is found in the web for various different
"MP Debian 3.16...". But "3.16.7-ckt11-1" seems to be the actual source
version.

Debian 8.0 was released april 26th 2015.
This here is from april 23:

https://launchpad.net/debian/+source/linux/3.16.7-ckt9-3

This snapshot of april 28

https://snapshot.debian.org/archive/debian/20150428T040155Z/pool/main/l/linux/

offers:

linux-headers-3.16.0-4-all-arm64_3.16.7-ckt9-3_arm64.deb
linux-image-3.16.0-4-amd64_3.16.7-ckt9-3_amd64.deb
linux-source-3.16_3.16.7-ckt9-3_all.deb


Have a nice day :)

Thomas

Thomas Schmitt

unread,
Dec 14, 2021, 12:30:04 PM12/14/21
to
Hi,

i wrote:
> linux-headers-3.16.0-4-all-arm64_3.16.7-ckt9-3_arm64.deb

Wrong copy+paste. But there is an amd64 variant of it, too:
linux-headers-3.16.0-4-all-amd64_3.16.7-ckt9-3_amd64.deb

David

unread,
Dec 14, 2021, 6:40:06 PM12/14/21
to
On Wed, 15 Dec 2021 at 03:18, Kiyanovski, Arthur <aki...@amazon.com> wrote:

> TL;DR - How do I get the Linux headers or source code for kernel 3.16.0-4-amd64 Debian 8.0?

The version number of a Debian kernel package is not the same
thing as the version number of the kernel that it contains.

For example, here is what I see on the system I am running
here today:

$ dpkg -l | grep linux-image
ii linux-image-5.10.0-8-amd64 5.10.46-5
amd64 Linux 5.10 for 64-bit PCs (signed)
$ uname -r
5.10.0-8-amd64
$ uname -v
#1 SMP Debian 5.10.46-5 (2021-09-23)

So, to know your kernel version, you need to ask
the system for 'uname -v'.

And then you can use that to search for the
kernel source package here:
https://snapshot.debian.org/package/linux/
and then click on the link there to find the
binary package with the headers.

Kiyanovski, Arthur

unread,
Dec 15, 2021, 5:30:06 AM12/15/21
to
>-----Original Message-----
>From: Thomas Schmitt <scdb...@gmx.net>
>Sent: Tuesday, December 14, 2021 7:17 PM
>To: debia...@lists.debian.org
>Cc: Kiyanovski, Arthur <aki...@amazon.com>
>Subject: RE: [EXTERNAL] How to get linux headers or source code for debian
>8.0 kernel 3.16.0-4-amd64
>
>CAUTION: This email originated from outside of the organization. Do not click
>links or open attachments unless you can confirm the sender and know the
>content is safe.
>
>
>
>Hi,
>
>> How do I get the Linux headers or source code for kernel
>> 3.16.0-4-amd64 Debian 8.0?
>
>Are you sure that this is the version code which you should be looking for if
>interested in source ?
>
>According to my mail archives uname -a on a Debian 8.1 says:
> Linux ts6 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1 (2015-05-24) x86_64
>GNU/Linux
>
>The string "3.16.0-4" is found in the web for various different "MP Debian
>3.16...". But "3.16.7-ckt11-1" seems to be the actual source version.
>
>Debian 8.0 was released april 26th 2015.
>This here is from april 23:
>
> https://launchpad.net/debian/+source/linux/3.16.7-ckt9-3
>
>This snapshot of april 28
>
>
>https://snapshot.debian.org/archive/debian/20150428T040155Z/pool/main/l/
>linux/
>
>offers:
>
> linux-headers-3.16.0-4-all-arm64_3.16.7-ckt9-3_arm64.deb
> linux-image-3.16.0-4-amd64_3.16.7-ckt9-3_amd64.deb
> linux-source-3.16_3.16.7-ckt9-3_all.deb
>
>
>Have a nice day :)
>
>Thomas

Thanks guys! Your answers were really helpful!

Using uname -a /-v showed me that the actual kernel is 3.16.7-ckt9-2 (2015-04-13)

Thomas,
You found 3.16.7-ckt9-3 snapshot which is very close. But more importantly you showed me how to look into snapshots.
Thanks for showing me where inside the snapshot I should look for the deb files - would have never found it myself with all of these paths there 😊
Looking in the snapshots I found linux-headers-3.16.0-4-all-amd64_3.16.7-ckt9-2_amd64.deb in - http://snapshot.debian.org/archive/debian/20150413T093346Z/pool/main/l/linux/
Added the snapshot to my sources.list and was able to install the linux-headers-3.16.0-4-amd64 package.
With is was able to compile my driver and load it.

Thanks a lot!
Arthur





Thomas Schmitt

unread,
Dec 15, 2021, 5:50:04 AM12/15/21
to
Hi,

Kiyanovski, Arthur wrote:
> Thomas, You found 3.16.7-ckt9-3 snapshot which is very close.

Close, but no cigar.

Andrei POPESCU

unread,
Dec 18, 2021, 5:20:05 AM12/18/21
to
On Mi, 15 dec 21, 10:33:05, David wrote:
> On Wed, 15 Dec 2021 at 03:18, Kiyanovski, Arthur <aki...@amazon.com> wrote:
>
> > TL;DR - How do I get the Linux headers or source code for kernel 3.16.0-4-amd64 Debian 8.0?
>
> The version number of a Debian kernel package is not the same
> thing as the version number of the kernel that it contains.
>
> For example, here is what I see on the system I am running
> here today:
>
> $ dpkg -l | grep linux-image
> ii linux-image-5.10.0-8-amd64 5.10.46-5
> amd64 Linux 5.10 for 64-bit PCs (signed)
> $ uname -r
> 5.10.0-8-amd64
> $ uname -v
> #1 SMP Debian 5.10.46-5 (2021-09-23)
>
> So, to know your kernel version, you need to ask
> the system for 'uname -v'.

The same information is already provided by `dpkg -l` above ;)


When looking for Debian packages the version number provided by
`dpkg -l` or `apt list`, etc. should be used as it often doesn't match
the software's internal version.


$ neomutt -v | head -1
NeoMutt 20180716

$ apt list --installed neomutt
Listing... Done
neomutt/oldstable,now 20180716+dfsg.1-1+deb10u2 arm64 [installed]
N: There is 1 additional version. Please use the '-a' switch to see it


Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser
signature.asc
0 new messages