Building FreeBSD to install or update in two DESTDIRs

Matthew Seaman matthew at
Mon May 14 06:42:35 UTC 2012

On 14/05/2012 00:10, Thomas Mueller wrote:
> I tried make installkernel and make installworld, but those didn't
> fully work right the second time, with DESTDIR=/mnt (USB stick main
> partition).

What exactly went wrong?  Setting DESTDIR is the correct way to do this
sort of thing.  You only need to set it when running the installworld or
installkernel steps though -- there's nothing that gets compiled into
/usr/obj which prevents you from installing into a different than normal

I use this sort of construct frequently for updating jails, or when
managing boot environments.

> /usr/src/UPDATING doesn't say how to update for two DESTDIRs on the
> same build.

For each different DESTDIR, just repeat the installworld, installkernel,
check-old, delete-old* steps setting DESTDIR=/some/where
on the make command line.

The equivalent for mergemaster is to add '-D /some/where' to the



Dr Matthew J Seaman MA, D.Phil.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list