Re: Replacing a REMOVED drive in DEGRADED zpool

From: David Christensen <dpchrist_at_holgerdanske.com>
Date: Fri, 22 Aug 2025 20:11:47 UTC
On 8/22/25 08:21, Dag-Erling Smørgrav wrote:
> Robert <robert@webtent.org> writes:
>> So, I would not need to examine the disks for the same MBR and just
>> use the gpart bootcode above on the new disk?
> 
> Yes.  And if you haven't done so in a while (i.e. not since your last
> upgrade), I would run `gpart bootcode` on all disks.  You can combine -b
> and -p in a single command, e.g.
> 
>      gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
> 
> DES


Thank you for clarifying the straight-forward method for installing the 
MBR bootstrap code and the FreeBSD boot partition bootloader code.


In the general case, the FreeBSD installer or sysadmin needs to figure 
out which bootcode to use, which partcode to use, and which geom to use. 
  I have RTFM gpart(8) several times now, but it is taking me a while to 
get a mental picture of the FreeBSD bootstrap decision tree formed by 
firmware (BIOS vs. UEFI) and sysamin choices (partition/slice scheme, 
volume management, filesystem, etc.).  Is there a single document that 
clearly explains all of this stuff?


David