From owner-freebsd-current@freebsd.org Tue Dec 19 01:06:28 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CFCAE984C8 for ; Tue, 19 Dec 2017 01:06:28 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.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 478547A56E for ; Tue, 19 Dec 2017 01:06:27 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBJ16LW2018836; Mon, 18 Dec 2017 17:06:21 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBJ16LpE018835; Mon, 18 Dec 2017 17:06:21 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201712190106.vBJ16LpE018835@pdx.rh.CN85.dnsmgr.net> Subject: Re: UEFI booting survey In-Reply-To: To: Warner Losh Date: Mon, 18 Dec 2017 17:06:21 -0800 (PST) CC: Mark Millard , FreeBSD Current X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Mailman-Approved-At: Tue, 19 Dec 2017 01:25:54 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 01:06:28 -0000 > On Mon, Dec 18, 2017 at 3:12 PM, Mark Millard wrote: > > > Warner Losh imp at bsdimp.com wrote on > > Mon Dec 18 20:29:45 UTC 2017 : > > > > > The specific thing we will stop doing is that in the absence of > > > instructions to the contrary, we will no longer search for root on a > > device > > > other than the one the loader.efi came from. > > > > Warner Losh imp at bsdimp.com wrote on > > Sun Dec 17 19:52:07 UTC 2017 : > > > > > In the coming months, we're looking at dropping boot1.efi and instead > > > installing /boot/loader.efi onto the ESP (most likely as > > > \efi\freebsd\loader.efi). > > > > > > Combining the two statements would appear to have consequences > > not obvious from the separate statements in isolation. Rewording > > the first to substitute where loader.efi comes from based on > > the second (if I interpret right): > > > > MISQUOTE > > The specific thing we will stop doing is that in the absence of > > instructions to the contrary, we will no longer search for root > > on other than the device for the ESP used (which will hold > > loader.efi). > > END MISQUOTE > > > > The specific thing we will stop doing is that in the absence of > instructions to the contrary, we will no longer search for root on other > than the device for the ESP used (which will hold now loader.efi as > boot1.efi will shortly be eliminated). Yes please, that is the correct behavior, our searching can lead to problems, and as you have pointed out, often more problems than it ever really fixed. > > Or the following pseudo-code with all the weird special cases removed for > clarity > > load loader.efi from ESP > if BootXXXX uefi variable holds a second path, use that for root/kernel > otherwise if an override variable holds a kernel/root path, use that > otherwise scan for a usable ZFS pool, use that if it exists > otherwise use the same partition loader.efi was booted from for root/kernel > if it's usable > otherwise use the first UFS partition on the ESP that's usable. use the ACTIVE ufs partition, not the first, I can have more than 1 slice, only 1 of them can be set active. Do not use any ufs partitions if they are not in active slices, it is possible to have 0 partitions set active. > > A partition is usable if /boot/loader.rc exists on that path. A partition is usable if it is in an active slice, and ^above Is there any fallback to skip loader and go direct to /boot/kernel/kernel, back to /kernel any more? > What is being deleted is one final step: "otherwise use the first UFS > partition on any drive in a random order that's usable." which used to be > at the end of the boot1.efi psuedo code. It's my belief that no such > installations actually use this due to the random factor today (plug in a > new USB drive and it might take over). If my belief is wrong, it's my > belief that efibootmgr will solve it, and failing that, the fallback > mechanism (for platforms that use u-boot + EFI where UEFI variables don't > work) will allow the two or three people that are doing this today. > > Warner > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- Rod Grimes rgrimes@freebsd.org