(Disclaimer: I'm a noob. Structure your replies accordingly.)
I installed FreeBSD 13.0-RELEASE last fall with the help of this forum. I haven't updated the computer since then, and have basically just ensured that, with my current install, the OS and KDE work and I am able to use Firefox. Therefore, I need to patch my computer (a Lenovo ThinkPad X270).
I started by reading the relevant chapter in Absolute FreeBSD by Michael W. Lucas. In it, he writes, "If you're using ZFS, always create a new boot environment before upgrading or patching!" Because he used an exclamation mark, I take it this is an important point. Since he doesn't provide any other information on new boot environments, I did a web search and found a blog post he made on the topic. To me, ZFS boot environments (beadm) sound like a great, though probably unnecessary, feature.
I will save readers the time of typing out instructions and post what I think are the instructions for updating to the latest patch level while using beadm. Keep in mind I am a complete noob and have never updated FreeBSD before, so readers should look over these instructions carefully and let me know if this is the correct process.
I installed FreeBSD 13.0-RELEASE last fall with the help of this forum. I haven't updated the computer since then, and have basically just ensured that, with my current install, the OS and KDE work and I am able to use Firefox. Therefore, I need to patch my computer (a Lenovo ThinkPad X270).
I started by reading the relevant chapter in Absolute FreeBSD by Michael W. Lucas. In it, he writes, "If you're using ZFS, always create a new boot environment before upgrading or patching!" Because he used an exclamation mark, I take it this is an important point. Since he doesn't provide any other information on new boot environments, I did a web search and found a blog post he made on the topic. To me, ZFS boot environments (beadm) sound like a great, though probably unnecessary, feature.
I will save readers the time of typing out instructions and post what I think are the instructions for updating to the latest patch level while using beadm. Keep in mind I am a complete noob and have never updated FreeBSD before, so readers should look over these instructions carefully and let me know if this is the correct process.
- Starting with the link to the author's blog post, I will install beadm first. Since I've already used
# pkg install
to install KDE and Firefox, I take it I can skip his first instruction of running the aforementioned instruction to set up the package management system.
# pkg install -y beadm
- Next, see which boot environments I have.
# beadm list
BE Active Mountpoint Space Created
default NR / 494.0M 2015-04-08 07:18
The code underneath the command was taken from his blog post. He notes, "The only boot environment is named default. Under active, N means the environment is active now. An R means the environment will be active on reboot." - I am going to update the host to the latest version of FreeBSD 13.0, p#. Someone please tell me how I can find the latest patch level of FreeBSD 13.0, so I know what to name the boot environment(!!!). In every instance, the number sign ("#") should be replaced with the number of the current patch level. I'll name the boot environment after the latest release and patch level.
# beadm create 13.0-p#
Created successfully
# beadm list
BE Active Mountpoint Space Created
default N / 186.0K 2015-04-08 07:18
13.0-p# R - 646.2M 2015-04-08 11:43 - Activate the new boot environment.
# beadm activate 13.0-p#
Activated successfully
# beadm list
BE Active Mountpoint Space Created
default N / 186.0K 2015-04-08 07:18
13.0-p# R - 646.2M 2015-04-08 11:43
He notes, "While the default environment has an N, indicating it’s active now, the 10.1-p9 environment has an R, so it will be active after a reboot." - He writes, "Reboot. After the reboot, you’ll see the new environment is running."
# shutdown -r now
# beadm list
BE Active Mountpoint Space Created
default - - 538.0K 2015-04-08 07:18
13.0-p# NR / 646.3M 2015-04-08 11:43 - He writes, "Now I can install the latest FreeBSD patches without damaging my default system. If it fails, I can fall back by activating the default boot environment."
What follows are how I understand one should update to the latest patch level on FreeBSD. Please correct me if I'm wrong. N.B.: In Absolute FreeBSD, which was published in 2018, the author includes the following footnote: "Various FreeBSD developers have spent the last several releases working toward packaging the base system so that the packaging tools can handle upgrades. I expect that the release of this book will prompt them to immediately solve the remaining problems and obsolete this section." Does anyone know what this means? Is he saying this section ("Binary Updates" in the chapter "Upgrading FreeBSD") is will be or already is obsolete, thereby making# freebsd-update
obsolete? I see the FreeBSD Handbook advises updating to the latest patch level the same way as the book, so it's probably not obsolete yet--if this is what he's talking about. Should I check with the FreeBSD Handbook before doing every update or upgrade to make sure the instructions are current?
# freebsd-update fetch
# freebsd-update install - Is there anything else I'm supposed to do?