Thursday, January 3, 2019

Preseed proxy setting for local repository



I'm trying to set up a preseed configuration for Ubuntu 14.04 network installation from the example on the official documentation. I am affected by the proxy bug on choose-mirror. I'm using an apt-cacher-ng proxy. Due to this, adding a local repository fails, as the key cannot be downloaded through the apt-cacher-ng proxy. Usually I get an error about the key itself. Then I tried using a random gpg key from the mirror specified in apt-cacher-ng backend (in.archive.ubuntu.com, in this case). The error about the key vanished (at least the related prompt didn't appear), but the local repository was still not added, even though I had set:



d-i debian-installer/allow_unauthenticated boolean true


Using my campus mirror directly, thus avoiding the proxy, throws up an error about grub-pc failing to install (perhaps due to some problem with the mirror?).

What can I do use both the cacher and the local repository together? I can think of the following possibilites:




  1. apt-cacher-ng has an option to let some domains/urls slide, instead of outright rejecting them.

  2. debian-installer has a way to use the local repo without a key.

  3. debian-installer has a question for more specific proxy settings (e.g., only for apt (ideal), no_proxy lists, etc.).

  4. Install one package by itself (which contains the key for the repository and a sources.list.d entry), before d-i starts installing packages.

  5. wget the key and the list entry directly and add it, do apt-get update and other package installation via script in post install.

  6. Find some way to fix the grub-pc error when using the local campus mirror directly.




As such, I am using a workaround. The proxy I have set in preseeding is an HTTP proxy, so naturally HTTPS and FTP connections are unaffected. However, the installer does not support HTTPS as a transport mechanism (possibly apt-transport-https has to be installed somehow). So the option that remains is setting up an FTP server for the signing key, which I did using vsftpd. I didn't want the apt-cacher to do any work for the local repository, so I set up vsftpd to serve as an FTP repository as well.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...