Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2023 10:12:03 -0700
From:      Xin LI <delphij@gmail.com>
To:        mike tancsa <mike@sentex.net>
Cc:        FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: RELENG_13 to 14 upgrade fail
Message-ID:  <CAGMYy3tngcCt6Hn2D08CErdsocD%2BiPR3uZjxQALb5TCV%2Bq8wVA@mail.gmail.com>
In-Reply-To: <515d5ad4-9fc8-4f86-936b-b71d8f43d564@sentex.net>
References:  <0c19b8a6-119c-4f5d-af26-d625afc7afec@sentex.net> <CAGMYy3sL%2B2BikO%2BwGakues3aFnUCL=GoEG%2BLdMVF_0gZknpBEg@mail.gmail.com> <515d5ad4-9fc8-4f86-936b-b71d8f43d564@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000004b2bde06092e7d5a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 2, 2023 at 9:50=E2=80=AFAM mike tancsa <mike@sentex.net> wrote:

> On 11/2/2023 12:39 PM, Xin LI wrote:
>
>
>
> On Thu, Nov 2, 2023 at 9:28=E2=80=AFAM mike tancsa <mike@sentex.net> wrot=
e:
>
>> On one of my VMs that I upgraded from RELENG_13 to RELENG_14, I forgot
>> to update the boot loader so now at bootup, I have
>> ZFS: unsupported feature: com.klarasystems:vdev_zaps_v2
>>
>> Can't find /boot/zfsloader
>>
>> What is the best way to recover from this ? Its a raw vm image. gpart is
>> p1=3Dfreebsd-boot, p2=3Dfreebsd-swap,p3=3Dfreebsd-zfs
>>
>> I was thinking perhaps start up a second vm thats RELENG_14, mdconfig
>> the image, and then what do I need to do ? Just
>>
>> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 md0 ?
>>
>
> Yes, note that if the host is running FreeBSD you can mdconfig the image
> on the host directly and do it on the host too.
>
> BTW. pmbr is very simple and doesn't change that often, updating
> gptzfsboot should be sufficient.
>
>
> Thanks!  Another server I have (zoo) is EFI. I have not upgraded the boot
> pool yet, but its a mirror (ada8 and ada9). Both are
> p1=3Defi
> p2=3Dfreebsd-boot
> p3=3Dswap
> p4=3Dzfs
>
>
> root@zoo2:~ # mount_msdosfs /dev/ada8p1 /mnt
> root@zoo2:~ # ls -lR /mnt/EFI/
> total 2
> drwxr-xr-x  1 root wheel 512 Feb  1  2021 BOOT
> drwxr-xr-x  1 root wheel 512 Nov 21  2020 freebsd
>
> /mnt/EFI/BOOT:
> total 1747
> -rwxr-xr-x  1 root wheel 894464 Feb  1  2021 BOOTX64.efi
>
> /mnt/EFI/freebsd:
> total 1747
> -rwxr-xr-x  1 root wheel 894464 Feb  1  2021 loader.efi
> root@zoo2:~ #
>
> They appear to be the same.  Do I just replace both those files ?
>
> root@zoo2:~ # find /mnt -type f | xargs md5
> MD5 (/mnt/EFI/freebsd/loader.efi) =3D 5dcb1e7bc59e5ee7a9bd04faaa20b7ee
> MD5 (/mnt/EFI/BOOT/BOOTX64.efi) =3D 5dcb1e7bc59e5ee7a9bd04faaa20b7ee
> root@zoo2:~ #
>
> with
>
> root@zoo2:~ # ls -l /boot/loader.efi
> -r-xr-xr-x  2 root wheel 659968 Oct 31 13:02 /boot/loader.efi
> root@zoo2:~ #
>
> Yes, for EFI you mount the EFI ESP (which is a msdosfs) and replace the
BOOTX64.efi with latest /boot/loader.efi , then umount the EFI ESP.

It's generally a good idea to have access to the physical system, or via a
remote console that allows you to mount a .iso image, by the way.

Cheers,

--0000000000004b2bde06092e7d5a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace,monospace"><br></div></div><br><div class=3D"gmail_quote=
"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 2, 2023 at 9:50=E2=80=
=AFAM mike tancsa &lt;<a href=3D"mailto:mike@sentex.net">mike@sentex.net</a=
>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u>=
</u>

 =20
   =20
 =20
  <div>
    <div>On 11/2/2023 12:39 PM, Xin LI wrote:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <div dir=3D"ltr">
        <div dir=3D"ltr">
          <div style=3D"font-family:monospace,monospace"><br>
          </div>
        </div>
        <br>
        <div class=3D"gmail_quote">
          <div dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 2, 2023 at
            9:28=E2=80=AFAM mike tancsa &lt;<a href=3D"mailto:mike@sentex.n=
