freebsd-update : 6.2-RELEASE to 8.1-RELEASE

Put on sysadmin hat and upgraded some 6.2 freebsd boxes recently. Here are the steps that I used. Please take note that you should have a good backup before attempting this upgrade. You are WARNED!
old6# uname -a
FreeBSD old6.vnet.0rg 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
A rather aged machine without any update. Damn the lazy sysadmin:P
Now grab freebsd-update script from Colin Percival’s realm on people.freebsd.org and extract it. Note that you can’t use the default freebsd-update script in base as it does not have “-r” switch to upgrade your box to other -RELEASE.
old6# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz
old6# tar xvfz freebsd-update-upgrade.tgz
Next, fire up the freebsd-update script to upgrade the system to 8.1-RELEASE. You would be prompted to upgrade your kernel first if you use other kernel than GENERIC or SMP. You need to build and install a 8.1 kernel manually before proceed with freebsd-update install. The upgrade script will also prompt you with bunch of questions on file merge. They are pretty much self-explanatory.
old6# ./freebsd-update.sh upgrade -f freebsd-update.conf -r 8.1-RELEASE
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update4.FreeBSD.org... done.
Fetching metadata signature for 6.2-RELEASE from update4.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
The following components of FreeBSD seem to be installed:
kernel/generic src/base src/bin src/contrib src/crypto src/etc src/games
src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue
src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin
world/base world/catpages world/dict world/doc world/games world/info
world/manpages world/proflibs
The following components of FreeBSD do not seem to be installed:
kernel/smp
Does this look reasonable (y/n)? y
Fetching metadata signature for 8.1-RELEASE from update4.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Fetching files from 6.2-RELEASE for merging... done.
Preparing to download files... done.
Fetching 5294
patches.....10....20....30....40....50....60....70....80....90....100....110....120....130....140....150....160....170....180....190....200....210....220....230....240....250....260....270....280....290....300....310... done.
Applying patches... done.
Fetching 5416 files... done.
Attempting to automatically merge changes in files... done.
The following changes, which occurred between FreeBSD 6.2-RELEASE and
FreeBSD 8.1-RELEASE have been merged into /etc/group:
--- current version
+++ new version
@@ -1,6 +1,6 @@
-# $FreeBSD: src/etc/group,v 1.32.2.1 2006/03/06 22:23:10 rwatson Exp $
+# $FreeBSD: src/etc/group,v 1.35.10.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#
wheel:*:0:root,chflags
daemon:*:1:
kmem:*:2:
sys:*:3:
@@ -9,10 +9,11 @@
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
+ftp:*:14:
staff:*:20:
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:
Does this look reasonable (y/n)? y
The following changes, which occurred between FreeBSD 6.2-RELEASE and
FreeBSD 8.1-RELEASE have been merged into /etc/master.passwd:
--- current version
+++ new version
@@ -1,6 +1,6 @@
-# $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp $
+# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#
root:$1$4Jd7.6Nx$ogtqf2/1drgoAFlO0iXmb.:0:0::0:0:Charlie &:/root:/bin/csh
toor:*:0:0::0:0:Bourne-again Superuser:/root:
daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
Does this look reasonable (y/n)? y
The following changes, which occurred between FreeBSD 6.2-RELEASE and
FreeBSD 8.1-RELEASE have been merged into /etc/nsswitch.conf:
--- current version
+++ new version
@@ -1,7 +1,15 @@
+#
+# nsswitch.conf(5) - name service switch configuration file
+# $FreeBSD: src/etc/nsswitch.conf,v 1.1.10.1.4.1 2010/06/14 02:09:06 kensmith Exp $
+#
group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files
+services: compat
+services_compat: nis
+protocols: files
+rpc: files
Does this look reasonable (y/n)? y
The following changes, which occurred between FreeBSD 6.2-RELEASE and
FreeBSD 8.1-RELEASE have been merged into /etc/passwd:
--- current version
+++ new version
@@ -1,6 +1,6 @@
-# $FreeBSD: src/etc/master.passwd,v 1.40 2005/06/06 20:19:56 brooks Exp $
+# $FreeBSD: src/etc/master.passwd,v 1.40.22.1.4.1 2010/06/14 02:09:06 kensmith Exp $
#
root:*:0:0:Charlie &:/root:/bin/csh
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5:System &:/:/usr/sbin/nologin
Does this look reasonable (y/n)? y
The following files will be removed as part of updating to 8.1-RELEASE-p0:
/boot/kernel/ath_hal.ko
/boot/kernel/ath_rate.ko
/boot/kernel/bridge.ko
/boot/kernel/digi.ko
/boot/kernel/digi_CX.ko
/boot/kernel/digi_CX_PCI.ko
/boot/kernel/digi_EPCX.ko
/boot/kernel/digi_EPCX_PCI.ko
/boot/kernel/digi_Xe.ko
/boot/kernel/digi_Xem.ko
/boot/kernel/digi_Xr.ko
/boot/kernel/g_md.ko
/boot/kernel/geom_apple.ko
/boot/kernel/geom_gpt.ko
<— Long listing truncated —>
The following files will be added as part of updating to 8.1-RELEASE-p0:
/bin/pwait
/bin/uuidgen
/boot/firmware
/boot/gptboot
/boot/gptzfsboot
/boot/kernel/3dfx.ko.symbols
/boot/kernel/3dfx_linux.ko.symbols
/boot/kernel/aac.ko.symbols
/boot/kernel/aac_linux.ko.symbols
/boot/kernel/accf_data.ko.symbols
/boot/kernel/accf_dns.ko
/boot/kernel/accf_dns.ko.symbols
/boot/kernel/accf_http.ko.symbols
/boot/kernel/acpi.ko.symbols
/boot/kernel/acpi_aiboost.ko
/boot/kernel/acpi_aiboost.ko.symbols
/boot/kernel/acpi_asus.ko.symbols
/boot/kernel/acpi_dock.ko
/boot/kernel/acpi_dock.ko.symbols
/boot/kernel/acpi_fujitsu.ko.symbols
/boot/kernel/acpi_hp.ko
/boot/kernel/acpi_hp.ko.symbols
/boot/kernel/acpi_ibm.ko.symbols
/boot/kernel/acpi_panasonic.ko.symbols
/boot/kernel/acpi_sony.ko.symbols
/boot/kernel/acpi_toshiba.ko.symbols
/boot/kernel/acpi_video.ko.symbols
/boot/kernel/acpi_wmi.ko
/boot/kernel/acpi_wmi.ko.symbols
The following files will be updated as part of updating to 8.1-RELEASE-p0:
/.cshrc
/.profile
/COPYRIGHT
/bin/[
/bin/cat
/bin/chflags
/bin/chio
/bin/chmod
/bin/cp
/bin/csh
/bin/date
/bin/dd
/bin/df
/bin/domainname
/bin/echo
/bin/ed
/bin/expr
/bin/getfacl
/bin/hostname
/bin/kenv
/bin/kill
/bin/link
/bin/ln
/bin/ls
/bin/mkdir
/bin/mv
/bin/pax
/bin/pgrep
/bin/pkill
At this point, you already have all the upgrade files ready. Time to roll. Please note that if you are running own custom kernel on 6.2-RELEASE, you should have your custom 8.1 kernel install before attempting this step if. In my attempt, sshd could not be started after reboot as the base is not in sync with the new kernel. Thus, remote binary upgrade from 6.2 to 8.1 seems not possible. Let me know if you experience otherwise or have better method dealing with remote upgrade.
old6# ./freebsd-update.sh -f freebsd-update.conf install
Installing updates...
Kernel updates have been installed. Please reboot and run
"./freebsd-update.sh install" again to finish installing updates.
old6# reboot
The uname shows spanking new 8.1-RELEASE kernel.
old6# uname -a
FreeBSD old6.vnet.0rg 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
New base will be installed in this step. Reboot and you have newly upgraded 8.1-RELEASE FreeBSD.
old6# ./freebsd-update.sh -f freebsd-update.conf install
Installing updates... done.
PORTS
As this is a major upgrade, all ports are recommended to be recompiled. You could use compat6x (misc/compat6x) to minimise downtime if you have many services running on the box.
Tuesday, July 27th, 2010








