Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Mar 2003 13:15:48 -0500
From:      Bill Moran <wmoran@potentialtech.com>
To:        IAccounts <iaccounts@northnetworks.ca>
Cc:        freebsd <freebsd-questions@FreeBSD.ORG>
Subject:   Re: 4.3 -> RELENG_4
Message-ID:  <3E679054.9080308@potentialtech.com>
In-Reply-To: <20030306120141.N4415-100000@diana.northnetworks.ca>
References:  <20030306120141.N4415-100000@diana.northnetworks.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
IAccounts wrote:
>>I may be wrong, but ...
>>Do this order:
>>make buildworld
>>make buildkernel
>>make installkernel
>>reboot
>>make installworld
> 
> I am going to attempt the above in order as stated. I have read UPDATING,
> have the handbook open. One thing I am confused about: The next line after
> my new text states that this should give me a new config. My understanding
> is that buildworld will build the system, but not install it. Am I correct
> in saying that if the world is not installed, then the new config will not
> be installed either?

I apologize, I'm forgetting things and giving you half-correct information
all over the place.
First off ... the handbook is your authoritative reference on this, if
anything I say conflicts with the handbook, I'm most likely wrong.

buildworld builds everything except the kernel and puts it all in /usr/obj,
thus there are no changes to your running system.
buildkernel is similar (it builds the kernel and puts it in /usr/obj) but
it uses the utilities that are in /usr/obj instead of your running sytem,
that's why you must always buildworld first.
At this point, nothing on your running system has changed.  You can buildworld
and buildkernel on a live system without affecting its operation.
When you installkernel, it copies /kernel to /kernel.old, then installs the
kernel it built with buildkernel as /kernel.  It also installs kernel modules
in the /modules directory.  At this point your system has changed ... but getting
it back to where it was involves copying /kernel.old to /kernel and /modules.old
to /modules ... not too hard.
The changes don't take effect until you reboot, though.  If, apon reboot, things
don't look good, you can backtrack easily by booting the kernel.old and doing
the copying described above.
If everything looks good, you do installworld.  Installworld copys a lot of stuff
to it's proper place.  I have no idea what all files are altered, but there are
LOTs of them.  Reverting an installworld is a LOT of work!  But it is doable ...
I've done it, so don't think that all is lost if something goes wrong, it's just
that it's probably easier to reinstall the system and restore from backup.

There's a step that I left out: mergemaster.  Mergemaster creates a temporary copy
of the files that belong in /etc.  (make a backup of /etc before running mergemaster)
and then allows you to selectively install whatever files you need.  It goes through
each file that should be in /etc, compares it to what is currently in /etc and tells
you whether it needs updated or not.
This is the most difficult and easiest step to screw up.  If you install the new
/etc/passwd, for example, you'll lose any users you've added, so you'll probably want
to merge that file in.  Some other examples are /etc/printcap, /etc/group, /etc/hosts.
On the other hand, there are some startup scripts in /etc that you almost always
want to update, such as /etc/rc, and everything in /etc/defaults.  This is why it's
so important to backup /etc before using mergemaster, so you can easily back out of
a mistake.  Using mergemaster is important!  Don't skip this step.

Hope this helps clear up some of the confusion I created.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E679054.9080308>