[Bug 1553121] Re: Xenial preseed fails to load key for 3rd party repo with apt-setup/local0/key

Lars Kollstedt lk at man-da.de
Mon May 2 16:13:37 UTC 2016

Hi all,

first thanks to ~juliank, this lead me to an workaround for this in my

In our case netboot install failed with a "no suitable kernel found with
your apt settings" (message text written down from memory), when our
internal software repository was included to bootstrap our deployment

Switching from the ncurses-installer to a shell showed up, that
/target/etc/apt/sources.list contains only a invalid placeholder for the
main repository, when this error occurs. From my memory this was
xenial.invalid but might also have been debootstrap.invalid.

Replacing the signing key by one with SHA-2-256 solved this, then I stumbled into Bug #1512347 which was already mentioned above. 
That IMHO means Bug #1553121 is definitely a SHA-1 issue. Because first I missed the lines 
| personal-digest-preferences SHA256
| cert-digest-algo SHA256
| default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
in ~/.gnupg/gpg.conf (on a Machine with Ubuntu 12.04 LTS (precise)) and created key signed with SHA-1 again (as visible with pgpdump).
With this mistake the error still occurs. ;-)

As far as I know ~anders-kaseorg should be right in Bug #1556666. The
keys are statically imported to the trusted-Keychain. The SHA-1 o
signature isn't used for any verification in any apt mechanisms I know.
For this reason the warning in the output of apt-get update should be
more than enough.

IMHO this should at least be catched with a propper error message.

I didn't find the lines causing this, yet. The gpgv calls in the
debootstrap Package file functions should work, at least from the output
on a fully installed xenial system. Another place doing similar stuff I
haven't found.

The SHA1 warnings/errors also affects the repositories on
http://downloads.linux.hp.com, but they don't offically support Ubuntu
16.4 LTS (xenial), yet.

Kind regards

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-installer in Ubuntu.

  Xenial preseed fails to load key for 3rd party repo with apt-

Status in apt-setup package in Ubuntu:
Status in base-installer package in Ubuntu:

Bug description:
  I have an automated preseed installation that uses these lines to add
  custom repos during the installation:

  d-i apt-setup/local0/repository string deb http://jschule.github.io/ubuntu/ /
  d-i apt-setup/local0/comment string JTS local repository
  d-i apt-setup/local0/source boolean false
  d-i apt-setup/local0/key string http://jschule.github.io/ubuntu/repo.key

  d-i apt-setup/local1/repository string deb http://dl.google.com/linux/chrome/deb/ stable main
  d-i apt-setup/local1/comment string Google Chrome Browser
  d-i apt-setup/local1/source boolean false
  d-i apt-setup/local1/key string http://dl.google.com/linux/linux_signing_key.pub

  for complete preseed file that causes the problem).

  In xenial the installation fails because the GPG key for the local0
  repo is not loaded into the system so that it can be used (see
  screenshot). Strangely, "chroot /target apt-key list" shows the key
  9E62229E to be installed.

  Just to be sure that there is no problem with my repo and key I
  started the Xenial live CD and installed my repo there manually. All
  works well. IMHO this shows that the problem is clearly related to the
  automated installation with preseed.

  Maybe this is related to #1512347, that was the only thing I could
  find on Launchpad that is in the same area.

  If you want to reproduce this then you can checkout the scripts from
  https://github.com/jschule/ubuntu/tree/gh-pages/qemu and run "./run.sh
  xenial" to start my installation.

  I found a very ugly workaround by changing the apt-setup lines to

  d-i apt-setup/local0/repository string deb http://archive.canonical.com/ubuntu trusty partner
  d-i apt-setup/local0/source boolean false

  d-i apt-setup/local1/repository string deb http://jschule.github.io/ubuntu/ /
  d-i apt-setup/local1/comment string JTS local repository
  d-i apt-setup/local1/source boolean false
  d-i apt-setup/local1/key string http://jschule.github.io/ubuntu/repo.key

  d-i apt-setup/local2/repository string deb http://dl.google.com/linux/chrome/deb/ stable main
  d-i apt-setup/local2/comment string Google Chrome Browser
  d-i apt-setup/local2/source boolean false
  d-i apt-setup/local2/key string http://dl.google.com/linux/linux_signing_key.pub

  I suppose that the workaround works because now the local0 repo is one
  where the signing key is already part of Ubuntu. I just hope that
  there is no package in the trusty partner repo that is not also in the
  xenial partner repo.

  For me it is very important that you fix this bug before 16.04 is
  released so that I can continue to use Ubuntu with an automated setup.

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list