Solved "After a system upgrade, but before doing a zpool upgrade, the boot loader on the ESP must be updated, or the system may become unbootable."

Dear Everyone,

The release notes for 14.0-RELEASE state, "After a system upgrade, but before doing a zpool upgrade, the boot loader on the ESP must be updated, or the system may become unbootable." My question, in great brevity, is, "How?" (when the system is purely UEFI GPT)

Having looked at https://forums.freebsd.org/threads/freebsd-zfs-upgrade-best-practice-question.91070/unread and https://forums.freebsd.org/threads/...boot-code-and-stuck-at-efi-shell.91035/unread, for instance, and ducked around for a good while, I still have not understood the correct way to accomplish the updating of the boot loader.

In DuckDuckGo search results, I have come across plenty of instructions on how to handle MBR environments and how to handle MBR on a UEFI machine, and, if I know how to read, zero on how to handle ONLY GPT UEFI.
A reputable member here has quoted 13.0 release notes, "… To update old ESP partitions, users should stop using the gpart(8) utility. …", from which I gather that gpart is not the correct way to do it

Have I understood correctly that all I need is to copy loader.efi from the "installation source" (if I download an image file in addition to performing freebsd-update upgrade -r 14.0-RELEASE) to my EFI partitions to the right place?
Is there an actual thread or page that tells me how I go about updating the boot loader in a purely UEFI GPT system that doesn't make unnecessary and confusing references to MBR or provide instructions that may make the system unbootable?

Thank you for any help that does not confuse the confused.
 
<https://www.freebsd.org/releases/14.0R/relnotes/#upgrade>
  • focuses on EFI system partitions
  • does not mention MBR.
There was a fairly detailed review process for this section of the release notes. Not to say that it's comprehensive, but I strongly recommend making it your starting point.

HTH
Thank you, but, either I cannot read (has been known to happen) or the instructions tell me where my bootloader is. They don't appear to tell me how to update it. I am missing the crucial bit, as in "copy the updated bootloader from X to wherever your bootloader currently resides."
 
Thank you, but, either I cannot read (has been known to happen) or the instructions tell me where my bootloader is. They don't appear to tell me how to update it. I am missing the crucial bit, as in "copy the updated bootloader from X to wherever your bootloader currently resides."
That's it. I cannot read, and that's a shame because I do that for a living.

The last sentence in what I couldn't read is "Both the configured and default boot loaders should be updated by copying from /boot/loader.efi to the correct path in /boot/efi". Solved.

Edit: AND I would like to thank both Grahamperrin and Emrion for super fast responses. Grahamperrin's response points me to the page that I had read several times, without seeing the sentence I was looking for, which is the sentence I also needed.
 
Thank you for this, as well, but. Grahamperrin above has quoted a section that advises against using gpart for the process. While I found plenty of instructions on what to do with gpart, Grahamperrin's quote advising against using gpart makes me think twice.
My how-to uses gpart to identify the partition(s) to update. This has nothing to do with the warning quoted by grahamperrin.
I whish you good luck.
 
My how-to uses gpartto identify the partition(s) to update. This has nothing to do with the warning quoted by grahamperrin.
I whish you good luck.
Thank you for the good-luck wish. I will need the good luck.

As for the gpart being used to identify the partition(s) to update, yes, your how-to does that. But it also contains "gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i partition-number disk-name" and "gpart bootcode -b /boot/pmbr -p /boot/gptboot -i partition-number disk-name", which appear to do more than just identify a partition.

When one is as—dense, intimidated, or otherwise incapable, for the lack of a better description—as I am, one needs to have instructions that do not try to cater to all scenarios. And when one advisory says "thou shalt not gpart bootcode" and a how-to has gpart bootcode, I, at the least, get doubts and need confirmation.
 
quoted 13.0 release notes, "… To update old ESP partitions, users should stop using the gpart(8) utility. …",

Emrion, thanks. mikkol, you probably do, now, get the meaning of the sentence highlighted below.

For other readers, here's the sentence in context, pictured (from <https://www.freebsd.org/releases/13.0R/relnotes/#boot>):

1700697819354.png


Maybe slightly easier to understand, at a glance, with one word emphasised:

Do not use gpart(8) to update an EFI system partition.

gpart has many purposes, so, yes, it is OK to use this utility to identify a partition.
 
Back
Top