Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2022 13:01:40 +0100
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Toomas Soome <tsoome@me.com>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: 24.3. Updating Bootcode
Message-ID:  <CAFDf7UJrnL0RrPyto07-THmhPSBF%2BpbgqMmj%2BMmjUZpDotvjXQ@mail.gmail.com>
In-Reply-To: <62B26DE1-0E26-40BA-8647-E591E9ACEB7A@me.com>
References:  <CAFDf7UJv9QCuD27XDs2ihLiN21Rn6PeZjbJtWVOAAfHb8HHnHw@mail.gmail.com> <62B26DE1-0E26-40BA-8647-E591E9ACEB7A@me.com>

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

Hi Toomas,

For better OS support, the UEFI specification (UEFI 2.8A Feb 14, page 499)
> is suggesting to use structure like:
>
> <ESP>/efi/<OS>/=E2=80=A6
>
> And to use this suggestion, it means the UEFI Boot Manager needs to be
> configured (see efibootmgr(8)).
>
> Therefore, once you have set up OS specific setup, there is no use for
> default (<ESP>/efi/boot/=E2=80=A6) and you need to update one or another,=
 but not
> both.
>

FreeBSD have <ESP>/efi/freebsd/... but it's not configured in efibootmgr:

efibootmgr -v:
---
BootOrder  : 0004, 0000, 2002, 2003, 2001
Boot0004* Windows Boot Manager
HD(1,GPT,8c497825-1db2-41f8-8924-85dfd0bb7283,0x800,0x82000)/File(\EFI\Micr=
osoft\Boot\bootmgfw.efi)
                                   da0p1:/EFI/Microsoft/Boot/bootmgfw.efi
(null)
+Boot0000* EFI Hard Drive (SAMSUNG MZVLB1T0HBLR-000L2)
PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,39-f9-b8-01-81-38-25-00)/H=
D(1,GPT,73acd1b2-de41-11eb-8156-002b67dfc673,0x28,0x82000)
 Boot2002* EFI DVD/CDROM
 Boot2003* EFI Network
 Boot2001* EFI USB Device
---
so boot is definitely using <ESP>/efi/boot/bootx64.efi @Boot0000

I think I can create a new boot:
---
efibootmgr -a -c -l /boot/efi/efi/freebsd/loader.efi -L FreeBSD-14
(and make it active)
efibootmgr -a -b NNNN
---
and create other for loader.efi.old in case of problems.

In this case I will need only update <ESP>/efi/freebsd/loader.efi.

Q: for what has been said in mailing, boot is compiled in /usr/src/stand,
isn't a good idea that when it install new boot it backup old boot like
/boot/kernel -> /boot/kernel.old?

Thanks,

--=20
Nuno Teixeira
FreeBSD Committer (ports)

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

<div dir=3D"ltr"><div class=3D"gmail_quote"><div>Hi Toomas,</div><div><br><=
/div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bo=
rder-left:1px solid rgb(204,204,204);padding-left:1ex">
For better OS support, the UEFI specification (UEFI 2.8A Feb 14, page 499) =
is suggesting to use structure like:<br>
<br>
&lt;ESP&gt;/efi/&lt;OS&gt;/=E2=80=A6<br>
<br>
And to use this suggestion, it means the UEFI Boot Manager needs to be conf=
igured (see efibootmgr(8)).<br>
<br>
Therefore, once you have set up OS specific setup, there is no use for defa=
ult (&lt;ESP&gt;/efi/boot/=E2=80=A6) and you need to update one or another,=
 but not both.<br></blockquote></div><div><br></div><div>FreeBSD have &lt;E=
SP&gt;/efi/freebsd/... but it&#39;s not configured in efibootmgr:</div><div=
><br></div><div>efibootmgr -v:</div><div>---</div><div>BootOrder =C2=A0: 00=
04, 0000, 2002, 2003, 2001</div><div>Boot0004* Windows Boot Manager HD(1,GP=
T,8c497825-1db2-41f8-8924-85dfd0bb7283,0x800,0x82000)/File(\EFI\Microsoft\B=
oot\bootmgfw.efi)<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0da=
0p1:/EFI/Microsoft/Boot/bootmgfw.efi (null)<br>+Boot0000* EFI Hard Drive (S=
AMSUNG MZVLB1T0HBLR-000L2) PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1=
,39-f9-b8-01-81-38-25-00)/HD(1,GPT,73acd1b2-de41-11eb-8156-002b67dfc673,0x2=
8,0x82000)</div><div>=C2=A0Boot2002* EFI DVD/CDROM<br>=C2=A0Boot2003* EFI N=
etwork<br>=C2=A0Boot2001* EFI USB Device</div><div>---</div><div>so boot is=
 definitely using &lt;ESP&gt;/efi/boot/bootx64.efi <a class=3D"gmail_plusre=
ply" id=3D"plusReplyChip-0">@Boot0000</a><br></div><div><br></div><div>I th=
ink I can create a new boot:</div><div>---</div><div>efibootmgr -a -c -l /b=
oot/efi/efi/freebsd/loader.efi -L FreeBSD-14</div><div>(and make it active)=
</div><div>efibootmgr -a -b NNNN</div><div>---</div><div>and create other f=
or loader.efi.old in case of problems.</div><div><br></div><div>In this cas=
e I will need only update &lt;ESP&gt;/efi/freebsd/loader.efi.<br></div><div=
><br></div><div>Q: for what has been said in mailing, boot is compiled in /=
usr/src/stand, isn&#39;t a good idea that when it install new boot it backu=
p old boot like /boot/kernel -&gt; /boot/kernel.old?</div><div><br></div><d=
iv>Thanks,<br></div><div><br></div><div>-- </div><div dir=3D"ltr" class=3D"=
gmail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nu=
no Teixeira<br>FreeBSD Committer (ports)</span></div></div></div>

--0000000000008e4b9c05e65a83ae--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UJrnL0RrPyto07-THmhPSBF%2BpbgqMmj%2BMmjUZpDotvjXQ>