Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 2021 10:14:00 +0200
From:      Dominic Fandrey <kamikaze@bsdforen.de>
To:        Michael Gmelin <freebsd@grem.de>, current@freebsd.org
Subject:   Re: zpool upgrade and bootcode on 13-RELEASE
Message-ID:  <5be6d214-7175-2a85-fc28-6e47de419b53@bsdforen.de>
In-Reply-To: <20210519153757.4e00e96f@bsd64.grem.de>
References:  <20210519153757.4e00e96f@bsd64.grem.de>

next in thread | previous in thread | raw e-mail | index | archive | help


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5be6d214-7175-2a85-fc28-6e47de419b53>