From owner-freebsd-arch@freebsd.org Fri Aug 11 19:59:50 2017 Return-Path: Delivered-To: freebsd-arch@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 9172ADC21FB for ; Fri, 11 Aug 2017 19:59:50 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6A4871F8A for ; Fri, 11 Aug 2017 19:59:50 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 66116DC21FA; Fri, 11 Aug 2017 19:59:50 +0000 (UTC) Delivered-To: arch@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 65A0BDC21F9 for ; Fri, 11 Aug 2017 19:59:50 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (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 26BBD1F89 for ; Fri, 11 Aug 2017 19:59:50 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x22f.google.com with SMTP id u139so26054532qka.1 for ; Fri, 11 Aug 2017 12:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=q75gB/2eFgrWlTpHAsIM9A+4y6hjv2eFeR8KQTIFF2w=; b=jxkMjEKmkhITmigItVYM6qrpVGwISNR/3etkGhb4ri9rnJrw4eLb29MmtUFt9NTNVL r6ppzmv77H5419qsyQpDhcDJDkDRt4TogLSmzM8Of/qJ0atXBsZtAT26kHjl+Sobq5of k1WFfJwze3s2vjl6X3V2dZOIipZ+Gpx/6Q/+9XrTEdKcL7dI/DTRi49SRjgyr1Wt/a2W x8v9nGm+mmRJZfgM2bbIVjGFGjbkh1rzMAaJ2rDLXtq6A78E10njeK4X4Q22hfAfz7Ub 0Pyozi2qXeXRgsp8STkuhyOavfuHQsQa3Op1/HnJj6kHPGLwrciO9ezHVtm51kz8wnGG MuWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=q75gB/2eFgrWlTpHAsIM9A+4y6hjv2eFeR8KQTIFF2w=; b=ZWVjy0NvMB+vSVXU7/qQgUA7NbB4HWgv2VrfW9KmJnLkWhizsmJ6bJL+xMowCYtnhY CAN2vTBrr/Q6evvLZ+TSj1gB9fiieG/t9TWG6OZxe80VWdsOIXHvuPVfdgm45EKoTavW ih7WKam0gCAI82uhbecQk2ubVrfEX3SEcp1HAEE8hh4NrsbqYxQ6Gd0WanwgX1o8TwtM Agb/hwzTdUq7dY8ywN3GvTFTjBBS9Ux7GllS9wSaJfuGDW3H5bmenA7/nX2bzWCHcj9N srvBDHn4XuL+Ym8JfsxsHTEt2F+5zNcr8h4iblFjKju8zRecNgzmUXEhrBn+H+aqby8D IMrw== X-Gm-Message-State: AHYfb5i4aNSXohzGzh/3RRzaVlyT2lXMTGCU7D6P6MW1CyLQEdLEpBmJ pa1DhXZJDQR8kQ== X-Received: by 10.55.122.68 with SMTP id v65mr20350072qkc.225.1502481589182; Fri, 11 Aug 2017 12:59:49 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id 10sm1140520qtq.42.2017.08.11.12.59.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Aug 2017 12:59:48 -0700 (PDT) Sender: Mark Johnston Date: Fri, 11 Aug 2017 13:00:31 -0700 From: Mark Johnston To: Warner Losh Cc: "freebsd-arch@freebsd.org" Subject: Re: Proposed Enhancements to the EFI booting Message-ID: <20170811200031.GD19972@wkstn-mjohnston.west.isilon.com> References: <20170811194028.GB19972@wkstn-mjohnston.west.isilon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 19:59:50 -0000 On Fri, Aug 11, 2017 at 01:48:02PM -0600, Warner Losh wrote: > > There is also a "bootme" GPT flag that is currently ignored when booting > > using boot1.efi. We use it to avoid in-place upgrades: there are two > > root filesystems, only one of which is mounted during boot. Upgrades are > > done by installing the to-version of the OS to the inactive root > > filesystem, flipping the "bootme" flag off on the active partition, > > flipping it on on the inactive partition, and rebooting. > > > > Correct. EFI Boot Manager has a concept of profiles being active or not > active. That's how this functionality will be implemented. There's no > standardized notion of a partition being bootable or not. That's a FreeBSD > extension. same with bootnext and bootfail flags. > > So upgrades would become flipping the boot order in UEFI:BootOrder and/or > toggling active on the two UEFI:BootXXXX variables. It just changes the > command you need to issue from gpart to efibootmgr . > > > > How should this interact with step 4 of your algorithm? Should we prefer > > a GPT "bootme" entry over a filesystem on the same device as boot1.efi? > > > No. We shouldn't. That duplicates functionality, and the flags bits we need > to make these decisions are a pain to get to in boot1.efi. They are FreeBSD > specific, but won't be carried forward since better functionality already > exists in the BootOrder and BootXXX variables. > > This is much more flexible as well, since it allows you to have multiple > profiles that point to the same partition, but have different parameters, > only one of which is active at any time, which is impossible with the old > GPT scheme. Ok, that's fine with me. I just wanted to point out that that functionality is both useful and currently missing, so I'm glad that there will be a replacement with a simple interface.