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

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_BBF3FCEA-2E07-4D64-BF71-626A44949F83
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On 16. Aug 2022, at 15:01, Nuno Teixeira <eduardo@freebsd.org> wrote:
>=20
> Hi Toomas,
>=20
> For better OS support, the UEFI specification (UEFI 2.8A Feb 14, page =
499) is suggesting to use structure like:
>=20
> <ESP>/efi/<OS>/=E2=80=A6
>=20
> And to use this suggestion, it means the UEFI Boot Manager needs to be =
configured (see efibootmgr(8)).
>=20
> 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.
>=20
> FreeBSD have <ESP>/efi/freebsd/... but it's not configured in =
efibootmgr:
>=20
> efibootmgr -v:
> ---
> BootOrder  : 0004, 0000, 2002, 2003, 2001
> Boot0004* Windows Boot Manager =
HD(1,GPT,8c497825-1db2-41f8-8924-85dfd0bb7283,0x800,0x82000)/File(\EFI\Mic=
rosoft\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)/=
HD(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 <>

Yes, Boot0000 does not specify file name, so it is using default path =
there.

>=20
> 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.
>=20
> In this case I will need only update <ESP>/efi/freebsd/loader.efi.
>=20
> 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?
>=20

Boot loader update does not touch kernel, but when you do installkernel, =
that one will create backup copy for you. And, if you are using zfs =
root, you really should use boot environments.

rgds,
toomas


--Apple-Mail=_BBF3FCEA-2E07-4D64-BF71-626A44949F83
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 16. Aug 2022, at 15:01, Nuno Teixeira &lt;<a =
href=3D"mailto:eduardo@freebsd.org" class=3D"">eduardo@freebsd.org</a>&gt;=
 wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
dir=3D"ltr" class=3D""><div class=3D"gmail_quote"><div class=3D"">Hi =
Toomas,</div><div class=3D""><br class=3D""></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">
For better OS support, the UEFI specification (UEFI 2.8A Feb 14, page =
499) is suggesting to use structure like:<br class=3D"">
<br class=3D"">
&lt;ESP&gt;/efi/&lt;OS&gt;/=E2=80=A6<br class=3D"">
<br class=3D"">
And to use this suggestion, it means the UEFI Boot Manager needs to be =
configured (see efibootmgr(8)).<br class=3D"">
<br class=3D"">
Therefore, once you have set up OS specific setup, there is no use for =
default (&lt;ESP&gt;/efi/boot/=E2=80=A6) and you need to update one or =
another, but not both.<br class=3D""></blockquote></div><div =
class=3D""><br class=3D""></div><div class=3D"">FreeBSD have =
&lt;ESP&gt;/efi/freebsd/... but it's not configured in =
efibootmgr:</div><div class=3D""><br class=3D""></div><div =
class=3D"">efibootmgr -v:</div><div class=3D"">---</div><div =
class=3D"">BootOrder &nbsp;: 0004, 0000, 2002, 2003, 2001</div><div =
class=3D"">Boot0004* Windows Boot Manager =
HD(1,GPT,8c497825-1db2-41f8-8924-85dfd0bb7283,0x800,0x82000)/File(\EFI\Mic=
rosoft\Boot\bootmgfw.efi)<br class=3D"">&nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp;da0p1:/EFI/Microsoft/Boot/bootmgfw.efi =
(null)<br class=3D"">+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)/=
HD(1,GPT,73acd1b2-de41-11eb-8156-002b67dfc673,0x28,0x82000)</div><div =
class=3D"">&nbsp;Boot2002* EFI DVD/CDROM<br class=3D"">&nbsp;Boot2003* =
EFI Network<br class=3D"">&nbsp;Boot2001* EFI USB Device</div><div =
class=3D"">---</div><div class=3D"">so boot is definitely using =
&lt;ESP&gt;/efi/boot/bootx64.efi <a class=3D"gmail_plusreply" =
id=3D"plusReplyChip-0">@Boot0000</a><br =
class=3D""></div></div></div></blockquote><div><br =
class=3D""></div><div>Yes, Boot0000 does not specify file name, so it is =
using default path there.</div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D""><div dir=3D"ltr" class=3D""><div class=3D""><br=
 class=3D""></div><div class=3D"">I think I can create a new =
boot:</div><div class=3D"">---</div><div class=3D"">efibootmgr -a -c -l =
/boot/efi/efi/freebsd/loader.efi -L FreeBSD-14</div><div class=3D"">(and =
make it active)</div><div class=3D"">efibootmgr -a -b NNNN</div><div =
class=3D"">---</div><div class=3D"">and create other for loader.efi.old =
in case of problems.</div><div class=3D""><br class=3D""></div><div =
class=3D"">In this case I will need only update =
&lt;ESP&gt;/efi/freebsd/loader.efi.<br class=3D""></div><div =
class=3D""><br class=3D""></div><div class=3D"">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 -&gt; =
/boot/kernel.old?</div><div class=3D""><br =
class=3D""></div></div></div></blockquote><br class=3D""></div><div>Boot =
loader update does not touch kernel, but when you do installkernel, that =
one will create backup copy for you. And, if you are using zfs root, you =
really should use boot environments.</div><div><br =
class=3D""></div><div>rgds,</div><div>toomas</div><br =
class=3D""></body></html>=

--Apple-Mail=_BBF3FCEA-2E07-4D64-BF71-626A44949F83--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6C8EFCAC-52EF-4037-A6A6-BB9DF76AD905>