I’ve been putting off upgrading my remotely hosted server from FreeBSD 5.2.1 for a while now, but after I started getting random problems I decided I had to move forward.
To start with there were a few reasons putting me off doing the upgrade:
- From version 5.3 of FreeBSD vinum was pretty much broken, so I’d need to switch to gvinum.
- The threading library changed from libc_r to libpthread.
- A handful of key libraries in /lib and /usr/lib had their versions bumped.
The first problem is pretty straightforward to work around. Changing “vinum_load” to “gvinum_load” in /boot/loader.conf, and changing “vinum” to “gvinum” in /etc/fstab was all it took. To be on the safe side I did a fsck of the filesystems after rebooting in to 5.5.
The other two problems can be dealt with after a reboot by rebuilding all the applications on the machine. This is as simple as running “portupgrade -af”, but I chose to do it in chunks so I could get key things up and running quickly. One trick I used was to touch a file in each directory under /var/db/pkg, which would get removed when the package was upgraded. This allowed me to easily see what I still needed to do.
Most of this information was gathered from looking at mailing list archives and most importantly from reading /usr/src/UPDATING.
So, what problems had I been having before this that forced me to do the upgrade?
- When piping a message to a command in mutt the pipe would never close. So, for example, piping to cat would display the message and then just hang.
- PHP would hang when applications used the PHP mail() function; this forked sendmail and piped the message to it. I suspect this is the same problem as above.
- Various things, most noticeably MySQL 5, would not compile. The problem was the recent libtool upgrade; libtool filters out -lc_r linker arguments.
After doing the upgrade these problems went away. The whole procedure was far less painful than I had been expecting.
Of course, the next challenge is upgrading to RELENG_6. But maybe I’ll leave that for another couple of years… 🙂