From owner-freebsd-current@freebsd.org Tue Dec 19 23:18:03 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 7C4ACE81EEE for ; Tue, 19 Dec 2017 23:18:03 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E93070B07 for ; Tue, 19 Dec 2017 23:18:03 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from helicon.physics.ucla.edu (helicon.physics.ucla.edu [169.232.156.253]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id vBJN6hBj030980 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Tue, 19 Dec 2017 15:06:43 -0800 Subject: Re: UEFI booting survey To: freebsd-current@freebsd.org References: <201712190106.vBJ16LpE018835@pdx.rh.CN85.dnsmgr.net> From: Nathan Whitehorn Message-ID: <5dc9d252-cb0d-8d4d-979b-d9faaa3ff1b6@freebsd.org> Date: Tue, 19 Dec 2017 15:06:42 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVa21JGLqHYCbvTA9GmNhQu4EryvedlrzTdaEqoGOhw8UFyZAYmplAQbebYFekxL3wos5d89+gKwysgel52AYc1KW96V2jfUwSs= X-Sonic-ID: C;WINDRxHl5xGpbesnWtmBlw== M;tFWhRxHl5xGpbesnWtmBlw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd 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 23:18:03 -0000 On 12/19/17 14:38, Oliver Pinter wrote: > On Tuesday, December 19, 2017, Warner Losh wrote: > >> [snip] >>> 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? > They are a FreeBSD-ism. Because UEFI handles parsing the GPT tables internally, it is not even possible to read them from loader.efi. -Nathan