From owner-dev-commits-src-all@freebsd.org Tue Mar 2 18:32:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A99C254B839; Tue, 2 Mar 2021 18:32:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4Dqm2v4S9Xz4sVZ; Tue, 2 Mar 2021 18:32:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:9508:6d03:14a7:a372]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 40D558E86; Tue, 2 Mar 2021 18:32:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103021824.122IO5S4047872@gndrsh.dnsmgr.net> From: Nathan Whitehorn Message-ID: Date: Tue, 2 Mar 2021 13:32:54 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <202103021824.122IO5S4047872@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:32:55 -0000 On 3/2/21 1:24 PM, Rodney W. Grimes wrote: >> The branch main has been updated by nwhitehorn: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=2c26d77d989abe48c662eeb6f52f7e4c9b81680c >> >> commit 2c26d77d989abe48c662eeb6f52f7e4c9b81680c >> Author: Nathan Whitehorn >> AuthorDate: 2021-03-02 16:47:00 +0000 >> Commit: Nathan Whitehorn >> CommitDate: 2021-03-02 16:49:41 +0000 >> >> Remove /boot/efi from mtree, missed in 0b7472b3d8d2. >> >> This had prevented the bootconfig step from determining if an ESP exists, >> resulting in its unconditional setup. On BIOS-booted amd64, this wasn't >> harmful, just unnecessary, but it resulted in failed installations on >> non-EFI-supporting platforms like powerpc64. >> >> MFC after: 3 days > We certainly must have a better way to detect EFI or not > than the existance of /boot/efi???? > > I would of thought that machdep.bootmethod == EFI was the > defanitive way to detect this? > This is about the installer talking to itself internally. That sysctl doesn't exist on many platforms, and the decision of whether to set up an ESP is a policy decision only loosely related to whether the current system booted by EFI or not. As the commit message notes, this is to detect whether an EFI System Partition exists and is configured, which is *not* the same thing as whether the system booted by EFI. As such, this is a more direct check. -Nathan