et" target=3D"_blank">mike@sentex.net</a>&gt;
            wrote:<br>
          </div>
          <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
            one of my VMs that I upgraded from RELENG_13 to RELENG_14, I
            forgot <br>
            to update the boot loader so now at bootup, I have<br>
            ZFS: unsupported feature: com.klarasystems:vdev_zaps_v2<br>
            <br>
            Can&#39;t find /boot/zfsloader<br>
            <br>
            What is the best way to recover from this ? Its a raw vm
            image. gpart is <br>
            p1=3Dfreebsd-boot, p2=3Dfreebsd-swap,p3=3Dfreebsd-zfs<br>
            <br>
            I was thinking perhaps start up a second vm thats RELENG_14,
            mdconfig <br>
            the image, and then what do I need to do ? Just<br>
            <br>
            gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 md0 ?<br>
          </blockquote>
          <div><br>
          </div>
          <div>
            <div style=3D"font-family:monospace,monospace">Yes, note that i=
f
              the host is running FreeBSD you can mdconfig the image on
              the host directly and do it on the host too.</div>
          </div>
          <div style=3D"font-family:monospace,monospace"><br>
          </div>
          <div style=3D"font-family:monospace,monospace">BTW. pmbr is very
            simple and doesn&#39;t change that often, updating gptzfsboot
            should be sufficient.</div>
          <br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>Thanks!=C2=A0 Another server I have (zoo) is EFI. I have not upgrade=
d
      the boot pool yet, but its a mirror (ada8 and ada9). Both are <br>
      p1=3Defi<br>
      p2=3Dfreebsd-boot<br>
      p3=3Dswap<br>
      p4=3Dzfs<br>
    </p>
    <p><br>
    </p>
    <p>root@zoo2:~ # mount_msdosfs /dev/ada8p1 /mnt<br>
      root@zoo2:~ # ls -lR /mnt/EFI/<br>
      total 2<br>
      drwxr-xr-x=C2=A0 1 root wheel 512 Feb=C2=A0 1=C2=A0 2021 BOOT<br>
      drwxr-xr-x=C2=A0 1 root wheel 512 Nov 21=C2=A0 2020 freebsd<br>
      <br>
      /mnt/EFI/BOOT:<br>
      total 1747<br>
      -rwxr-xr-x=C2=A0 1 root wheel 894464 Feb=C2=A0 1=C2=A0 2021 BOOTX64.e=
fi<br>
      <br>
      /mnt/EFI/freebsd:<br>
      total 1747<br>
      -rwxr-xr-x=C2=A0 1 root wheel 894464 Feb=C2=A0 1=C2=A0 2021 loader.ef=
i<br>
      root@zoo2:~ # <br>
      <br>
      They appear to be the same.=C2=A0 Do I just replace both those files =
?</p>
    <p>root@zoo2:~ # find /mnt -type f | xargs md5<br>
      MD5 (/mnt/EFI/freebsd/loader.efi) =3D
      5dcb1e7bc59e5ee7a9bd04faaa20b7ee<br>
      MD5 (/mnt/EFI/BOOT/BOOTX64.efi) =3D 5dcb1e7bc59e5ee7a9bd04faaa20b7ee<=
br>
      root@zoo2:~ # <br>
    </p>
    <p>with</p>
    <p>root@zoo2:~ # ls -l /boot/loader.efi <br>
      -r-xr-xr-x=C2=A0 2 root wheel 659968 Oct 31 13:02 /boot/loader.efi<br=
>
      root@zoo2:~ # <br>
    </p>
    <p></p></div></blockquote><div><div class=3D"gmail_default" style=3D"fo=
nt-family:monospace,monospace">Yes, for EFI you mount the EFI ESP (which is=
 a msdosfs) and replace the BOOTX64.efi with latest /boot/loader.efi , then=
 umount the EFI ESP.</div><div class=3D"gmail_default" style=3D"font-family=
:monospace,monospace"><br></div><div class=3D"gmail_default" style=3D"font-=
family:monospace,monospace">It&#39;s generally a good idea to have access t=
o the physical system, or via a remote console that allows you to mount a .=
iso image, by the way.</div><br></div><div class=3D"gmail_default" style=3D=
"font-family:monospace,monospace">Cheers,</div></div></div>

--0000000000004b2bde06092e7d5a--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGMYy3tngcCt6Hn2D08CErdsocD%2BiPR3uZjxQALb5TCV%2Bq8wVA>