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>

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

[-- Attachment #1 --]


> On 16. Aug 2022, at 15:01, Nuno Teixeira <eduardo@freebsd.org> wrote:
> 
> 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>/…
> 
> 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/…) 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\Microsoft\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.

> 
> 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?
> 

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


[-- Attachment #2 --]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 16. Aug 2022, at 15:01, Nuno Teixeira &lt;<a href="mailto:eduardo@freebsd.org" class="">eduardo@freebsd.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">Hi Toomas,</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="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="">
<br class="">
&lt;ESP&gt;/efi/&lt;OS&gt;/…<br class="">
<br class="">
And to use this suggestion, it means the UEFI Boot Manager needs to be configured (see efibootmgr(8)).<br class="">
<br class="">
Therefore, once you have set up OS specific setup, there is no use for default (&lt;ESP&gt;/efi/boot/…) and you need to update one or another, but not both.<br class=""></blockquote></div><div class=""><br class=""></div><div class="">FreeBSD have &lt;ESP&gt;/efi/freebsd/... but it's not configured in efibootmgr:</div><div class=""><br class=""></div><div class="">efibootmgr -v:</div><div class="">---</div><div class="">BootOrder &nbsp;: 0004, 0000, 2002, 2003, 2001</div><div class="">Boot0004* Windows Boot Manager HD(1,GPT,8c497825-1db2-41f8-8924-85dfd0bb7283,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)<br class="">&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="">+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="">&nbsp;Boot2002* EFI DVD/CDROM<br class="">&nbsp;Boot2003* EFI Network<br class="">&nbsp;Boot2001* EFI USB Device</div><div class="">---</div><div class="">so boot is definitely using &lt;ESP&gt;/efi/boot/bootx64.efi <a class="gmail_plusreply" id="plusReplyChip-0">@Boot0000</a><br class=""></div></div></div></blockquote><div><br class=""></div><div>Yes, Boot0000 does not specify file name, so it is using default path there.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">I think I can create a new boot:</div><div class="">---</div><div class="">efibootmgr -a -c -l /boot/efi/efi/freebsd/loader.efi -L FreeBSD-14</div><div class="">(and make it active)</div><div class="">efibootmgr -a -b NNNN</div><div class="">---</div><div class="">and create other for loader.efi.old in case of problems.</div><div class=""><br class=""></div><div class="">In this case I will need only update &lt;ESP&gt;/efi/freebsd/loader.efi.<br class=""></div><div class=""><br class=""></div><div class="">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=""><br class=""></div></div></div></blockquote><br class=""></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=""></div><div>rgds,</div><div>toomas</div><br class=""></body></html>
help

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