0

Is there a way to get the current version of the kernel for the Raspbian distribution, without installing it?

I don't really want only the number, I really would like a procedure to get it next year.

  • Why the entire kernel? Consider what can be done with the command "insmod". Read about it and, perhaps, re-word your question to make it clearer what you want to do. – st2000 Dec 1 '17 at 13:02
  • @st2000, thank you for you comment, I have reworded my question. Now it has nothing to do with modules – pim Dec 1 '17 at 13:17
  • @pim Do you want only the source code? – tlhIngan Dec 1 '17 at 19:07
  • @tlhIngan, I'm interested in the kernel release number, not the sources – pim Dec 2 '17 at 9:07
  • Ok, so you just want to know the kernel version of the current Raspbian distribution before installing it. @Millways 's answer should work. But I'll post a more generic way along with a few other places to look. – st2000 Dec 2 '17 at 15:07
2

Looking for a generic way to determine the kernel version with out installing / running the Raspbian image appears a bit of a challenge. (I'll gladly change this answer if someone comments with a better way.)

If you look at the Raspbian release notes, you will see an occasional entry regarding the kernel. Unfortunately seldom is the kernel version included.

If you look at the Raspbian wikipedia page, you will find a table of release dates, Debian versions names and kernel versions. This page spans years of Raspbian distributions and (currently) only lags the available download images by about 3 months.

And (as @Milliways points out) you can download the *.info file for the distribution you are interested in. Start in this directory:

https://downloads.raspberrypi.org/raspbian/images/

...then drill down into the release of interest, download the file ending in .info and search for "Linux version". Here is the entry from the newest Raspbian distribution:

Uname string: Linux version 4.9.59-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1047 SMP Sun Oct 29 12:19:23 GMT 2017
3

https://downloads.raspberrypi.org/raspbian/images/raspbian-2017-12-01/2017-11-29-raspbian-stretch.info contains details of the "latest", including kernel version.

The parent directories have all versions, so you would have to select the latest.

  • Your answer clarified the question... Now I get it. – RubberStamp Dec 2 '17 at 1:37
  • I voted up this one, since this is what I'm asking, but is there a way to know if there is a kernel update, like packages.debian.org or packages.ubuntu.org? And I will accept it in some days if there is no better anwer ;) – pim Dec 2 '17 at 9:05
  • You could do apt update and check if raspberrypi-kernel is listed - this was not the question you asked. – Milliways Dec 2 '17 at 10:47
  • still the same thing, how will I apt update without installing? – pim Dec 2 '17 at 20:24
  • update DOES NOT install anything, merely update the list of installation candidates. This question is a moving target - you should edit additional detail into the question. You haven't even explained what utility there is in knowing the magic number of the latest supported kernel. – Milliways Dec 2 '17 at 22:16
0

Get the Packages file for the raspbian distribution, for jessie:

wget http://archive.raspberrypi.org/debian/dists/jessie/main/binary-armhf/Packages

Get the raspberrypi-kernel package version :

cat Packages | grep raspberrypi-kernel_

Result :

Filename: pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20170703-1_armhf.deb

The interesting part is 1.20170703-1, this number can be found on the Rasperry PI's kernel page on gitub and search for the this release number. This will show :

Merge remote-tracking branch 'stable/linux-4.9.y' into rpi-4.9.y

In this case the kernel is 4.9.

  • the '1.20170703-1' piece of information can be retrieved as easy like this: 'apt-cache show raspberrypi-kernel-headers' – sparkie Dec 4 '17 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.