6

Using Lucid, installing from the Lucid mini.iso. Both AMD64.

In the following I've tried as \, all of apt-get, apt-install, anna-install, dpkg:

d-i preseed/early_command string <cmd+opt> squid-deb-proxy-client

I've also tried:

d-i preseed/early_command string /usr/bin/wget \
    -O squid-deb-proxy-client_0.3.1_all.deb \
    http://ubuntu.media.mit.edu/ubuntu//pool/universe/s/squid-deb-proxy/squid-deb-proxy-client_0.3.1_all.deb && dpkg -i squid-deb-proxy-client_0.3.1_all.deb

Is this possible, and if nor what is the earliest point one can get a installation to use the squid-deb-proxy server?

Jorge Castro
  • 73,717
hedgehog
  • 167

4 Answers4

4

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.

Jorge Castro
  • 73,717
gertvdijk
  • 69,427
3

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.

roadmr
  • 34,802
1

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

0

You can use a post install bash script to install packages, below is the preseed/late_command:

d-i preseed/late_command string \
    cp /cdrom/post_install.sh /target/root/; \
    chroot /target chmod +x /root/post_install.sh; \
    chroot /target bash /root/post_install.sh

post_install.sh:

#!/bin/sh

apt-get install -y --force-yes \
    git \
    python-pip \
    ansible
feroz
  • 1