====== Upgrading FreeBSD ====== This article only shows how to do upgrades across releases. It is fairly straight forward, though like any OS, doing a major upgrade of this type requires patience, especially as with FreeBSD the entire ports and binary libraries are upgraded also. ===== Quick and Dirty ===== For now, a simple block of code followed by some references. This is for upgrading a FreeBSD system, possibly to a new release. This only works for the RELEASE installations. You can upgrade to a new minor version or, jump to a major. These are the commands I used to upgrade from FreeBSD 14.1 to FreeBSD 15.0 === Useful, common commands === * Determine if you need to reboot. If your installed and running kernels are different, you need to reboot. freebsd-version -k ; uname -r * Roll back to the last snapshot. If you installed using ZFS for your root partition (commonly called zfs_root), freebsd-update will take a snapshot before doing anything that might mess you up. If you run into a problem, you can recover the way it was at the last update with freebsd-update rollback === Commands === # This is NOT a script. Just a list of commands you should # manually enter. # # first, get all binary updates available for system freebsd-update fetch # now, install them freebsd-update install # Now, ready for a new version. # jump over this block if you're not upgrading versions freebsd-update -r 15.0-RELEASE upgrade # Download files necessary for the upgrade freebsd-update install # First time will upgrade the kernel reboot # so you need to reboot freebsd-update install # picks up where it left off and installs the rest # upgrade the package managers pkg-static upgrade -f # upgrade pkg portmaster -af # upgrade ports # Now, finish the install freebsd-update install # finish the install === Discussion === The first section is just doing an update of the existing system. This is all you normally need to do, if you also run **pkg update/upgrade** afterwards. The second section downloads the new version, then installs the new kernel. You can see the new kernel with the instructions above. Since the kernel has changed, you have to reboot. running freebsd-updaate install a second time will install almost everything else. **NOTE**: This is the point where you will have a lot of interactions, from resolving conflicts to validating the decisions the installer made. Now, we get to the time when we can upgrade our packages, including //pkg// itself. pkg-static is designed for this. You will get a lot of upgrades out of this, but not require much interaction. Never uses ports, but I assume //portmaster -af// recompiles everything. The last section is just a final //freebsd-update install// just in case it is necessary. ===== Resources ===== * [[https://www.freebsd.org/releases/]] is a list of current releases * [[https://www.freebsd.org/releases/10.3R/installation.html]] are the notes for 10.3 * [[https://www.freebsd.org/ports/index.html]]