Re: zpool upgrade and bootcode on 13-RELEASE

From: Dominic Fandrey <kamikaze_at_bsdforen.de>
Date: Thu, 20 May 2021 10:14:00 +0200
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
Received on Thu May 20 2021 - 08:14:00 UTC

Original text of this message