Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 2024 20:46:28 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        void <void@f-m.fm>, Current FreeBSD <freebsd-current@freebsd.org>
Subject:   Re: Loader needs to be updated message
Message-ID:  <CANCZdfqZSFfXc4adoR-hh9jASJ6UGBpSY_QyhPB05z04xdFkPw@mail.gmail.com>
In-Reply-To: <082B95C0-8D03-40E6-A5DD-EA8723FA9AF3@yahoo.com>
References:  <082B95C0-8D03-40E6-A5DD-EA8723FA9AF3.ref@yahoo.com> <082B95C0-8D03-40E6-A5DD-EA8723FA9AF3@yahoo.com>

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

On Sat, Sep 7, 2024, 8:39=E2=80=AFPM Mark Millard <marklmi@yahoo.com> wrote=
:

> void <void_at_f-m.fm> wrote on
> Date: Sat, 07 Sep 2024 17:27:00 UTC :
>
> > On Sat, Sep 07, 2024 at 08:20:07AM -0700, Mark Millard wrote:
> >
> > >I'm more interested in what is there than just what is not
> > >there. May be show something analogous to:
> > >
> > ># gpart list | grep -E '(Name|type|efi|media)'
> > >1. Name: mmcsd1s1
> > > efimedia: HD(1,MBR,00000000,0x8000,0x3b68000)
> > > rawtype: 12
> > > type: fat32lba
> > >1. Name: mmcsd1
> > >1. Name: da0p1
> > > efimedia: HD(1,GPT,81f199f2-5eb9-11ec-b507-a0cec8d68fdc,0x28,0x82000)
> > > rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
> > > label: BPIM3efi
> > > type: efi
> > >2. Name: da0p2
> > > efimedia:
> HD(2,GPT,efa6f52d-c8ca-11ec-bb1e-03fc0558c84f,0x82800,0x366000)
> > > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
> > > type: freebsd-swap
> > >3. Name: da0p3
> > > efimedia:
> HD(3,GPT,71abc138-db5e-11ee-bfe1-e352d1095e3c,0x6861c800,0x732800)
> > > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
> > > type: freebsd-swap
> > >4. Name: da0p4
> > > efimedia:
> HD(4,GPT,b568945a-5eba-11ec-b507-a0cec8d68fdc,0xa1c800,0x67c00000)
> > > rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
> > > type: freebsd-ufs
> > >1. Name: da0
> > >
> > >I'll note that on various type of systems, the (effectively)
> > >ESP need not be specifically of "type: efi", possibly some
> > >fat variant instead also works. (Of course, EFI need not be
> > >the only alternative for various type of contexts.)
> > >
> > >I'll note the /boot/efi is normally just an empty directory
> > >that is possibly used as a mount point.
> > >
> > >In some (somewhat older) configurations /boot/msdos is
> > >similarly an empty directory and possibly used as the mount
> > >point instead.
> > >
> > >> After source building to latest stable in the usual way, same error
> message 'loader needs updating'.
> >
> > This is on the guest
> >
> > # gpart list | grep -E '(Name|type|efi|media)'
> > 1. Name: vtbd0p1
> > efimedia: HD(1,GPT,b7731537-61da-11ed-9652-00a0981073a7,0x28,0x400)
> > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
> > type: freebsd-boot
>
> As I understand it, that "type: freebsd-boot" means that one of
> the likes of:
>
> # ls -lodT /boot/gpt*boot*
> -r--r--r--  1 root wheel uarch  62139 Apr  7 15:55:46 2024 /boot/gptboot
> -r-xr-xr-x  1 root wheel uarch 109568 Apr  7 15:55:46 2024
> /boot/gptboot.efi
> -r--r--r--  1 root wheel uarch 176062 Apr  8 01:15:54 2024 /boot/gptzfsbo=
ot
>
> is in use inside that freebsd-boot partition (vtbd0p1). But only
> one of those supports zfs.
>
> Fair warning that I never use any of those 3 --nor freebsd-boot
> partitions. Nor have I ever used Bhyve. Do not blindly believe what I
> report here. But hopefully it points in a useful direction to
> initially investigate.
>
> Looking at:
>
> "man 8 gptboot.efi" indicates that "gptboot.efi works only with UFS
> root file systems".
>
> "man 8 gptboot" indicates that "gptboot is used on BIOS-based
> computers to boot from a UFS partition on a GPT-partitioned disk".
>
> BUT "man 8 gptzfsboot" indicates "gptzfsboot is used on BIOS-based
> computers to boot from a filesystem in a ZFS pool".
>
> So the partitioning is not set up for supporting the combination of:
> EFI and ZFS-for-root-filesystem: if the gptzfsboot is used then it
> needs to be old style BIOS-and-ZFS for the context.
>

Yes

