Saturday, January 17, 2009

Upgrading FreeBSD 7.0 to FreeBSD 7.1

To spend the weekend, I want to upgrade my FreeBSD. There is new release of FreeBSD 7.1, I want to upgrade my FreeBSD 7.0.
My machine running on old computer Pentium III 800 Mhz, with memory 384 Mhz.

I have custom kernel, so I can't use the freebsd-update, I have to using cvsup method.

First create cvsup configuration.

viperbsd# emacs /root/supfile

Here is my configuration.

*default host=cvsup.tw.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7_1
*default delete use-rel-suffix

Begin with cvsup update.

viperbsd# cvsup /root/supfile

After the cvsup update is finish, then make buildworld (Please refer the documentation of FreeBSD Documentation for more detail information.

viperbsd# make buildworld

Because I only use old PC, it's takes 4 Hours.

I need custom kernel, because I want activated the PF and delete unneeded devices.

Then I compile my custom viperbsd71 kernel.

viperbsd# make buildkernel KERNCONF=viperbsd71
viperbsd# make installkernel KERNCONF=viperbsd71

If there is no error, continuing with booting the system.

===> usr.sbin/zzz (all)
gzip -cn /usr/src/usr.sbin/zzz/zzz.8 > zzz.8.gz
===> etc (all)
===> etc/sendmail (all)
rm -f freebsd.cf
m4 -D_CF_DIR_=/usr/src/etc/sendmail/../../contrib/sendmail/cf/ /usr/src/etc/sendmail/../../contrib/sendmail/cf/m4/cf.m4 /usr/src/etc/sendmail/freebsd.mc > freebsd.cf
chmod 444 freebsd.cf
rm -f freebsd.submit.cf
m4 -D_CF_DIR_=/usr/src/etc/sendmail/../../contrib/sendmail/cf/ /usr/src/etc/sendmail/../../contrib/sendmail/cf/m4/cf.m4 /usr/src/etc/sendmail/freebsd.submit.mc > freebsd.submit.cf
chmod 444 freebsd.submit.cf

--------------------------------------------------------------
>>> World build completed on Sat Jan 10 21:56:04 WIT 2009
--------------------------------------------------------------
viperbsd#


viperbsd# reboot


Boot on single user mode, for updating configuration, and library.

# mount -a -t ufs
# mergemaster -p
# mergemaster -i
# reboot

Afterthis, check my machine with :

viperbsd# uname -a
FreeBSD viperbsd.org 7.1-RELEASE-p1 FreeBSD 7.1-RELEASE-p1 #0: Thu Jan 15 20:14:40 WIT 2009 root@viperbsd.org:/usr/obj/usr/src/sys/viperbsd71 i386
viperbsd#



Note :
I got error when build kernel step, here is my error.

cd /usr/obj/usr/src/sys/viperbsd71; MAKESRCPATH=/usr/src/sys/dev/aic7xxx/aicasm make -DNO_CPU_CFLAGS -DNO_CTF -f /usr/src/sys/dev/aic7xxx/aicasm/Makefile
Warning: Object directory not changed from original /usr/obj/usr/src/sys/viperbsd71
yacc -b aicasm_gram -d -o aicasm_gram.c /usr/src/sys/dev/aic7xxx/aicasm/aicasm_gram.y
yacc -b aicasm_macro_gram -p mm -d -o aicasm_macro_gram.c /usr/src/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y
cc -O2 -fno-strict-aliasing -pipe -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -c /usr/src/sys/dev/aic7xxx/aicasm/aicasm.c
cc -O2 -fno-strict-aliasing -pipe -nostdinc -I/usr/include -I. -I/usr/src/sys/dev/aic7xxx/aicasm -c /usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:50:16: error: db.h: No such file or directory
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:63: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c: In function 'symbol_delete':
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:86: error: 'symtable' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:86: error: (Each undeclared identifier is reported only once
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:86: error: for each function it appears in.)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:87: error: 'DBT' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:87: error: expected ';' before 'key'
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:89: error: 'key' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c: In function 'symtable_open':
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:133: error: 'symtable' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:134: error: 'DB_HASH' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c: In function 'symtable_close':
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:147: error: 'symtable' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:148: error: 'DBT' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:148: error: expected ';' before 'key'
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:149: error: expected ';' before 'data'
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:151: error: 'key' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:151: error: 'data' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:151: error: 'R_FIRST' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c: In function 'symtable_get':
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:169: error: 'DBT' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:169: error: expected ';' before 'key'
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:170: error: expected ';' before 'data'
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:173: error: 'key' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:176: error: 'symtable' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:176: error: 'data' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c: In function 'symtable_dump':
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:472: error: 'DBT' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:472: error: expected ';' before 'key'
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:473: error: expected ';' before 'data'
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:477: error: 'symtable' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:486: error: 'R_FIRST' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:487: error: 'key' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:487: error: 'data' undeclared (first use in this function)
/usr/src/sys/dev/aic7xxx/aicasm/aicasm_symbol.c:524: error: 'R_NEXT' undeclared (first use in this function)
*** Error code 1

Stop in /usr/obj/usr/src/sys/viperbsd71.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
viperbsd#

From that error, show that there was no db.h on my /usr/include.
So I Install Berkeley DB, and make soft link to /usr/include.

No comments:

Post a Comment