From owner-freebsd-current@freebsd.org Fri Jan 18 21:10:23 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 280EB148285F for ; Fri, 18 Jan 2019 21:10:23 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FC9773B19; Fri, 18 Jan 2019 21:10:21 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id bd065a6d; Fri, 18 Jan 2019 22:10:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=KQQxV8SLdp8Lk7fOHEvi8q9G8yY=; b=L/WIo+oOlrktPxJnRY5yEOjQTHO1 gmlyF9EwgE/LNo0701qfV27Gu+8F5kj7XiB5VfBWNqx0ZUuznbTj7p4ScISETPKJ I5epWxExyRH0Un5bTOHWEHb9N2WaQdP3a79TGz1cLaaeSOcLz4Cn9PCkHrdEx5p2 aSGVaylP/iFctwc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=QatPMFkEDXp3Zb+/JVoGFY4eBMfTYDi1RT9qc0G0KAQCYIVQYe6AHRdq /5IvZAZaU6cXu7GcuOFF9DCyZijKXZ4ptTUW55mLZ/hDPdJqYcv1cGC0XIjFBS9p 4g6TlVx5+19sphf1Z0Y+MqRJE6yn0Wv1tD7yzhDHfWsnyP/KwIY= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 5d1c3246 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Fri, 18 Jan 2019 22:10:13 +0100 (CET) Date: Fri, 18 Jan 2019 22:10:13 +0100 From: Emmanuel Vadot To: lev@FreeBSD.org Cc: "Rodney W. Grimes" , freebsd-current@freebsd.org Subject: Re: GPT boot has less features than legacy MBR-based one (Was: UEFI, loader.efi and /boot.config) Message-Id: <20190118221013.81c8729c7bf17038e1823b52@bidouilliste.com> In-Reply-To: <49056065-1e62-f0dc-c7a4-8c358de4266e@FreeBSD.org> References: <201901181935.x0IJZ4tX057034@pdx.rh.CN85.dnsmgr.net> <49056065-1e62-f0dc-c7a4-8c358de4266e@FreeBSD.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8FC9773B19 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=L/WIo+oO; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-2.84 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; MX_GOOD(-0.01)[mx-backup.blih.net,mail.blih.net]; NEURAL_HAM_SHORT(-0.65)[-0.647,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.29)[ip: (-1.59), ipnet: 212.83.160.0/19(0.45), asn: 12876(-0.32), country: FR(-0.02)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 18 Jan 2019 21:10:23 -0000 On Fri, 18 Jan 2019 22:50:31 +0300 Lev Serebryakov wrote: > On 18.01.2019 22:35, Rodney W. Grimes wrote: > > >>> errm.. you press a key and enter device and or loader path. if it is not working - the code is there to be fixed. > >> And loader looks to "bootme" attribute and try to boot from partition > >> which has one, even if it is loaded from other partition itself. > >> > >>> GPT does not have the concept of active partition. > >> It has "bootme" / "bootonce" attributes. And [zfs]gptboot doesn't have > >> any tools to set these attributes, AFAIK. Same for UEFI boot code. > > > > The gpart(8) command is used to set/unset these. > gpart need booted system. NanoBSD typically have two "system" > partitions, "old" (previous) and "new" (current). After upgrade they > switched (new code is written to "previos" partition and bootable > atteibute is set to it, "active" in case of MBR and "bootme" in case of > GPT). > > If this new partition has problems and could not be booted, it is hard > to boot from "old" (previous) one. MBR + boot0 could (interactively) > change active partition before system is booted, and this problem could > be solved with one keypress: you select old partition on boot. > > -- > // Lev Serebryakov > With UEFI Boot* variable you could do : - Update previous partition and set BootNext to it - If it fail next boot will be on current partition due to BootOrder - If it succeed, change the BootOrder to have the new partition first. -- Emmanuel Vadot