The Canonical Way to Update Your System

From : http://www.freebsd.org/doc/handbook/makeworld.html

These concerns have led to the following recommended sequence. Note that the detailed sequence for particular updates may require additional steps, but this core process should remain unchanged for some time:

make buildworld

This first compiles the new compiler and a few related tools, then uses the new compiler to compile the rest of the new world. The result ends up in /usr/obj.

make buildkernel

Unlike the older approach, using config(8) and make(1), this uses the new compiler residing in /usr/obj. This protects you against compiler-kernel mismatches.

make installkernel

Place the new kernel and kernel modules onto the disk, making it possible to boot with the newly updated kernel.

Reboot into single user mode.

Single user mode minimizes problems from updating software that's already running. It also minimizes any problems from running the old world on a new kernel.

mergemaster -p

This does some initial configuration file updates in preparation for the new world. For instance it may add new user groups to the system, or new user names to the password database. This is often necessary when new groups or special system-user accounts have been added since the last update, so that the installworld step will be able to use the newly installed system user or system group names without problems.

make installworld

Copies the world from /usr/obj. You now have a new kernel and new world on disk.

mergemaster

Now you can update the remaining configuration files, since you have a new world on disk.

Reboot.

A full machine reboot is needed now to load the new kernel and new world with new configuration files.


=================================================================================

To summarize, the currently recommended way of upgrading FreeBSD from sources is:
# cd /usr/src
# make buildworld
# make buildkernel
# make installkernel
# shutdown -r now

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章