Re: bootcode update after zpool upgrade

From: Warner Losh <imp_at_bsdimp.com>
Date: Thu, 24 Feb 2022 16:55:37 UTC
On Thu, Feb 24, 2022 at 4:49 AM Miroslav Lachman <000.fbsd@quip.cz> wrote:

> On 24/02/2022 10:43, Alexander Leidinger wrote:
> > Quoting Miroslav Lachman <000.fbsd@quip.cz> (from Wed, 23 Feb 2022
>
> >> I am not sure what I should update. This machine is EFI boot only
> >> (this is the only one EFI machine we have).
> >
> >> Should I run:
> >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 nvd0
> >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 nvd1
> >
> > This is the bootcode zpool upgrade talks about.
> >
> >> Or should I update EFI partitions? (if so, then how?)
> >
> > The EFI partition contains the loader, not the bootcode.
> >
> > While we are at it, I'm still looking for the place where I can find
> > which features the bootcode supports. Not all features are supported for
> > a root pool.
>
> Thank you for the clarification!
>

If you've updated your ZFS pool and have an old system, you do need to
update
the EFI boot code. None of the mbr stuff is used for EFI booting.

If you have an old installation, it may be small. So ideally, you'd copy
over /boot/loader.efi
to ESP:efi/boot/bootx64.efi. However, it may be too big if you have an ESP
created by the
old installer. In that case, you'll need to either create a new, larger
ESP, or copying /boot/boot1.efi
instead.

Warner