Re: zpool upgrade and bootcode on 13-RELEASE

From: Michael Gmelin <freebsd_at_grem.de>
Date: Thu, 20 May 2021 11:30:44 +0200
On Thu, 20 May 2021 10:14:00 +0200
Dominic Fandrey <kamikaze_at_bsdforen.de> wrote:

> On 19/05/2021 15:37, Michael Gmelin wrote:
> > Quick question:
> > 
> > When upgrading a zpool, there used to be a message like this:
> > 
> >    If you boot from pool 'zroot', don't forget to update boot code.
> >    Assuming you use GPT partitioning and da0 is your boot disk
> >    the following command will do it:
> > 
> >            gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1
> > da0  
> 
> 
> ports-mgmt/bsdadminscripts2 comes with a loader updater for GPT
> partitioned drives, it has a --dry-run mode to show you what it does:
> 
> root# loaderupdate -D nvd0
> gpart bootcode -b/boot/pmbr nvd0
> gpart bootcode -p/boot/gptzfsboot -i1 nvd0
> mkdir -p nvd0p2
> mount -tmsdosfs -osync /dev/nvd0p2 nvd0p2
> mkdir -p nvd0p2/efi/FreeBSD
> cp /boot/loader.efi nvd0p2/efi/FreeBSD/bootamd64.efi
> efibootmgr -Bb 0001
> efibootmgr -cl nvd0p2:/efi/FreeBSD/bootamd64.efi -L 'FreeBSD
> 13.0-STABLE #11 stable/13-n245147-ee389afecf85: Fri Apr  9 10:16:57
> CEST 2021 amd64 [nvd0p2]' efibootmgr -ab 0001

Thanks, this looks useful, I might take a look at it for future use.

My question wasn't *how* to update the bootloader though (I've been
doing this for almost a decade now), but *if* it was still necessary
after running 'zpool upgrade', given that the warning message that used
to be there disappeared in 13. This has been been answered, thanks
again.

I opened a PR asking to bring a similar warning back in, let's see if
that's easily possible, given that we're using OpenZFS as the upstream
now.

Cheers,
Michael

-- 
Michael Gmelin
Received on Thu May 20 2021 - 09:30:44 UTC

Original text of this message