Upgrade Operating System

From The Network People, Inc.

Jump to: navigation, search

[edit] FreeBSD instructions

The best advise is to follow the excellent docs at http://www.freebsd.org/handbook/ Follow the directions for updating. There are more specific instructions for upgrading from FreeBSD 4. A few things to help you along are:

toaster_setup.pl -s sources
toaster_setup.pl -s ports

That will update your FreeBSD sources and ports tree with the latest versions. Then upgrade FreeBSD. I do it this way:

cd /usr/src
make buildworld
make kernel
mergemaster -p
reboot
cd /usr/src
make installworld
mergemaster
reboot

The process will vary based on the version of FreeBSD you are upgrading from and to. The above assumes that I have also configured /etc/make.conf. It is best to read the docs first, including /usr/src/UPDATING. Failure to do so can be quite difficult to recover from. If you are upgrading from FreeBSD 4.x to 5.x, be extra careful to follow the instructions exactly.

[edit] Upgrade your ports

After upgrading major OS versions, upgrade all the installed ports. I do so like this:

toaster_setup.pl -s ports

This step uses portsnap to download and update your ports tree.

pkgdb -F

Run this command until you have fixed all the problems found. If ports are missing, install them. If duplicates are detected, remove the oldest ones. Once pkgdb -F runs without complaints, you can use portupgrade to upgrade your installed ports. Be sure to read the portupgrade notes.

portupgrade -ai

Be very careful when upgrading ports that are manually installed by the toaster, such as qmail, vpopmail, and ucspi, etc. You have been warned. If you let portupgrade reinstall qmail and your settings get wiped out, you have yourself to blame.

To make the portupgrade process much less likely to blow up on you, a customized pkgtools.conf file is included in the contrib directory of Mail::Toaster. Install or merge its contents into /usr/local/etc/pkgtools.conf and that will instruct portupgrade to do The Right Stuff when it upgrades certain ports.

Finally, it is always a good idea to read /usr/ports/UPDATING before running portupgrade. The ports team is very good about documenting changes that affect a given port. If you read it before breaking your Mail::Toaster with portupgrade, you will have a pretty good idea why something behaves differently after the upgrade, and a better idea of how you can fix it.


Personal tools