Re: Bootstrap pkg on a disconnected system (repost)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 04 Aug 2025 16:40:17 UTC
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.