How to install squid-deb-proxy-client via preseed/early_command

To force the installer to use your proxy server, configure it using preseeding properly using the d-i mirror/http/proxy option, e.g.:

d-i mirror/http/proxy string http://ip-or-hostname-of-proxy:8000/

You don't really need the squid-deb-proxy-client package to use the Squid proxy. The only purpose of the -client package is that it can auto-discover the proxy servers in the network.


When the early_command runs, I don't think you even have /target already formatted/mounted. For instance, preseed/early_command can be used to install udebs (but note, not standard debs) in the installer environment:

# This first command is run as early as possible, just after
# preseeding is read.
#d-i preseed/early_command string anna-install some-udeb

You can run this in your late_command, that's when you can actually install stuff in the target system:

d-i preseed/late_command string \
in-target apt-get install -y --force-yes openssh-server; \
true

I think the best way to have your system get packages from a proxy is what Pete Ashdown suggested.


It's currently not possible due to bug #1183326, however if one day it gets fixed it should be possible with:

d-i anna/choose_modules string squid-deb-proxy-client-udeb

In your preseed file, the d-i mirror/http/proxy trick will work on limited escenarios due to bug #642159