Building FreeBSD to install or update in two DESTDIRs

Matthew Seaman matthew at FreeBSD.org
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
tree.

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
commandline.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120514/a8cd0c53/signature.pgp


More information about the freebsd-questions mailing list