unix:freebsd:forlinuxadmins:upgradeos
Differences
This shows you the differences between two versions of the page.
| unix:freebsd:forlinuxadmins:upgradeos [2016/10/11 00:59] – created - external edit 127.0.0.1 | unix:freebsd:forlinuxadmins:upgradeos [2026/02/03 21:16] (current) – rodolico | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ===== Quick and Dirty ===== | ===== Quick and Dirty ===== | ||
| - | For now, a simple block of code followed by some references | + | 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. |
| - | <code bash upgrade.sh> | + | These are the commands I used to upgrade |
| - | # NOTE: this is NOT a bash script. For one thing, sh is used for BSD | + | |
| - | # and for another, there are several places where you have to provide input | + | |
| - | # get latest release info | + | === Useful, common commands === |
| + | * Determine if you need to reboot. If your installed and running kernels are different, you need to reboot. <code bash> | ||
| + | * 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 <code bash> | ||
| + | |||
| + | === Commands === | ||
| + | |||
| + | <code bash upgrade.sh> | ||
| + | # This is NOT a script. Just a list of commands you should | ||
| + | # manually enter. | ||
| + | # | ||
| + | # first, | ||
| freebsd-update fetch | freebsd-update fetch | ||
| + | # now, install them | ||
| freebsd-update install | freebsd-update install | ||
| - | # download upgrade files. Change the 10.3-RELEASE to | ||
| - | # whatever release you are upgrading to. | ||
| - | freebsd-update upgrade -r 10.3-RELEASE | ||
| - | # do the initial upgrade | ||
| - | freebsd-update install | ||
| - | # reboot | ||
| - | shutdown -r now | ||
| - | # update everything else | ||
| - | freebsd-update install | ||
| - | shutdown -r now | ||
| - | # upgrade | + | # Now, ready for a new version. |
| - | portsnap fetch | + | # jump over this block if you're not upgrading versions |
| - | portsnap extract | + | freebsd-update -r 15.0-RELEASE upgrade # Download files necessary for the upgrade |
| - | portsnap fetch update | + | freebsd-update install # First time will upgrade the kernel |
| + | reboot # so you need to reboot | ||
| + | freebsd-update | ||
| - | # upgrade | + | # upgrade |
| - | pkg clean | + | pkg-static upgrade -f # upgrade |
| - | pkg update | + | portmaster -af # upgrade |
| - | pkg upgrade | + | |
| + | # 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/ | ||
| + | |||
| + | 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, | ||
| + | |||
| + | 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 // | ||
| + | |||
| + | The last section is just a final // | ||
| + | |||
| + | |||
| ===== Resources ===== | ===== Resources ===== | ||
unix/freebsd/forlinuxadmins/upgradeos.txt · Last modified: by rodolico