So my expectation here is that the gptzfsboot content in use in
> vtbd0p1 (i.e. -i 1 vtbd0 in some commands) is out of date and needs
> to be updated. To my knowledge, there is no simple technique to look
> up the vintage present in -i 1 vtbd0 .
>

No. The message is not from this. But gpart bootcode will update it. It
gets ugly only for MBR systems, not GPT ones. For MBR, there's a dd step.

I have no clue which of the following should be used for your context
> to be sure that the content ends up up to date:
>
> The Protective MBR variant:
> # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0
>
> The variant for without the Protective MBR:
> # gpart bootcode -p /boot/gptzfsboot -i 1 vtbd0
>

These are likely fine, but won't stop the out of date message.

Warner

Those commands are adjusted variations of what the man page's EXAMPLES
> section shows, but not using the 2 example's ada0 notation.
>
> > 2. Name: vtbd0p2
> > efimedia: HD(2,GPT,b77a2687-61da-11ed-9652-00a0981073a7,0x800,0x2000000=
)
> > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
> > type: freebsd-swap
> > 3. Name: vtbd0p3
> > efimedia:
> HD(3,GPT,b7836ca4-61da-11ed-9652-00a0981073a7,0x2000800,0xdfff000)
> > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
> > type: freebsd-zfs
> > 1. Name: vtbd0
>
>
> =3D=3D=3D
> Mark Millard
> marklmi at yahoo.com
>
>
>

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

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Sat, Sep 7, 2024, 8:39=E2=80=AFPM Mark Millard &lt;=
<a href=3D"mailto:marklmi@yahoo.com">marklmi@yahoo.com</a>&gt; wrote:<br></=
div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex">void &lt;<a href=3D"http://void_at_f-m.f=
m" rel=3D"noreferrer noreferrer" target=3D"_blank">void_at_f-m.fm</a>&gt; w=
rote on<br>
Date: Sat, 07 Sep 2024 17:27:00 UTC :<br>
<br>
&gt; On Sat, Sep 07, 2024 at 08:20:07AM -0700, Mark Millard wrote:<br>
&gt; <br>
&gt; &gt;I&#39;m more interested in what is there than just what is not<br>
&gt; &gt;there. May be show something analogous to:<br>
&gt; &gt;<br>
&gt; &gt;# gpart list | grep -E &#39;(Name|type|efi|media)&#39;<br>
&gt; &gt;1. Name: mmcsd1s1<br>
&gt; &gt; efimedia: HD(1,MBR,00000000,0x8000,0x3b68000)<br>
&gt; &gt; rawtype: 12<br>
&gt; &gt; type: fat32lba<br>
&gt; &gt;1. Name: mmcsd1<br>
&gt; &gt;1. Name: da0p1<br>
&gt; &gt; efimedia: HD(1,GPT,81f199f2-5eb9-11ec-b507-a0cec8d68fdc,0x28,0x82=
000)<br>
&gt; &gt; rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b<br>
&gt; &gt; label: BPIM3efi<br>
&gt; &gt; type: efi<br>
&gt; &gt;2. Name: da0p2<br>
&gt; &gt; efimedia: HD(2,GPT,efa6f52d-c8ca-11ec-bb1e-03fc0558c84f,0x82800,0=
x366000)<br>
&gt; &gt; rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b<br>
&gt; &gt; type: freebsd-swap<br>
&gt; &gt;3. Name: da0p3<br>
&gt; &gt; efimedia: HD(3,GPT,71abc138-db5e-11ee-bfe1-e352d1095e3c,0x6861c80=
0,0x732800)<br>
&gt; &gt; rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b<br>
&gt; &gt; type: freebsd-swap<br>
&gt; &gt;4. Name: da0p4<br>
&gt; &gt; efimedia: HD(4,GPT,b568945a-5eba-11ec-b507-a0cec8d68fdc,0xa1c800,=
0x67c00000)<br>
&gt; &gt; rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b<br>
&gt; &gt; type: freebsd-ufs<br>
&gt; &gt;1. Name: da0<br>
&gt; &gt;<br>
&gt; &gt;I&#39;ll note that on various type of systems, the (effectively)<b=
r>
&gt; &gt;ESP need not be specifically of &quot;type: efi&quot;, possibly so=
me<br>
&gt; &gt;fat variant instead also works. (Of course, EFI need not be<br>
&gt; &gt;the only alternative for various type of contexts.)<br>
&gt; &gt;<br>
&gt; &gt;I&#39;ll note the /boot/efi is normally just an empty directory<br=
>
&gt; &gt;that is possibly used as a mount point.<br>
&gt; &gt;<br>
&gt; &gt;In some (somewhat older) configurations /boot/msdos is<br>
&gt; &gt;similarly an empty directory and possibly used as the mount<br>
&gt; &gt;point instead.<br>
&gt; &gt;<br>
&gt; &gt;&gt; After source building to latest stable in the usual way, same=
 error message &#39;loader needs updating&#39;.<br>
