cvs vs. DVD
luvbeastie at larseighner.com
Sun Jun 26 19:59:38 UTC 2011
On Sun, 26 Jun 2011, wayne mitchell wrote:
> be warned, you are dealing with a 'newbie'
Be warned, I don't know the official best practices response. I'm
just telling you what I would do^H^Htry in your circumstances.
> i have one machine that has internet access and another that does not
> both machines were installed with FreeBSD_RELEASE_8_1 with a DVD
> i am now using cvsup to upgrade the RELENG_8_1_RELEASE tree
> my second machine does not have working ethernet
> how do i transfer the updated ports tree to the other machine using
> only storage media (DVD, USB)
This is assuming 1) You haven't crossed a major release number since you
installed from disc on both. 2) you know how to make a dvd from a file
system. Since you are going from BSD to BSD, you don't have to make ISOs,
but it will do no harm if you do (and might even be good for you).
In the updated machine go to /usr/src/ and make clean. The official right
way, I think is to use backup to make the file you will write to DVD and
restore on the netdead machine to recreate /usr/src/ from disc. tar + dd or
cp might work. (backup and restore are commands, check them out)
Then on the netdead machine do the make buildworld, make kernel, etc. to
update the machine's system. The instructions are in /usr/src/UPDATING near
In /usr/ports/ (master machine) use portsclean -CDP. This should clean out
all the working directories and the old versions of packages and
distributions which are no longer necessary to recreate the ports you have
installed. This is not strictly necessary, but there is no point in
carrying over the deadwood. If you have a relatively young installation,
on the other hand, this may not save much.
Now you can do whatever you did (backup/restore), dd, etc. with the source
tree to the ports tree. Then you can update ports on the slave machine, or
hold off. The important thing is for the ports tree itself to be somewhat
in sync with world.
> my guess (hack) is to find all relavent files/data trees and simply
> copy over, then run necessary updates (portsdb, make world...)
Do not mess directly with the ports database (in /var/db/pkg) on either
machine. Until you actually do some updates in ports, pkgdb, which
deals with installed ports, will not change.
> if that is correct then can you tell where those files are ?
The whole ports tree is in /usr/ports/. This should include the distfiles
and packages you have installed since you installed from disc. The
whole source tree is in /usr/src/. It is possible to install from disc
without installing either of these, but if you have been cvsup'ing or cvs
source and ports on the netlive machine, it certainly has them. If you did
not install them on the netdead machine, you can install the copies from
the netlive machine without further ado. You can even delete them from
the netdead machine (if they are there) on the netdead machine, and you
will still have an operable system -- nothing in them is necessary to run.
But if you have the disc space, I suggest you rename (mv) them until you
know your update is successful. I suggest you go through the mergemaster
both times in rebuilding the system on the netdead machine. It is almost
impossible to keep configuration files sufficiently in sync to make copying
/etc and /usr/local/ect a viable plan (moreover, it would certainly be wrong
to do so if both machines are on a net, local or internet).
> if not then how should i do this ?
I think you are basically on the right track.
This probably will work across major releases and with drastically different
architectures between the machines, but caution on the target machine is in
order. (Other than cleaning, this process should not involve anything
remotely dangerous to the source machine.)
8800 N IH35 APT 1191 AUSTIN TX 78753-5266
More information about the freebsd-questions