What's the difference between two kernel version shown by ‘uname -a’?

1.9k Views Asked by At

I am using debian 9.4, the kernel version shown by uname -a is different, what's the actual kernel version? What does '4.9.82-1+deb9u3' mean?

Linux debian 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux

apt-get source linux can get the source code of current kernel, then I can get original kernel tar file and debian patch.

$ls     
linux-4.9.82                         linux_4.9.82-1+deb9u3.dsc
linux_4.9.82-1+deb9u3.debian.tar.xz  linux_4.9.82.orig.tar.xz 

linux_4.9.82-1+deb9u3.debian.tar.xz contains many files, what are them used for? how to patch the it to linux_4.9.82.orig.tar.xz ?

linux-4.9.82 is the kernel source folder outputted by apt-get source command, which can be compiled to vmlinux. However, I usually can't debug the crash dump files with the vmlinux, as 'crash' command gives the error message: mismatch version. Should I download kernel 4.9.0 from kernel.org instead of linux-4.9.82 to debug my current running kernel ?

1

There are 1 best solutions below

1
Giacomo Catenazzi On

You have the package version. The name is made by:

  • 4.9.82: the upstream version
  • -1: separator and Debian version of 4.9.82 upstream package. Note: if Debian is also upstream of a package, this field is skipped.
  • +deb9u3: this is a sort of micro-version. The +deb is used for security advisories, so minimal changes compared with 4.9.82-1. The 9 is the Debian version, and u3 is the third security version.

But kernels are different (compared with most of other packages): one could install many in parallel (but it will use only one). So in the package name you may have linux-image-4.9.0-3-amd64. In my system this package has version 4.9.30-2+deb9u1. So 4.9 is the kernel version. -amd64 is the architecture, this is the third major Debian version (-3) of 4.9(.0) series, which is based on 4.9.30.

the command uname will give you the kernel (as package name, so near the capability) in the field kernel-release and the package version (so exact reference to source) in the field kernel-version).

For the main question: I would use original kernel, and compile with upstream method (if I think the bug is kernel related, so it is easier to discuss with kernel maintainers), or I would use Debian sources (e.v. with patch), and build the kernel with Debian tools (and install the package to install the kernel), if I think the problem is in Debian, or just on old kernel versions.