How To Upgrade FreeBSD 6.3 to 7.0 Stable Release

Q. FreeBSD 7.0-RELEASE is now available for the 64 and 32 bit computer architectures. How do I upgrade FreeBSD version 6.3-pX 64 bit to latest 7.0 64 bit system?

A. FreeBSD 6.3 allows upgrade of existing installation to FreeBSD 7.0-RELEASE. Since this is a major version upgrade, it is recommended that you backup existing data, database and config files. You also need to reinstall all ports.

Step # 1: Upgrade ports

Type the following command, enter:
# portupgrade -faP

WARNING! This procedure might not work for you as upgrading system is complex procedure. This may result into data loos. Please backup all important data and configuration files before executing any commands. All instructions are tested on FreeBSD 6.3pX 32/64 bit computers.

Step # 2: Download updated freebsd-update-upgrade tool

Type the following command:
# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz
# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz.asc
# gpg --verify freebsd-update-upgrade.tgz.asc freebsd-update-upgrade.tgz
# tar -xf freebsd-update-upgrade.tgz

Step # 3: Start upgrade procedure

Type the following command to install new kernel and reboot the system, enter:
# sh freebsd-update.sh -f freebsd-update.conf -r 7.0-RELEASE upgrade
# sh freebsd-update.sh -f freebsd-update.conf install
# reboot

Step # 4: Install updated userland tools

Install the new userland components, after which all ports should be recompiled to link to new libraries:
# sh freebsd-update.sh -f freebsd-update.conf install
# portupgrade -faP

Step # 5: Remove all old libraries

Finally, freebsd-update.sh needs to be run one last time to remove old system libraries, after which the system should be rebooted in order that the updated userland and ports will be running:
# sh freebsd-update.sh -f freebsd-update.conf install
# reboot

Step # 6: Verify FreeBSD 7.0

Run following command to verify that everything is running smoothly, enter:
# uname -a
# tail -f /var/log/messages
# tail -f /path/to/other/log/files
# egrep -i 'error|warning' /path/to/log/files
# sockstat -4 -l

References:

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.