daemonology.net instructions - binary upgrade 5.3 to 6.1

Hans F. Nordhaug Hans.F.Nordhaug at hiMolde.no
Fri May 18 23:27:12 UTC 2007


* Colin Percival <cperciva at freebsd.org> [2006-10-20]:
> Hans F. Nordhaug wrote:
> > At daemonology.net Colin Percival has some excellent instructions on
> > how to do binary upgrades - he has even written a script to do a 6.0
> > to 6.1 upgrade. My question is: Can I do a 5.3 to 6.1 upgrade using
> > the instructions for "5.4 system to FreeBSD 6.0" - see
> > http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/
> > Or, should I upgrade 5.3 to 6.0 and finally use the script to
> > get from 6.0 to 6.1? I assume the former, but just want to be sure.
> 
> Either option will probably work; but I've never done a 5.3->6.0 binary
> upgrade directly, so I can't guarantee that it will work. :-)

OK, I finally had some time to upgrade my server, and I ended up
doing an upgrade from 5.3 to 6.2 directly following your instructions on

    http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/

It didn't go very well. It took me many hours to find out what went
wrong - the kernel wasn't upgraded. (I was running with a 6.2
userland and a 5.3 kernel.) Digging some more I found the
problem: In step 7 we generate /usr/base.tgz by doing

    cat /mnt/6.0-RELEASE/${dist}/${dist}.?? > /usr/${dist}.tgz

(where $dist is one of base dict doc manpages) or in my case

    cat /mnt/6.2-RELEASE/${dist}/${dist}.?? > /usr/${dist}.tgz

If you look at the base.tgz created from 6.2-RELEASE-i386-disc1.iso
you'll notice it contains an empty /boot/kernel directory !!!
If you look at the /boot/kernel directory of the CD everything is
present ... I wonder if this a mistake when creating the 
6.2-RELEASE/base/base.?? files on the disc or if this is an
intentional change from 6.0 to 6.2?  After getting the new kernel in
place things turned out OK.

Well, actually I got a new surprise - all my config files were
overwritten. I created the file /root/base-modified (as explained in
the instructions). I then did

    for dist in base dict doc manpages catpages info; 
    do 
        /rescue/tar -Uxpzf /usr/${dist}.tgz -X /root/base-modified -C /
    done

as explained, but still the files in /etc was overwritten - for
example /etc/passwd even if that file is listed in
/root/base-modified. Could it be that /rescue/tar is seeing
"etc/passwd" in base.tgz and hence doesn't exclude "/etc/passwd".
Anyway, I did have a back-up.

Regards, Hans

PS! In step 17 - portsnap has moved in the Ports collection. The new
    location /usr/ports/ports-mgmt/portsnap.

@Colin: I'm not in anyway blaming you - I'm completely aware of the
fact that the instructions were for 5.4 -> 6.0. I'm just sharing my 
experience if someone considers doing a 5.X -> 6.2 upgrade...


More information about the freebsd-stable mailing list