7

I am running

apt-get source linux-image-4.15.0-60-generic

and get

Picking 'linux-signed-hwe' as source package instead of 'linux-image-4.15.0-60-generic'

And I don't get the real source code. Why does this happen and how do I get the real source?

pilot6@Pilot6:~$ apt-cache showsrc linux-signed-hwe
Package: linux-signed-hwe
Format: 3.0 (native)
Binary: linux-image-4.15.0-60-generic, linux-image-4.15.0-60-lowlatency, kernel-signed-image-4.15.0-60-generic-di, linux-image-4.15.0-60-generic-dbgsym, linux-image-4.15.0-60-lowlatency-dbgsym
Architecture: amd64 ppc64el
Version: 4.15.0-60.67~16.04.1
Priority: optional
Section: utils
Maintainer: Canonical Kernel Team <[email protected]>
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9), lsb-release, python3, python3-apt, sbsigntool [amd64], linux-headers-4.15.0-60-generic (>= 4.15.0-60.67~16.04.1)
Directory: pool/main/l/linux-signed-hwe
Package-List:
 kernel-signed-image-4.15.0-60-generic-di udeb debian-installer extra arch=amd64,ppc64el
 linux-image-4.15.0-60-generic deb kernel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-generic-dbgsym deb devel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-lowlatency deb kernel optional arch=amd64
 linux-image-4.15.0-60-lowlatency-dbgsym deb devel optional arch=amd64
Files:
 d17babc710762248deb90096e5ac6ce8 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 21c183f3c7033bc442f3153cb5b15161 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha1:
 84f7c9f9de4635d50dd9f18e4bcfd269169b6eaf 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 1bde8d27dedba104b8d9c193e39b3fb642d62004 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha256:
 61bb3466b3d4f9fbab4894997ee539a0ccfe3ff0990478b1825a17a59851eabb 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 5ea5107afd5ae63430a5211c666362293d32ae75a5840cfb0e5549e5ce0326ad 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz

pilot6@Pilot6:~$ apt-cache showsrc linux-image-4.15.0-60-generic
Package: linux-signed-hwe
Format: 3.0 (native)
Binary: linux-image-4.15.0-60-generic, linux-image-4.15.0-60-lowlatency, kernel-signed-image-4.15.0-60-generic-di, linux-image-4.15.0-60-generic-dbgsym, linux-image-4.15.0-60-lowlatency-dbgsym
Architecture: amd64 ppc64el
Version: 4.15.0-60.67~16.04.1
Priority: optional
Section: utils
Maintainer: Canonical Kernel Team <[email protected]>
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9), lsb-release, python3, python3-apt, sbsigntool [amd64], linux-headers-4.15.0-60-generic (>= 4.15.0-60.67~16.04.1)
Directory: pool/main/l/linux-signed-hwe
Package-List:
 kernel-signed-image-4.15.0-60-generic-di udeb debian-installer extra arch=amd64,ppc64el
 linux-image-4.15.0-60-generic deb kernel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-generic-dbgsym deb devel optional arch=amd64,ppc64el
 linux-image-4.15.0-60-lowlatency deb kernel optional arch=amd64
 linux-image-4.15.0-60-lowlatency-dbgsym deb devel optional arch=amd64
Files:
 d17babc710762248deb90096e5ac6ce8 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 21c183f3c7033bc442f3153cb5b15161 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha1:
 84f7c9f9de4635d50dd9f18e4bcfd269169b6eaf 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 1bde8d27dedba104b8d9c193e39b3fb642d62004 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz
Checksums-Sha256:
 61bb3466b3d4f9fbab4894997ee539a0ccfe3ff0990478b1825a17a59851eabb 1829 linux-signed-hwe_4.15.0-60.67~16.04.1.dsc
 5ea5107afd5ae63430a5211c666362293d32ae75a5840cfb0e5549e5ce0326ad 10728 linux-signed-hwe_4.15.0-60.67~16.04.1.tar.xz

pilot6@Pilot6:~$ grep deb /etc/apt/sources.list
deb http://ru.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial universe
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://ru.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-security main restricted
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-security main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-security universe
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-security universe
deb http://ru.archive.ubuntu.com/ubuntu/ xenial-security multiverse
deb-src http://ru.archive.ubuntu.com/ubuntu/ xenial-security multiverse
deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
6
  • apt-cache showsrc linux-signed-hwe also apt-cache showsrc linux-image-4.15.0-60-generic and grep deb /etc/apt/sources.list
    – nobody
    Sep 7, 2019 at 10:25
  • And how do i get the source code?
    – Pilot6
    Sep 7, 2019 at 10:28
  • it would be nice to see the output from my commands. Particular from your sources.
    – nobody
    Sep 7, 2019 at 10:36
  • Oh, sure. I thought it was obvious that showsrc points to linux-signed-hwe. One sec.
    – Pilot6
    Sep 7, 2019 at 10:38
  • 1
    @fkraiem The source code of linux kernel from which linux-image-4.15.0-60-generic was built.
    – Pilot6
    Sep 7, 2019 at 11:47

1 Answer 1

13

I found the solution. Before

apt-get source linux-image-$(uname -r)

downloaded sources of the current kernel. But since the kernel got signed by Canonical, it stopped as mentioned in the question.

Now we download kernel source by

apt-get source linux-image-unsigned-$(uname -r)

Source

Note: To be able to download package sources by apt, you need to enable sources in "Software & Updates" application. It is disabled by default.

3
  • I get the same error with -unsigned: apt-get source linux-image-unsigned-$(uname -r) Lecture des listes de paquets... Fait Choix de « linux-hwe-5.8 » comme paquet source à la place de « linux-image-unsigned-5.8.0-25-lowlatency » E: Impossible de trouver une source de paquet pour linux-hwe-5.8
    – BiAiB
    Nov 15, 2020 at 15:31
  • 1
    Enable sources in Software & Updates application.
    – Pilot6
    Nov 15, 2020 at 15:33
  • awesome, it works !
    – BiAiB
    Nov 15, 2020 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .