FreeBSD 6.1 to 6.2 binary upgrade

I've posted here before about a script I wrote for performing binary upgrades of FreeBSD 6.0 system to FreeBSD 6.1; seeing that one of the greatest difficulties of the FreeBSD release cycle is convincing people to install and test all of the -BETA and -RC (release candidate) snapshots produced, I have put (most of) this code together with the new FreeBSD Update code to produce a version of FreeBSD Update which can be used for upgrading between FreeBSD releases (and beta releases, and release candidates). I haven't committed this new version to the FreeBSD src tree yet; I'll do that once it has been more completely tested and once I've had time to upgrade the manual page.

A couple of important caveats:

  1. Unlike my earlier upgrade script, this version will not attempt to merge changes to modified configuration files; instead, it will print "The following files are affected by updates, but no changes have been downloaded because the files have been modified locally:" and output a list of such files (if any exist -- there haven't been many configuration file changes between 6.1 and 6.2, so this won't affect many people). If this message appears, you must manually update those configuration files (FreeBSD's cvsweb is very useful for figuring out what changes need to be merged). I'm planning on adding code for automatically merging configuration files changes, but I haven't done this yet.
  2. FreeBSD Update only updates parts of FreeBSD which (a) exist on your system, and (b) are distributed on the released ISO images. This means that if you do not have a GENERIC or SMP kernel installed, FreeBSD Update will not install any kernel updates. In this case, you must update your kernel before installing updates which FreeBSD Update has downloaded (having a userland which is newer than the kernel is liable to render a system inoperative).

Without further ado, here's a "walkthrough" of upgrading a FreeBSD 6.1-RELEASE system to 6.2-RC1:

# mkdir /usr/upgrade
# cd /usr/upgrade
# fetch http://www.daemonology.net/freebsd-update/upgrade-to-6.2.tgz
upgrade-to-6.2.tgz 100% of 17 kB 14 MBps
# fetch http://www.daemonology.net/freebsd-update/upgrade-to-6.2.tgz.asc
upgrade-to-6.2.tgz.asc 100% of 187 B 686 kBps
# gpg --verify upgrade-to-6.2.tgz.asc upgrade-to-6.2.tgz
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: Signature made Sat Nov 25 08:35:31 2006 PST using DSA key ID CA6CDFB2
gpg: Good signature from "FreeBSD Security Officer <security-officer@FreeBSD.org>"
As FreeBSD Security Officer, I have signed the tarball containing my script. I recommend verifying the signature with gpg, but I know that most people won't...
# tar -xzf upgrade-to-6.2.tgz
# cd upgrade-to-6.2
# sh freebsd-update.sh -f freebsd-update.conf -d /usr/upgrade -r 6.2-RC1 upgrade
Looking up update.FreeBSD.org mirrors... 1 mirrors found.
Fetching public key from update1.FreeBSD.org... done.
Fetching metadata signature for 6.1-RELEASE from update1.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 world/base world/dict world/doc world/manpages

The following components of FreeBSD do not seem to be installed:
kernel/smp 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/catpages world/games world/info world/proflibs

Does this look reasonable (y/n)? y

Fetching metadata signature for 6.2-RC1 from update1.FreeBSD.org...
done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 2638 patches.....10....20.. [snip] ..2630.... done.
Applying patches... done.
Fetching 243 files... done.

The following files will be removed as part of updating to 6.2-RC1-p0:
/etc/periodic/weekly/120.clean-kvmdb
/usr/include/c++/3.4/ext/demangle.h
[snip]
/usr/share/doc/en_US.ISO8859-1/books/porters-handbook/x906.html
/usr/share/zoneinfo/America/Coral_Harbour

The following files will be added as part of updating to 6.2-RC1-p0:
/bin/pgrep
/bin/pkill
[snip]
/usr/share/zoneinfo/Europe/Volgograd
/var/db/freebsd-update

The following files will be updated as part of updating to 6.2-RC1-p0:
/bin/[
/bin/cat
[snip]
/usr/share/zoneinfo/zone.tab
/var/yp/Makefile.dist
# sh freebsd-update.sh -f freebsd-update.conf -d /usr/upgrade install
Installing updates...
Kernel updates have been installed. Please
reboot and run "freebsd-update.sh install" again to
finish installing updates.
At this point, the system has a 6.2-RC1 kernel installed along with the 6.1-RELEASE userland. At this point, rebooting is essential, in order to get into the new kernel before installing the userland updates. After rebooting...
# cd /usr/upgrade/upgrade-to-6.2
# sh freebsd-update.sh -f freebsd-update.conf -d /usr/upgrade install
Installing updates... done.
One more reboot (to start the updated sshd and other daemons), and the system has been fully updated to FreeBSD 6.2-RC1. When -RC2 is released, I'll repeat this process -- taking no more than 10 minutes per system -- and again when 6.2-RELEASE comes out.

Go upgrade some systems and help make FreeBSD 6.2 the best-tested FreeBSD release ever!

Posted at 2006-11-26 13:30 | Permanent link | Comments

Dell DVD-RW diagnostics errors

The Dell diagnostics, version 1295.0, on Latitude D620 (and possibly other) laptops appear to contain a bug wherein they will incorrectly report errors on DVD-RW drives.

The symptoms include

Some of these errors do not occur when the diagnostics are first run, but occur after a CD has been removed and re-inserted.

I don't expect any of the regular readers of my Daemonic Dispatches will be affected by this problem, but hopefully by posting this where search engines can find it, I'll save someone a few days of agony; I've just been through two DVD drive replacements and a motherboard replacement before discovering that the diagnostics fail on other (completely operational) hardware.

Posted at 2006-11-03 01:00 | Permanent link | Comments

Recent posts

Monthly Archives

Yearly Archives


RSS