bootstrapping /usr/sbin/pkg inside a jail

Craig Rodrigues rodrigc at
Wed May 7 23:35:20 UTC 2014

On Wed, May 7, 2014 at 3:41 PM, Fbsd8 <fbsd8 at> wrote:
> Craig Rodrigues wrote:

> Figured out the problem.
> To create my jail filesystem I download and uncompress the base.txz file
> just like bsdinstall does. This base filesystem has a environment variable
> PACKAGESITE populated with the content needed by the old pkg_add -r command
> which is no longer part of the 10.0 base. bsdinstall must do an unsetenv
> PACKAGESITE on that environment variable during the install process to
> prepare the system for pkgng.
> The solution for me is after creating my jail filesystem from the base.txz
> file, I start the jail and then jexec jailname tcsh to open a console to the
> jail. From inside of the jail I issue "unsetenv PACKAGESITE" to disable that
> environment variable. Then issue pkg and the pkg bootstrap works as
> expected.
> Now global system environment variables must be saved in some file that gets
> read during the system boot process. Does anyone know where that file is
> located and what its called?


Very good analysis.  Thanks for doing it.

Inside your jail, can you do the following as root:

find /etc /var | xargs grep -l PACKAGESITE


More information about the freebsd-questions mailing list