From nobody Tue Aug 16 12:01:40 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M6VB86pLTz4YvpR for ; Tue, 16 Aug 2022 12:01:52 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M6VB8652Rz4CYL for ; Tue, 16 Aug 2022 12:01:52 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660651312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S9A2Bx1EBYIJAFb7qhHJrNSvh1XHM/SSazoHlC3TKvM=; b=J6A6AOpwg7A7diLgBUwzCag7pWKnN7LoB5o8w6m0Fl9DxWCebuNXYuNfIO/uGAyEtDBR9r qjMHzTCQyYLxUlgYQNpHP0T9vayW/6etmYH0+i8jfcxheMuA5986oBfNjHHnVB0IRJSixP olFLRMU+smXrLrOaRPdFEtHr7DmnSQ+IZyrXRJReR84JgMaaYpKXf/tFoI4ps4aM///1R4 RufQ5MU6E9q7qpuKX5eOf4KkuLr0tOW6Ckv5mkTqhlL+bPW7ur73JGmm71eXmzoIrOdzeu qbz5fH3KzM+XXdENSqJg+LPZEilEyKJDt5Iv16+S4l3tvQiYwB8cs/FpH/XOGw== Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4M6VB850pFzxhj for ; Tue, 16 Aug 2022 12:01:52 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vk1-f169.google.com with SMTP id bj43so5037985vkb.4 for ; Tue, 16 Aug 2022 05:01:52 -0700 (PDT) X-Gm-Message-State: ACgBeo3/oGW+GuxichLBSGV/LkMnP94KQsBlfTTdxVA8lCzi9+2s4ZcY HNaq0ZHB0WDzS5m+P06ueoyoW3n3T9cJShlCae0= X-Google-Smtp-Source: AA6agR6dfO6aOeW9+Rw+cpDCRCvkoTF57c4TNuOe/Us22MEADRcE9c63PwPnw2YZTtTtMuRThox3/bKbi9FR4Ilx1Bo= X-Received: by 2002:a1f:41c8:0:b0:377:1352:8f9d with SMTP id o191-20020a1f41c8000000b0037713528f9dmr8405762vka.25.1660651312137; Tue, 16 Aug 2022 05:01:52 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <62B26DE1-0E26-40BA-8647-E591E9ACEB7A@me.com> In-Reply-To: <62B26DE1-0E26-40BA-8647-E591E9ACEB7A@me.com> From: Nuno Teixeira Date: Tue, 16 Aug 2022 13:01:40 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: 24.3. Updating Bootcode To: Toomas Soome Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000008e4b9c05e65a83ae" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660651312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=S9A2Bx1EBYIJAFb7qhHJrNSvh1XHM/SSazoHlC3TKvM=; b=kDrfLNQ8YvyyChfHgYGcnn6sQkYbuKssdEsXT4A8DMxhiO9q4mm4z4VuORpjG35Hkc9vcD 72p6SkH60QJ/3IvhuYlniTHjtno3heZe4ktJCJvF4Uu5P/1cL91jpr+T7V2C3b09TtOT0y OrA3TK0zyU3bPvtpG+0nSzuxRCrhwYlJMzms0no5hrPjA2V6o0xmPPubEx0NsfxXfKbyj7 HQfbnNDayPiGvLag7SgGPtOn0GI+p58sINu0FX705kItNDBLC22XYey+LHbPZ3szxizqpV wO9r2ByCu9VcZPir4hcuiEdbiZeNK/kyx996bDgNveMYvrBLhYtemEHPWlZg0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660651312; a=rsa-sha256; cv=none; b=sHjCwWTV+O2isdotDxjDuu02PVZk/1Rebw/otU3obPu6KtqTubun+K2xw4Np5MV9Ros21+ afW0dsuqhdyy/mMJy2R0C38GQ8QIc+HJwBTHy+Kase7XqWPdNx0ydZ6FG8HRd+IdoHlnyu UKTHxVkibcNGqlM9a9SKK067+gv8xjVAdZI8xChD7/lt0ymSYSFzo3je6kJvi3UHWVJf1Q ukHyB3lpTIrTSyYQI0n03JsXVXWXQmdTFzznWH+vMsp787EP/NdqAJhz5hIbk8bI4iyUnx 7CnwjeYsU2E9uIrysueoK7BNJr+nqbNm7ncTYsLaaTAGTmIyoW8I7peug37vGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --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: > > /efi//=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 (/efi/boot/=E2=80=A6) and you need to update one or another,= but not > both. > FreeBSD have /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 /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 /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
Hi Toomas,

<= /div>
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 conf= igured (see efibootmgr(8)).

Therefore, once you have set up OS specific setup, there is no use for defa= ult (<ESP>/efi/boot/=E2=80=A6) and you need to update one or another,= but not both.

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

efibootmgr -v:
---
BootOrder =C2=A0: 00= 04, 0000, 2002, 2003, 2001
Boot0004* Windows Boot Manager HD(1,GP= T,8c497825-1db2-41f8-8924-85dfd0bb7283,0x800,0x82000)/File(\EFI\Microsoft\B= oot\bootmgfw.efi)
=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)
+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)
=C2=A0Boot2002* EFI DVD/CDROM
=C2=A0Boot2003* EFI N= etwork
=C2=A0Boot2001* EFI USB Device
---
so boot is= definitely using <ESP>/efi/boot/bootx64.efi @Boot0000

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

In this cas= e 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 backu= p old boot like /boot/kernel -> /boot/kernel.old?

Thanks,

--
Nu= no Teixeira
FreeBSD Committer (ports)
--0000000000008e4b9c05e65a83ae--