Upgrading to FreeBSD 8-Stable

As a reminder to myself:

# pkg_add -r fastest_cvsup
# fastest_cvsup -c all

In /root/stable-supfile, have:

1
2
3
4
5
6
7
8

*default host=cvsup.au.freebsd.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8
*default delete use-rel-suffix
*default compress
src-all

# csup /root/stable-supfile

# cd /usr/src
# rm -r -f /usr/obj

Customize /etc/make.conf (read notes). Mine contains:

1
2
3
4
5
6
7
8
9
10
11

CPUTYPE?= core2

NO_LPR= YES
NO_NIS= YES
CUPS_OVERWRITE_BASE= YES
NO_INET6= YES

WITH_NVIDIA_GL= YES
WITH_NVIDIA= YES
WITHOUT_NOUVEAU= YES

# script /var/tmp/buildworld-$(date "+%Y%m%d%H%M.%S")

# make -jX buildworld
( where X == number of CPUs + 1 )

# exit
# script /var/tmp/buildkernel-$(date "+%Y%m%d%H%M.%S")

# make buildkernel KODIR=/boot/testing KERNCONF=CUSTOM64
( where CUSTOM64 is documented here )

# make installkernel KODIR=/boot/testing KERNCONF=CUSTOM64
# exit
# nextboot -k testing
# shutdown -r now

# cd /boot
# rm -r -f OLD
# mv kernel OLD
# mv testing kernel

# adjkerntz -i
# rm -rf /etc.old && cp -Rp /etc /etc.old
# mergemaster -p
# cd /usr/src
# make installworld
# mergemaster -iU
# make delete-old
# shutdown -r now

NB: NO_NIS in /etc/make.conf requires the following changes in /etc/nsswitch.conf:

1
2
3

group: files
passwd: files

If you’re feeling game, you can try the following commands to save yourself some keystrokes and delays:

# csup /root/stable-supfile && rm -r -f /usr/obj && cd /usr/src && make -j5 buildworld && make buildkernel KODIR=/boot/testing KERNCONF=CUSTOM64 && make installkernel KODIR=/boot/testing KERNCONF=CUSTOM64 && cd /boot && rm -r -f OLD && mv kernel OLD && mv testing kernel && reboot

Here, you can revert back to the old kernel if you experience boot up problems. Otherwise, continue with:

# adjkerntz -i && rm -rf /etc.old && cp -Rp /etc /etc.old && mergemaster -p && cd /usr/src && make installworld && mergemaster -iU && make delete-old && reboot