Re: FreeBSD install via Proxy?

From: Vincent Miller <vrwmiller_at_gmail.com>
Date: Thu, 30 May 2024 04:16:22 UTC
On Tue, May 28, 2024 at 8:23 AM Jenisch Ewald <Ewald.Jenisch@oekb.at> wrote:

> Hi,
>
> I've got a machine sitting in a heavily firewalled environment not
> allowing direct internet connections, but http/https has to run via a
> proxy. I've found ways to get normal user activity as well as git for
> source updates run via proxy, but how about a fresh installation of FreeBSD
>
> To be specific: How can I get the installer (i.e. bootonly.iso) to run
> it's downloads via a proxy instead of trying to connect to the internet
> dirctly?


> [ snip ]
>
> PS: As for "installation", I'm talking about FreeBSD 14.0 here
>

I've not done this with 14.x yet nor interactively via bootonly.iso, but
believe it is feasible based on my experience. The stock bootonly.iso
should be sufficient if you're ok doing it interactively and figuring it
out as you go. Boot the media into a shell, initialize a network interface,
and define HTTP_PROXY and friends appropriately then run bsdinstall or
equivalent procedure to fetch and install kernel, base, etc.

The bootonly.iso can also be built with a custom implemented
/etc/installerconfig that does it non-interactively. Such an ISO might be
able to be built with Poudriere more easily than it can be built from
source. I'm familiar with doing so from source and less so via Poudriere
and with FreeBSD 8.0 through 13.3 and via proxy beginning with 13.x.

The interactive process isn't scalable particularly in a zero-trust
environment. The non-interactive implementation is much more useful with
larger footprints.

I wrote some blogs 10+ years ago regarding PXE booting and installing
FreeBSD via Cobbler. Those concepts still apply to current versions, but
the implementation and tools have changed over the years...Cobbler isn't
used, the FreeBSD installer has changed, and other tools have been
replaced. See them below. There's probably some useful tidbits still, but
not directly applicable to modern versions.

https://blog.hostileadmin.com/2013/04/11/installing-freebsd-via-cobbler/
https://blog.hostileadmin.com/2012/05/08/using-sysinstall-for-automated-freebsd-8-x-installs/
https://blog.hostileadmin.com/2012/05/04/pxe-booting-into-a-freebsd-installation/

--
Take care
Vincent Miller