Re: Bootstrap pkg on a disconnected system

From: Pat <cli_junkie_at_protonmail.com>
Date: Mon, 04 Aug 2025 00:43:01 UTC

On Sunday, August 3rd, 2025 at 16:54, Carl Johnson <carlj@peak.org> wrote:

> 

freebsd.tug890@passmail.net">--protonSignature--freebsd.tug890@passmail.net writes:

> Le dimanche 3 août 2025 à 20:57, Pat cli_junkie@protonmail.com a écrit :
> 
> > I have an older laptop that I was playing around with, and installed
> > FreeBSD 13.2 from a previously burned DVD. I can't use `pkg add` to add
> > a package because `pkg` has not been bootstrapped. But the bootstrap
> > process insists on connecting to a remote repo.
> > 
> > I see the `pkg` package available on the DVD at
> > /packages/FreeBSD:13:amd64/All/pkg-1.19.1_1.pkg. If that can be used,
> > how do I bootstrap the pkg system first?
> > 
> > I can connect a USB interface, but am curious to know if this can be
> > done.
> > 
> > Thanks and regards,
> > Pat
> 
> Hi,
> 
> The process is described in the Handbook https://docs.freebsd.org/en/books/handbook/ports/#pkgng-initial-setup
> 
> As written in the Handbook, an Internet connection must be set to succeed the pkg bootstrap process.
> 
> The command used to install a package is:
> # pkg install <packagename>
> 
> HTH,
> Alexandre


That handbook link doesn't seem very clear to me, but the base pkg does
know enough to install a local package for pkg. You can use the one
from the DVD as you say, or you can use 'pkg fetch pkg' from another
system to get it. The base system has a manpage for pkg(7) which
contains the options the base version handles. That option may not be
available for older versions of the base system, so the pkg(7) manpage
should tell you if it handles that.

--
Carl Johnson carlj@peak.org

The problem that I ran into is that when I tried to do (going from
memory, I've shut the HP down for the night)
pkg add pkg_<version>.pkg
I was prompted to bootstrap the pkg system, and it would only try to
connect to a remote repo. The man page was pretty clear that it would
do that, but offered nothing that seemed like a way to bootsrap it
locally.

No worries, I can connect the laptop to the network, I just have to
disconnect another system for a few minutes to do it. I really should
just buy another USB NIC, but I'm a cheapskate! :)

Thanks,
Pat