This post is based on the Chapter 25 of the official FreeBSD handbook. My version was the initial release of 8.2 using a generic kernel:
uname -a FreeBSD acidjazz.chombe.org 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011 [email protected]:/usr/obj/usr/src/sys/GENERIC i386
First, make sure you start with a rebooted OS and make a copy of the /etc directory. Then do:
freebsd-update -r 9.1-RELEASE upgrade
After a second or two, I received a very funny error.
The update metadata is correctly signed, but failed an integrity check.
Cowardly refusing to proceed any further.
At this point, execute:
sed -i '' -e 's/=_/=%@_/' /usr/sbin/freebsd-update freebsd-update -r 9.1-RELEASE upgrade
Say “y” and wait for some time for FreeBSD to inspect and download the necessary files.
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 8.2-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
The following components of FreeBSD seem to be installed:
kernel/generic src/base src/bin src/cddl 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/dict world/doc world/info world/manpages
world/proflibs
The following components of FreeBSD do not seem to be installed:
world/catpages world/games
Does this look reasonable (y/n)? y
Fetching metadata signature for 9.1-RELEASE from update5.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Fetching files from 8.2-RELEASE for merging... done.
Preparing to download files...
About 30 minutes later, on my VM, which is very low on resources (8GB HDD, 512MB RAM), you’ll be greeted with the “message of the day” /etc/motd. Just do “:q!”
You’ll get another prompt about new groups in /etc/groups. Say “y” to continue.
Same thing for /etc/hosts, /etc/manpath.config, /etc/master.passwd, /etc/motd, /etc/passwd, /etc/syslog.conf, /etc… That’s why it is important to make a backup of /etc as suggested earlier.
Hit “CTRL-C”, when you see the list of files that will be removed as part of the upgrade.
Then do:
freebsd-update install
Once everything is completed, do:
shutdown -r now
….and then do:
freebsd-update install
again…
After the update finishes, you’ll see this message.
The next part shows how to do the same.