Using 02proxy instead of a mirror with preseeding?
Tom H
tomh0665 at gmail.com
Fri Sep 27 17:29:26 UTC 2013
On Wed, Sep 25, 2013 at 4:18 PM, Stephen Wood <smwood4 at gmail.com> wrote:
>
> Is it possible to declare a mirror in the ubuntu preseed option without
> appending it to everything in /etc/apt/sources.list?
>
> The reason I am asking is because I would like to use an apt-cacher for PPA
> packages that typically are declared in /etc/apt/sources.list.d/ppa.list,
> but this seems to be incompatible when I declared a mirror using the preseed
> function.
>
> I'd like to keep the preseed option though, because it makes machine
> bootstrapping go MUCH faster.
>
> Here's my preseed option:
>
> # Mirror settings d-i mirror/country string manual d-i mirror/http/hostname
> string proxy:3142 d-i mirror/http/directory string
> /us.archive.ubuntu.com/ubuntu d-i mirror/http/proxy string d-i
> mirror/codename string precise d-i mirror/suite string precise d-i
> mirror/udeb/suite string precise
>
> It makes my /etc/apt/sources.list look like this:
> deb http://proxy:3142/us.archive.ubuntu.com/ubuntu precise universe
>
> If I also add a proxy to /etc/apt/apt.conf.d/02proxy and run update I get an
> error:
>
> Err http://proxy precise/main amd64 Packages
> 403 URL seems to be made for proxy but contains apt-cacher-ng port.
> Inconsistent apt configuration?
>
> My /etc/apt/apt.conf.d/02proxy looks like this:
> Acquire::http { proxy "http://publius:3142"; };
Your c+p of your preseed snippet was jumbled up in my mailbox and in
the archives[1] so here it is, legible for posterity...
d-i mirror/country string manual
d-i mirror/http/hostname string proxy:3142
d-i mirror/http/directory string /us.archive.ubuntu.com/ubuntu
d-i mirror/http/proxy string
d-i mirror/codename string precise
d-i mirror/suite string precise
d-i mirror/udeb/suite string precise
I've never used apt-cacher-ng but I suspect that you shouldn't set the
proxy both as the hostname and as a proxy.
So, unless proxy and publius are the same host, set
d-i mirror/http/hostname string publius:3142
and don't set a proxy in "/etc/apt/apt.conf.d/".
[1] https://lists.ubuntu.com/archives/ubuntu-users/2013-September/272111.html
More information about the ubuntu-users
mailing list