Re: gptzfsboot cannot boot from ZFS (mirror) with "can't read MOS of pool znewroot" (FreeBSD 13.5-STABLE)

From: Volodymyr Kostyrko <arcade_at_b1t.name>
Date: Thu, 03 Apr 2025 16:07:43 UTC
03.04.25 18:21, Lev Serebryakov:
>   When I try to use `gptzfsboot`, like `gpart -b pmbr -p /boot/gptzfsboot -i 1 ada0 &&  gpart -b pmbr -p /boot/gptzfsboot -i 1 ada` boot says:
> 
> ZFS: i/o error - all block copies unavailable
> ZFS: can't read MOS of pool znewroot

Happened too, fixed with loader.efi.

>    As a hack I'm using `gtpboot` & small `freebsd-ufs` partiton with only `/boot` directory.
> 
>    But I hate this hack, as system update becomes cumbersome, and I cannot convert this system to UEFI boot (because `loader.efi` "Failed to find bootable partition").

How your partitions look like when you are trying loader.efi? Also, do 
you wipe your parition begin/end before switching so that loader.efi 
wouldn't see old ZFS magic numbers on partitions located where previous 
pool versions were?

I mean I had very similar booting issue when I moved my boot to other 
drives, and table changed from efi + zpool to efi + swap + zpool, but I 
forgot to wipe swap partitions and loader/gptzfsboot (? can't recall) 
was quite puzzled by this, failing to detect newer pool, as that one was 
overlapping already detected one.

>    What is wrong with my ZFS pool and how could I fix it?

-- 
Sphinx of black quartz judge my vow.