Building FreeBSD to install or update in two DESTDIRs
Thomas Mueller
t.mueller1 at insightbb.com
Tue May 15 00:48:35 UTC 2012
> 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.
I guess after the first installkernel, to default location, I should immediately make installkernel again, this time with DESTDIR=/mnt?
Better to "make buildkernel" and "make installkernel" as two separate steps, rather than "make kernel"?
After rebooting single-user, do "mergemaster -p", then "mergemaster -p -D /mnt", and then "make installworld" and immediately following that, "make installworld DESTDIR=/mnt" ?
After that, I would do "mergemaster -i" followed by "mergemaster -i -D /mnt"? And then make delete-old followed by "DESTDIR=/mnt make delete-old"?
Would I need to do "make distribution"?
First time, "make installkernel DESTDIR=/mnt" only installed part. I installed to USB stick only after fully upgrading on main installation, finally copied /boot/kernel directory, and that USB stick is now bootable. So now I know how to make a USB stick bootable with GPT.
Maybe some of the files were cleaned out?
It is surely useful to have a rescue backup, considering the possibility of an update going awry on the main installation.
Tom
More information about the freebsd-questions
mailing list