The Canonical Way to Update Your System

本文提供了一套详细的步骤来指导用户如何从源码安全地升级FreeBSD系统。包括使用新编译器编译世界、内核,安装新内核,并进行必要的配置文件更新等关键操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值