From owner-dev-commits-src-all@freebsd.org Thu Mar 4 15:12:21 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 DB1EC54E1E3; Thu, 4 Mar 2021 15:12:21 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrvVY1cBvz3vtG; Thu, 4 Mar 2021 15:12:20 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 124FC9rx056115; Thu, 4 Mar 2021 07:12:09 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 124FC8KV056114; Thu, 4 Mar 2021 07:12:08 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103041512.124FC8KV056114@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <20210304160240.494a85605396c0751d7313da@bidouilliste.com> To: Emmanuel Vadot Date: Thu, 4 Mar 2021 07:12:08 -0800 (PST) CC: rgrimes@freebsd.org, "Rodney W. Grimes" , Nathan Whitehorn , Warner Losh , Brandon Bergren , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4DrvVY1cBvz3vtG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Mailman-Approved-At: Thu, 04 Mar 2021 18:11:07 +0000 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: Thu, 04 Mar 2021 15:12:21 -0000 > On Thu, 4 Mar 2021 06:56:11 -0800 (PST) > "Rodney W. Grimes" wrote: > > > > On 3/3/21 10:38 AM, Warner Losh wrote: > > > > > > > > > > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn > > > > > wrote: > > > > > > > > > > > > > > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > > > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > > > > >> What am I missing here?? One place I am being told this is run in > > > > >> an environment that may not even be an EFI booted system, and in > > > > >> another place it is being used as a test if something is mounted > > > > >> on it, which should only be true on an EFI booted system. > > > > > That the script in question is a generic script that runs as > > > > part of bsdinstall on every platform and has to be universal. > > > > > > > > > > The actual *problem* here is that > > > > usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > > > > >? ? ? ? ? ? ? *)? ? ? ? ? die "Unsupported arch $(uname -m) for > > > > UEFI install" > > > > > > > > > > which then causes the main script to bail out, leaving the > > > > system in a half-installed state. > > > > > > > > > > If that had just been an exit 0 this would have never been a > > > > problem, I suppose. > > > > > > > > > > Before the original change that broke this, there was a check > > > > that the script was not running on powerpc or mips platforms > > > > before running the efi bits, but this got taken out. > > > > > > > > > > > > > Well, incidentally. The bootconfig script needs to know if there > > > > is an > > > > ESP it should configure, but the signalling mechanism (the > > > > presence of > > > > the ESP mount point) was being broken by mtree making that directory > > > > unconditionally even on systems that don't use EFI. So then > > > > bootconfig > > > > tried to set it up, but failed later on, because there was no EFI > > > > loader > > > > to set up. The mtree change makes the ESP mount point only exist on > > > > systems with an ESP. > > > > > > > > > > > > So you made a unilateral change, without discussion of the bigger > > > > design, to something without even asking the original person who made > > > > the change to mtree about it for what sounds like an obscure case in > > > > the installer that could be solved in a different way? It's trivial > > > > enough to look at the boot method sysctl and skip the EFI update if we > > > > didn't boot EFI (and if by change that's not on all systems, it's easy > > > > enough to add it on all systems). I have no notion about why that > > > > wasn't considered, at least, before jumping in and taking people by > > > > surprise. > > > > I still do not understand why machdep.bootmethod=EFI was rejected? > > Is this value not present on ALL platforms that boot in EFI mode? > > if exist(machdep.bootmethod) && machdep.bootmethod=EFI seems to > > me to be the best and valid way to make this decision. If that > > has issues working on a platform we need to fix that issue and not > > do all this other stuff. > > We need to install and create the efi dir even if the installer is > booted in CSM mode, so a user can switch to full uefi mode after and > still can boot the FreeBSD that was installed. (The same thing must be > done for bios boot code). Ah, yes, ok, I see that issue, but isnt that driven by the fact the user has selected GPT (EFI) in the disk menu, so could be drive by an installer variable like any other aspect of the installer? Passing around the users install parameters via the file system is fragile as noted else where, this information should be clearly avaliable within the installer script itself. > > > > > > > > > Next time, talk to people first. That's the whole point of having > > > > review tools, mailing list and git blame. > > > > > > > > Warner > > > > > > This method of testing was in the original review here posted on Feb. > > > 23: https://reviews.freebsd.org/D28897 > > > > > > The description of the test procedure you're objecting to was even in > > > the summary! Then we had a discussion by email about the change to mtree > > > on the committers list on Feb. 28 to resolve a bug affecting PowerPC in > > > the patch reviewed and approved by you. I then waited several days and > > > had a long thread for several days on the mailing list about the > > > approach. coming up with this short patch -- again, as a bug fix to a > > > reviewed approach. > > > > > > We can change the logic -- that's fine! But, to paraphrase, the reason > > > we have reviews is so people like you can look at the review and note > > > these kinds of problems when they are reviewed, not after the commit > > > goes in. There's a significant amount of whiplash when you do get > > > patches reviewed, approved, and then the person who reviewed and > > > approved them accuses you of "taking people by surprise". > > > > > > The installer *does* mount the partition in advance, so checking whether > > > there is a mounted file system is a perfectly reasonable test to do. We > > > could also check fstab. I would like to understand what is actually > > > wrong here first, though. Especially after this misfire -- which is > > > problematic for reasons that are still not clear to me, since there are > > > a number of standard directories in hier(7) not in mtree -- I want to > > > make sure we actually do have consensus about what is changing and why. > > > > These *should* be fixed. ALL directories that are part of a finished > > FreeBSD system should be present both in hier.7 and in the mtree files, > > deviating from that should only be allowed if there is some really > > really grand reasons. If the reason is "architecture foo does not > > have directory /bar/zap" one could and should create an arch specific > > mtree file that covers these, having these mkdir's (prefer to see > > all those changed to install -d's) scattered around all over, IMHO > > creates maintance and inconsistency issues. > > > > > -Nathan > > -- > > Rod Grimes rgrimes@freebsd.org > -- > Emmanuel Vadot -- Rod Grimes rgrimes@freebsd.org