A service of Daily Data, Inc.
Contact Form

User Tools

Site Tools


unix:freebsd:forlinuxadmins:upgradeos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

unix:freebsd:forlinuxadmins:upgradeos [2016/10/11 00:59] – created - external edit 127.0.0.1unix: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 from FreeBSD 14.to FreeBSD 15.0
-# 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>freebsd-version -k ; uname -r</code> 
 +  * 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>freebsd-update rollback</code> 
 + 
 +=== Commands === 
 + 
 +<code bash upgrade.sh> 
 +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 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 ports structure +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 install # picks up where it left off and installs the rest
  
-# upgrade pkg (binary) packages +# upgrade the package managers 
-pkg clean +pkg-static upgrade -f # upgrade pkg 
-pkg update +portmaster -af # upgrade ports 
-pkg upgrade+ 
 +# Now, finish the install 
 +freebsd-update install # finish the install
 </code> </code>
 +
 +=== 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 ===== ===== Resources =====
unix/freebsd/forlinuxadmins/upgradeos.txt · Last modified: by rodolico