Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
I have a 3.3-RELEASE box which is destined to become an http/ftp server for a client
(see Installing an ftp server). That should go active
next week. But first I want to upgrade this box to 3.3-STABLE. This is how I
did it.
Note that I am doing a binary upgrade. You could achieve the same thing by
using cvsup and then doing a make world. But this machine is a
486. That might take several days. This procedure took less than four hours
elapsed.
Before you start this, you may want to install mergemaster
first.
You might also want to make a record of this information.
Run dmesg and keep a copy of the output where you can read it if your system
can't reboot.
Record the contents of /etc/fstab in case you need it.
Know your encryption method - a tip
You may not need to know this information right now, but you might need it one day.
Sometimes,
when upgrading, people mess up their encryption. If you get asked what encryption
method to use, make sure you specify the right one. Typically, systems use either
MD5 or DES. Use http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/security.html
to decide what you are using.
You should do that before you exit systinstall
from the previous step. The easiest way to do this is by running /stand/sysinstall
as root, choosing Configure, then Distributions, then src,
then sys.
Similarly, I installed the man pages for this version. Why two steps? No
reason.
mergemaster
The next step is to merge the new file changes and the old file changes. This
sounds like a complex step. The first time you do this, it will seem complicated.
But it's pretty straight forward. What you are doing with mergemaster is comparing the BEFORE and AFTER images
of the system files. You take the ones you want and reject the ones you don't.
Basically, you want to take the bits which have been added by the upgrade process and keep
the bits you have added. Sometimes these two choice conflict but only you can decide
which is the best option. You have a backup. You can always refer to that.
When
I ran mergemaster, I issued the following command:
mergemaster -rsv -t /etc/upgrade -w180 -s /etc
Actually, I found this failed. So I did this instead:
cd /etc/upgrade
mkdir etc
mv * etc
I just ignored the error message the above move will create. It will try to move
etc into etc. But that's OK. It will fail and everything will be OK.
Then run the mergemaster command from above.
After rebooting, here's what the system looks like:
# dmesg | head -5
Copyright (c) 1992-1999 FreeBSD Inc.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.
All rights reserved.
FreeBSD 3.3-19991206-SNAP #0: Mon Dec 6 21:24:37 NZDT 1999
root@yourbox.yourdomain.org:/usr/src/sys/compile/YOURKERNEL
And here's this too:
# uname -a
FreeBSD yourbox.yourdomain.org 3.3-19991206-SNAP
FreeBSD 3.3-19991206-SNAP #0:
Mon Dec 6 21:24:37 NZDT 1999
root@yourbox.yourdomain.org:/usr/src/sys/compile/SYNERGY i386
You may have to upgrade other ports. If you suddenly find an application which
no longer runs, and you have just upgraded your system, try recompiling the port.
That should fix it.
Oh oh!
Those of you that read the article the first time will have missed this bit. I
discovered a few hours after publishing that proftpd
was broken. Specifically, anonymous login worked, but regular users could not log
in. The error message was:
Dec 6 23:00:15 synergy proftpd[346]: unable to resolve symbol:
pam_sm_close_session
Dec 6 23:00:16 synergy proftpd[346]: PAM(dan): Authentication
failure
Dec 6 23:00:16 synergy proftpd[346]: USER dan: incorrect
password from
yourbox.yourdomain.org [10.0.0.20]
to 10.0.0.100:21
So I recompiled propftpd. But I needed to do more than that. See proftpd and FreeBSD