How to update a FreeBSD system using sysinstall

From ArticleWorld


If you are using FreeBSD, you will usually want to stay up-to-date with your system. Regularly refreshing the ports list and making the world file will obviously be enough in general, but if you want to move to a different release, you will obviously prefer to update instead of re-installing everything and manually restore settings.

There are several ways to do this. This guide covers the most accessible of them: using sysinstall. Sysinstall is the program that starts up when you boot from a FreeBSD CD or DVD. It is also installed for you, so that you can perform post-installation operations as well.

Procedure

  1. Get the install image of the release you want to update to. The first CD will be enough if you have a good Internet connection. If not, get all the ISOs for your platform, and, if possible, try to get access to a packages repository.
  2. Boot from the install media (floppy, CD, DVD etc). This will present you with a graphic menu after booting.
  3. Choose Upgrade from the menu. This will take you to a screen full of text, which contains the Upgrade notes of that version. Read it thoroughly, and, if possible, check FreeBSD's official site (http://www.freebsd.org) for the errata. It also contains some additional instructions which you should follow if they apply for your system.
  4. When asked if you want to proceed with the upgrade, choose yes. This will take you to a new screen where you will select what distribution sets you want to upgrade. Of course, this requires that you already know what distribution sets you installed at first. You should upgrade the bin distribution anyway, but choose carefully. A serious problem is upgrading the software, but not the documentation, ending up with documentation written for another version than what you have on your computer.
  5. Continue normally, as if installing. You will get to a screen where you will be asked where to backup the /etc directory. By default, this is /usr/tmp/etc, but if you need something else, be sure to specify it here. Do not lose this backup. Something may not be detected correctly during the installation, or, since nothing is quite perfect in software, things may go horribly wrong. Use this as a reference and, as a precaution, try to run a diff check over them to make sure you understand any changes done.
  6. When asked about the installation media, you should choose the most appropriate one. If you have a good connection, you should definitely go for an Internet source, either FTP or HTTP.
  7. Finishing this will take you to a new screen, where you are asked, for one last time, if you changed your mind. If you still want to proceed, do so. The procedure will surely take a while.
  8. When it has finished, it is vital that you review your /etc files. Things like passwords, groups and fstab remain the same, but others, like shells or rc.conf will probably change. Review them and make changes if you have to. If you do not understand something, read and ask if you are still stuck.

Notes

It may be useful to backup the system if it is so vital that you cannot afford to lose it. Upgrades fail very rarely, but this may happen.