freebsd 升级

发表于:2007-06-09来源:作者:点击数: 标签:
http://cobrawgl.blogchina.com/blog/article_54082.198431.html http://www.cnfug.org/journal/archives/000056.html 本文简要介绍了我 make world 的过程。 在 /usr/share/examples/cvsup/ 下 standard-supfile 是用来升级到 current 版本的. 不建议用来做

http://cobrawgl.blogchina.com/blog/article_54082.198431.html

http://www.cnfug.org/journal/archives/000056.html

本文简要介绍了我 make world 的过程。

在 /usr/share/examples/cvsup/ 下
standard-supfile 是用来升级到 current 版本的. 不建议用来做工作平台.
stable-supfile 是用来升级到 stable 版本的. 建议选用.

首先, 编辑了 /usr/share/examples/cvsup/stable-supfile

修改 *default host=CHANGE_THIS.FreeBSD.org
为 *default host=cvsup.FreeBSD.org
当然, 也可以选择别的 mirrors. 可是,主站的 src 是最新的啊, 呵呵.

然后, 修改 tag 选项.
# change "RELENG_4" to "RELENG_3" or "RELENG_2_2" respectively.
*default release=cvs tag=RELENG_4

这里, 因为我用的是 5.2.1, 所以改成
*default release=cvs tag=RELENG_5_2

cvsup ...

# cd /usr/src/
# cvsup -g -L 2 /usr/share/examples/cvsup/stable-supfile

build world

# pwd
/usr/src
# make buildworld

build kernel

# pwd
/usr/src
# make buildkernel KERNCONF=GENERIC

当然, 你也可以自己编辑一个内核配置文件来替换 GENERIC.

现在 make installkernel, make installworld

# pwd
/usr/src
# make installkernel KERNCONF=GENERIC
# mergemaster -cv
# make installworld
# shutdown -r now

mergemaster 的时候, 你根据提示做就可以了

"d" 是删除. "i"是安装. "m"是合并. 一般, 选 "i" 就可以了.

顺带着又 cvsup 了 ports, 使用的是 ports-supfile
方法和前面一样:
修改 *default host=CHANGE_THIS.FreeBSD.org
为 *default host=cvsup.FreeBSD.org

# cd /usr/ports/
# cvsup -g -L 2 /usr/share/examples/cvsup/ports-supfile

cvsup 完了后, 要记得

# portsdb -uU

++++++++++++++++++++++++++++++++++++++

关于 proxy user 的补充


Login: proxy
Password: *
Uid [#]: 62
Gid [# or name]: 62
Change [month day year]:
Expire [month day year]:
Class:
Home directory: /nonexistent
Shell: /usr/sbin/nologin
Full Name: Packet Filter pseudo-user


# make buildworld
# make buildkernel
# make installkernel
# reboot

您应该启动到单用户模式下(例如从启动提示符处使用 boot -s)。然后执行:

# mergemaster -p
# make installworld
# mergemaster
# reboot

原文转自:http://www.ltesting.net