&gt; <br>
&gt; This is on the guest<br>
&gt; <br>
&gt; # gpart list | grep -E &#39;(Name|type|efi|media)&#39;<br>
&gt; 1. Name: vtbd0p1<br>
&gt; efimedia: HD(1,GPT,b7731537-61da-11ed-9652-00a0981073a7,0x28,0x400)<br=
>
&gt; rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f<br>
&gt; type: freebsd-boot<br>
<br>
As I understand it, that &quot;type: freebsd-boot&quot; means that one of<b=
r>
the likes of:<br>
<br>
# ls -lodT /boot/gpt*boot*<br>
-r--r--r--=C2=A0 1 root wheel uarch=C2=A0 62139 Apr=C2=A0 7 15:55:46 2024 /=
boot/gptboot<br>
-r-xr-xr-x=C2=A0 1 root wheel uarch 109568 Apr=C2=A0 7 15:55:46 2024 /boot/=
gptboot.efi<br>
-r--r--r--=C2=A0 1 root wheel uarch 176062 Apr=C2=A0 8 01:15:54 2024 /boot/=
gptzfsboot<br>
<br>
is in use inside that freebsd-boot partition (vtbd0p1). But only<br>
one of those supports zfs.<br>
<br>
Fair warning that I never use any of those 3 --nor freebsd-boot<br>
partitions. Nor have I ever used Bhyve. Do not blindly believe what I<br>
report here. But hopefully it points in a useful direction to<br>
initially investigate.<br>
<br>
Looking at:<br>
<br>
&quot;man 8 gptboot.efi&quot; indicates that &quot;gptboot.efi works only w=
ith UFS<br>
root file systems&quot;.<br>
<br>
&quot;man 8 gptboot&quot; indicates that &quot;gptboot is used on BIOS-base=
d<br>
computers to boot from a UFS partition on a GPT-partitioned disk&quot;.<br>
<br>
BUT &quot;man 8 gptzfsboot&quot; indicates &quot;gptzfsboot is used on BIOS=
-based<br>
computers to boot from a filesystem in a ZFS pool&quot;.<br>
<br>
So the partitioning is not set up for supporting the combination of:<br>
EFI and ZFS-for-root-filesystem: if the gptzfsboot is used then it<br>
needs to be old style BIOS-and-ZFS for the context.<br></blockquote></div><=
/div><div dir=3D"auto"><br></div><div dir=3D"auto">Yes</div><div dir=3D"aut=
o"><br></div><div dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">
So my expectation here is that the gptzfsboot content in use in<br>
vtbd0p1 (i.e. -i 1 vtbd0 in some commands) is out of date and needs<br>
to be updated. To my knowledge, there is no simple technique to look<br>
up the vintage present in -i 1 vtbd0 .<br></blockquote></div></div><div dir=
=3D"auto"><br></div><div dir=3D"auto">No. The message is not from this. But=
 gpart bootcode will update it. It gets ugly only for MBR systems, not GPT =
ones. For MBR, there&#39;s a dd step.</div><div dir=3D"auto"><br></div><div=
 dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" =
style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have no clue which of the following should be used for your context<br>
to be sure that the content ends up up to date:<br>
<br>
The Protective MBR variant:<br>
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0<br>
<br>
The variant for without the Protective MBR:<br>
# gpart bootcode -p /boot/gptzfsboot -i 1 vtbd0<br></blockquote></div></div=
><div dir=3D"auto"><br></div><div dir=3D"auto">These are likely fine, but w=
on&#39;t stop the out of date message.</div><div dir=3D"auto"><br></div><di=
v dir=3D"auto">Warner</div><div dir=3D"auto"><br></div><div dir=3D"auto"><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Those commands are adjusted variations of what the man page&#39;s EXAMPLES<=
br>
section shows, but not using the 2 example&#39;s ada0 notation.<br>
<br>
&gt; 2. Name: vtbd0p2<br>
&gt; efimedia: HD(2,GPT,b77a2687-61da-11ed-9652-00a0981073a7,0x800,0x200000=
0)<br>
&gt; rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b<br>
&gt; type: freebsd-swap<br>
&gt; 3. Name: vtbd0p3<br>
&gt; efimedia: HD(3,GPT,b7836ca4-61da-11ed-9652-00a0981073a7,0x2000800,0xdf=
ff000)<br>
&gt; rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b<br>
&gt; type: freebsd-zfs<br>
&gt; 1. Name: vtbd0<br>
<br>
<br>
=3D=3D=3D<br>
Mark Millard<br>
marklmi at <a href=3D"http://yahoo.com" rel=3D"noreferrer noreferrer" targe=
t=3D"_blank">yahoo.com</a><br>
<br>
<br>
</blockquote></div></div></div>

--0000000000005fae8f062192a677--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqZSFfXc4adoR-hh9jASJ6UGBpSY_QyhPB05z04xdFkPw>