From nobody Fri Jan 20 23:17:31 2023 X-Original-To: dev-commits-src-main@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 4NzFlH3gd7z2srDJ; Fri, 20 Jan 2023 23:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NzFlH32X8z3qv9; Fri, 20 Jan 2023 23:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RDb+kPgwlEVw9iD88qwXfezhSZS+JALmIuSoZcLhSc=; b=LLc9Vp0THD+jyggZdNxYAOba7WKPt77zBnLNhoZesjyctFo600PwaHpBoJQB9Bc1QwXpkP OX1OYlT9tghgdWC7lkT5XuhqZC8nY1tQ2AaAFa/FzydE5r2Gs3GMJPqTn7IijUOL5kvy0H C4pSCppaWDA4X6DYl5r1/hM+m7acuJJnAUESoXALKWVZcHCzKGrCZYNYlVTlb1qMdctbLF CMn9uQxv2N0EclOLdGzB800AN+HVSAVyjjqOdvAC7KWxadc11KJ3+0k3SYC5oiTYHOoWvC Kt2d2KD1lWOhM46RTzQG4+0cYfo7NX4D+/uXAMyqqyamd4ynLNlXHVohnDXCxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674256651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RDb+kPgwlEVw9iD88qwXfezhSZS+JALmIuSoZcLhSc=; b=ZerEPLH7GdnV6mt7TzRmXbaLOq3oKLcrpAvjIsuy+B7hJJXFjNgij6BKCwQcjHrXq3eXn9 ZBocTkjJqcEPoyz8w+nRBppV/BngUj7J5ybLHj4IlFR36fZVMxs+fun2vHw5jEgFgLGsr6 cG4KdxFNk5Ap5PrbInk/E18xqcHi3Isjj1jUW2HAO25hZtG5lcVDSKI36SuoQ/44Cq+LTQ +IkXCFmj+dZx/H7nUW6lSoJByf3E5TLZLCLNnUKwG/R+Dumq5rxRFOpg0R94JgpfjiWq6D u6agrInAOa7XX4KHqR15eWrgzk4tiBhvQyZnuiU0oeXNTQArcL839h5+tdDkyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674256651; a=rsa-sha256; cv=none; b=ChvOoADTDmJ0FBz97vFtCr8KbF++5UJqrH4UbR7aAI8Jhr79kszNU53L9HMjNs0yT7rAgG nt7GG7nxcIt14PC+TVf3gLoRkjwfaUkjlVsKqbeC27kyqpC7iyEpQxEj3gHvLkUuLA+GNQ uEwpdWtyaI91EIZLYy7nvcpnINVLNv+iPQgyFM0sM4EPu+lKrzMCiChrkuS0Je76Daisoz PY9kASlE7gKTBJE4msBU5A6uL8uitBxL2K+97okOHUUzOWw9jJpbPvQv6lcfK8RT+2/Enh Q7+Td2aFFvf6nNOqTpyPYzl3mOvgtf1Lb5x04bwlMnBaBurIUMC810UGm8YK9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NzFlH20Sxzp92; Fri, 20 Jan 2023 23:17:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KNHVoF045195; Fri, 20 Jan 2023 23:17:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KNHVqb045194; Fri, 20 Jan 2023 23:17:31 GMT (envelope-from git) Date: Fri, 20 Jan 2023 23:17:31 GMT Message-Id: <202301202317.30KNHVqb045194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0cd612664eba - main - UPDATING: update notes on EFI booting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cd612664ebaeaf960ffc8ebe4d3ff44be2a8eef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0cd612664ebaeaf960ffc8ebe4d3ff44be2a8eef commit 0cd612664ebaeaf960ffc8ebe4d3ff44be2a8eef Author: Warner Losh AuthorDate: 2023-01-20 23:13:54 +0000 Commit: Warner Losh CommitDate: 2023-01-20 23:13:54 +0000 UPDATING: update notes on EFI booting The notes on EFI booting and updating for ZFS had become dated and only partially updated. Expand the notes with a few more details and a pointer to laoder.efi(8) and uefi(8). Sponsored by: Netflix Discussed with: pauamma, karels Differential Revision: https://reviews.freebsd.org/D36629 --- UPDATING | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/UPDATING b/UPDATING index a0fdb839f668..689ddfedf6d3 100644 --- a/UPDATING +++ b/UPDATING @@ -2528,22 +2528,50 @@ COMMON ITEMS: ZFS notes --------- - When upgrading the boot ZFS pool to a new version, always follow - these two steps: + When upgrading the boot ZFS pool to a new version (via zpool upgrade), + always follow these three steps: - 1.) recompile and reinstall the ZFS boot loader and boot block + 1) recompile and reinstall the ZFS boot loader and boot block (this is part of "make buildworld" and "make installworld") - 2.) update the ZFS boot block on your boot drive + 2) update the ZFS boot block on your boot drive (only required when + doing a zpool upgrade): - The following example updates the ZFS boot block on the - freebsd-boot partition of a GPT partitioned drive ada0: - "gpart bootcode -p /boot/gptzfsboot -i $N ada0" - The value $N will typically be 1 (if booting from BIOS) or 2 (if - booting from EFI). + When booting on x86 via BIOS, use the following to update the ZFS boot + block on the freebsd-boot partition of a GPT partitioned drive ada0: + gpart bootcode -p /boot/gptzfsboot -i $N ada0 + The value $N will typically be 1. For EFI booting, see EFI notes. + + 3) zpool upgrade the root pool. New bootblocks will work with old + pools, but not vice versa, so they need to be updated before any + zpool upgrade. Non-boot pools do not need these updates. + EFI notes + --------- + + There are two locations the boot loader can be installed into. The + current location (and the default) is \efi\freebsd\loader.efi and using + efibootmgr(8) to configure it. The old location, that must be used on + deficient systems that don't honor efibootmgr(8) protocols, is the + fallback location of \EFI\BOOT\BOOTxxx.EFI. Generally, you will copy + /boot/loader.efi to this location, but on systems installed a long time + ago the ESP may be too small and /boot/boot1.efi may be needed unless + the ESP has been expanded in the meantime. + + Recent systems will have the ESP mounted on /boot/efi, but older ones + may not have it mounted at all, or mounted in a different + location. Older arm SD images with MBR used /boot/msdos as the + mountpoint. The ESP is a MSDOS filesystem. + + The EFI boot loader rarely needs to be updated. For ZFS booting, + however, you must update loader.efi before you do 'zpool upgrade' the + root zpool, otherwise the old loader.efi may reject the upgraded zpool + since it does not automatically understand some new features. + + See loader.efi(8) and uefi(8) for more details. + To build a kernel ----------------- If you are updating from a prior version of FreeBSD (even one just