From owner-freebsd-current@freebsd.org Tue Dec 19 22:39:00 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 4152DEA556C for ; Tue, 19 Dec 2017 22:39:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C934C6F05D for ; Tue, 19 Dec 2017 22:38:59 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-wm0-x232.google.com with SMTP id g130so13334437wme.0 for ; Tue, 19 Dec 2017 14:38:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=M1g8yLrGdXVMA+z5pCK8ee9RrPmbbVK2GS8+Rq8M13E=; b=DjykNrfAsx4RhAs1dRXEQVte//ZhOgnqggu5SX/aur46OVapdEj++AmiuPn+J+fm7d KOaXGWiBL3YGn8GxkOVOYxt0BuALRmza/rOi0eBLJi4ZlgGPc94g4+GGVqe9JSaDhY3A CAm9vIIskvph+KHWaW9gl9Ok82G8aHE0tIaLS1S6F6reeh0sY23z6UW4j019SLkMN1IL rq9+HMQl484NMZtNKubqPnAZBkcaBYWtkVeZqCaFFLQ4BJhhTOkB5JcmQn2wB63YTc6q UMSWgDTrTfSN1QgUhgqwQfyZGXSuT0ifyqxVQIz0Y6y3kM4KIr+jHBytFYFHrz7KHYXD WPYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=M1g8yLrGdXVMA+z5pCK8ee9RrPmbbVK2GS8+Rq8M13E=; b=XLXpC7WaCnWTXeESiOKoo9d8Ps/1I7HWH9kPdN+DJyJGYEmBiENz1LebjXtsrLlL4G 9VAD2HN/lXGY26qNPBlZ02gSzYl7YEYZfaD6lHQISP0hFoWlGaIS/J/N5MuUySeO/uy1 d6sGus/7nL8PIWIBcfPguQognz/7eHSPYqG1h94jUY1cnlmg+tut/rvLydXCfoz7yakb J1L5sRU/J2bVFyhbg4zDrRIie5rNu+JES39wxQ70Z9Trp0bQAOodjE/+Un4iqIj4gdIs wtERZZzOGoZJNWBxge3+MZt+Tl1mHJcpUuPP2QqmB8BELUP53vg/TgwPeB6vJ2HrBS/1 6l7w== X-Gm-Message-State: AKGB3mLjiJVqVckrvj0MRgCSCtvnsOyh+07Ycv4wsQmTU+X/8CeVq52b 1TLZ5TtFol2VxhbNF4tslU40B83atCzr9gmONV3uVA== X-Google-Smtp-Source: ACJfBotfSqKvhSSvEyBy+WSk1htO2lRe1uhHwqt2NVvbuTumP0f+mnb04INUgHAyDAJfmzqvvhu1DCEfHa0/dNrhorg= X-Received: by 10.80.181.70 with SMTP id z6mr2550426edd.201.1513723138216; Tue, 19 Dec 2017 14:38:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.149.174 with HTTP; Tue, 19 Dec 2017 14:38:57 -0800 (PST) In-Reply-To: References: <201712190106.vBJ16LpE018835@pdx.rh.CN85.dnsmgr.net> From: Oliver Pinter Date: Tue, 19 Dec 2017 23:38:57 +0100 Message-ID: Subject: Re: UEFI booting survey To: Warner Losh Cc: "Rodney W. Grimes" , Mark Millard , FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 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 22:39:00 -0000 On Tuesday, December 19, 2017, Warner Losh wrote: > On Dec 18, 2017 6:06 PM, "Rodney W. Grimes" < > freebsd-rwg@pdx.rh.cn85.dnsmgr.net> wrote: > > > 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. > > > Active is not a GPT concept. UEFI makes it hard to implement since there is > no good API to get and set the flags FreeBSD's gptboot uses to hack this > concept in. Active is done via BootOrder UEFI variable. Loader.efi and > boot.efi completely ignore this today. I have no plans on changing that. And what's about the bootme and bootonce flags in gpart? They are freebsdism? Or they are the equivalent of active in the UEFI standard? > > > > > 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 > > > Active isn't a got thong. So no. > > Is there any fallback to skip loader and go direct to > /boot/kernel/kernel, back to /kernel any more? > > > You are thinking about this wrong. We are loader.efi, not boot2. This is > one of the big advantages of loading directly. We don't have the space > limitations that forced that design, so we should simplify. > > Warner > > > 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 > _______________________________________________ > 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" >