Re: Bootstrap pkg on a disconnected system
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 04 Aug 2025 00:34:37 UTC
On Sunday, August 3rd, 2025 at 14:24, Frank Leonhardt <freebsd-doc@fjl.co.uk> wrote:
>
>
> I'm posting stuff that's not appearing AGAIN so I'm sending this to the
> list and to Pat directly.
>
> On 03/08/2025 20:07, Frank Leonhardt wrote:
>
> > On 03/08/2025 19:56, Pat wrote:
>
> > > 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
>
>
> Assuming you don't want to build from source....
>
> Also assuming you can download stuff from the interweb and get it on
> to the machine somehow....
>
> Go to https://pkg.freebsd.org/ and download the bootstrap package you
> need (pkg-[version].pkg)
>
> On the laptop manually install this appropriate package - some like
> tar xf - /path/to/pkg-[version].pkg
>
> I assume you have the other pkg files on the laptop somehow (USB stick
> etc). Generate the metadata
>
> pkg repo /path/to/pkg/files
>
> Edit the local.conf file in the repo to some thing like:
>
> --------------
>
> local: {
> url: "file:///path/to/pkg/files",
> enabled: yes
> }
>
> --------------
> You might also want to disable the default freebsd repo - FreeBSD.conf:
>
> --------------
>
> FreeBSD: {
> enabled: no
> }
>
> ------------
>
> Then you can install your pkg files with "pkg install -r local
> flubnutz" or whatever.
>
> But I'd probably compile from source :-)
>
> Seriously - I'm going from some notes wot I rote when I did this one
> time. Good luck.
>
I sorta figured it would be something like this. I didn't think of
compiling from source though. In the end I will probably just use the
usb NIC that I have. It is currently connected to a macbook and is the
only one I have, but using it for a few minutes on the old HP won't
hurt a thing.
I've noted your notes, and might give it a go one of these days. The
HP is a decent laptop, but the wired NIC is dead and I re-purposed the
wireless NIC out of it a while back. Just not quite ready to give it
up yet for some reason. :) And yeah, I can sneakernet files to/from it
easily enough. Heck, I should just break down and buy another USB NIC,
it isn't like they are expensive or anything.
Thanks!
Pat