The best way to upgrade FreeBSD to the next release version?

Hello there,

New here, I have being using FreeBSD 14-Release. I'm using my desktop so save all my photos and as a backup from my cellphone. In Linux, I know that I can have a separate /home partition and if I need to reinstall, I can still have all my data there; however, I don't know how to do that slice in FreeBSD, every time that I want to do so, the system doesn't start. Also, I want to know if the auto ZFS option already add that slice and if all my data will be there if I need to reinstall? Also, I have read the handbook; however, I don't know if reinstalling is the best way to upgrade FreeBSD to the next release or just upgrade 14-Release to 15-Release (once it's ready) will be ok?
 
1. With ZFS, you use datasets. The installer automatically creates one for /home (until recently /usr/home), see https://cgit.freebsd.org/src/tree/usr.sbin/bsdinstall/scripts/zfsboot#n153 ... you can list your datasets with zfs list.

2. Independent of that, freebsd-update(8) automatically creates a boot environment (read about them, see also bectl(8)!) of the old state, so you have an instant rollback option if anything goes wrong. The boot environment includes everything that doesn't have a specific ZFS dataset. Note the dataset for /usr is "fake", it has the "nomount" option and is just used as an anchor for specific datasets below /usr, while anything else there will remain part of the boot environment's dataset.

In a nutshell, just follow the handbook for upgrading with freebsd-update(8). Especially when you're on ZFS, you're prepared for everything. Take extra care if you want to upgrade your ZFS pool afterwards though, this can't be rolled back (so the older boot environment won't work any more) and requires installing the upgraded boot code as well.
 
Take extra care if you want to upgrade your ZFS pool afterwards though
Elaborating on this, I recommend the following approach:
  1. Test operation of the new release for a few weeks (long enough to be sure it works fine for you and you won't need to roll back).
  2. Install the new boot code. How to do this depends on how you boot (EFI or "legacy" BIOS) and then optionally on a few other things, e.g. your partitioning scheme, or whether/how you use multi-boot with EFI... test that the system boots fine with the new boot code.
  3. Only then, issue zpool upgrade to finally upgrade your ZFS pool.
  4. Now you can delete your old boot environment with bectl(8).
 
Set up some test machines or virtual machines and have a play - you could set up a dummy 13.2 system then upgrade to 14.0.

If you make any mistakes you learn from them on test environments.
 
Elaborating on this, I recommend the following approach:
  1. Test operation of the new release for a few weeks (long enough to be sure it works fine for you and you won't need to roll back).
  2. Install the new boot code. How to do this depends on how you boot (EFI or "legacy" BIOS) and then optionally on a few other things, e.g. your partitioning scheme, or whether/how you use multi-boot with EFI... test that the system boots fine with the new boot code.
  3. Only then, issue zpool upgrade to finally upgrade your ZFS pool.
  4. Now you can delete your old boot environment with bectl(8).
Thank you for your answer. I have EFI, the partitioning sheme is the default of the installer.
 
Back
Top