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.

Tuesday, January 13, 2009

Installing jabber on solaris 5.10

Here is a note for installing jabber on solaris 5.10

Firstly install pkg-get like on my last post.

bash-3.00# /opt/csw/bin/pkg-get -i jabberd

This will download packages. After all packaged install succesfully check with pkginfo.

bash-3.00# pkginfo |grep jabberd
application CSWjabberd jabberd - Jabber Server 1.4.3
bash-3.00#

Edit file main.xml in /opt/csw/etc/jabberd

set with your environment.

start jabber server in /etc/init.d

bash-3.00# ./cswjabberd start

Check your jabber is running or not, if not check your log in

bash-3.00# ps -A |grep jabber
18606 pts/5 0:00 jabberd
18603 pts/5 0:01 jabberd
bash-3.00#

Jabber server is running.

bash-3.00# tail -f /opt/csw/var/log/jabberd/main.log

pkg-get on solaris, there is new link for url

After not using pkg-get on Solaris for couple months, I got error like this.

bash-3.00# /opt/csw/bin/pkg-get -i nano
WARNING: gpg not found
No existing install of CSWnano found. Installing...
Trying http://ibiblio.org/pub/packages/solaris/csw/unstable/i386/5.10/nano-1.2.5,REV=2005.08.14-SunOS5.8-i386-CSW.pkg.gz
--11:26:07-- http://ibiblio.org/pub/packages/solaris/csw/unstable/i386/5.10/nano-1.2.5,REV=2005.08.14-SunOS5.8-i386-CSW.pkg.gz
=> `nano-1.2.5,REV=2005.08.14-SunOS5.8-i386-CSW.pkg.gz'
Resolving ibiblio.org... 152.46.7.80
Connecting to ibiblio.org|152.46.7.80|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
11:26:08 ERROR 404: Not Found.

Error downloading http://ibiblio.org/pub/packages/solaris/csw/unstable/i386/5.10/nano-1.2.5,REV=2005.08.14-SunOS5.8-i386-CSW.pkg.gz
(Perhaps you need to update your catalog?)
nano-1.2.5,REV=2005.08.14-SunOS5.8-i386-CSW.pkg.gz: No such file or directory

Attempting to update catalog, then retry

Getting catalog...
--11:26:08-- http://ibiblio.org/pub/packages/solaris/csw/unstable/i386/5.10/catalog
=> `catalog'
Resolving ibiblio.org... 152.46.7.80
Connecting to ibiblio.org|152.46.7.80|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
11:26:08 ERROR 404: Not Found.

ERROR: could not get catalog file
bash-3.00#

Hey, whats going on with .. pkg-get.
Then I go to

http://solaris.reys.net/english/2006/02/pkg-get_blastwave_how-to

looking for some information, looks everything is fine.

Then i visiting this site

http://ibiblio.org/pub/packages/solaris/opencsw/

well, look the URL was change, I am not sure since when ..

so I edit the configuration pkg-get on /opt/csw/etc/pkg-get.conf

and change the default site from

url=http://ibiblio.org/pub/packages/solaris/csw/unstable

to


url=http://ibiblio.org/pub/packages/solaris/opencsw/unstable

and everything going fine.

So I download and install package using pkg-get again.

For example installing nano editor :

bash-3.00# /opt/csw/bin/pkg-get -i nano

...
/opt/csw/share/locale/ro/LC_MESSAGES/nano.mo
/opt/csw/share/locale/ru/LC_MESSAGES/nano.mo
/opt/csw/share/locale/sr/LC_MESSAGES/nano.mo
/opt/csw/share/locale/sv/LC_MESSAGES/nano.mo
/opt/csw/share/locale/tr/LC_MESSAGES/nano.mo
/opt/csw/share/locale/uk/LC_MESSAGES/nano.mo
/opt/csw/share/man/man1/nano.1
/opt/csw/share/man/man5/nanorc.5
[ verifying class ]
## Executing postinstall script.
Updating the info dir file for CSWtexinfo
chroot: exec failed: No such file or directory

Installation of was successful.
bash-3.00#

Sunday, January 4, 2009

Upgrade ports on freebsd

I want to install postgresql 8.2 from ports, but the package was not found. So I have to upgrade the newest ports.
Here is the step for upgrade the ports on FreeBSD 7.

#portsnap fetch update
#portsnap extract
#portsnap update
#Ports tree is already up to date.
#

If only spesified package only use
#portupdgrade package-name