From owner-freebsd-current@freebsd.org Fri Jan 18 19:44:36 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 94C2014A9158 for ; Fri, 18 Jan 2019 19:44:36 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [148.251.9.81]) by mx1.freebsd.org (Postfix) with ESMTP id E28E9706E2 for ; Fri, 18 Jan 2019 19:44:35 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [192.168.23.186] (unknown [89.113.128.32]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id B225A8CD7; Fri, 18 Jan 2019 22:44:34 +0300 (MSK) Reply-To: lev@FreeBSD.org Subject: Re: GPT boot has less features than legacy MBR-based one (Was: UEFI, loader.efi and /boot.config) To: Warner Losh Cc: FreeBSD Current References: <8DDD8F7A-40CA-48BB-9F71-56733100AFE0@me.com> <1a19320b-2211-129c-b213-96601814e0d0@FreeBSD.org> From: Lev Serebryakov Openpgp: preference=signencrypt Autocrypt: addr=lev@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFKbGksBEADeguVs+XyJc3mL3iiOBqDd16wSk97YTJYOi4VsHsINzJr09oFvNDiaDBIi fLn2p8XcJvehcsF2GSgrfXfw+uK4O1jyNIKJmiYA0EtE+ZbRtvDrrE0w6Q8+SDeKA21SWh3Y vSQ0DJUontbgW55ER2CbEiIUTIn34uQ0kmESAaw/v5p/9ue8yPTmURvv130FqPFz8VPzltqL NxyGt54TxPfKAzAHEIwxlEZ63JOwzloKh1UDBExcsf9nJO08/TAVgR5UZ5njFBPzaaquhRoP qPJLEQQDqxPIlvMNtHKf7iIebE4BHeqgCdJA0BoiR6gpa0wlsZtdrTPK3n4wYSphLvGbhfOZ YW/hbcu7HYS/FImkVxB3iY17kcC1UTnx4Z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kASBdsK07y4ylLAJzUGCvYLBU3gx0bBOB2S8SbxHYmQlj ewjovbp+MbT+CoXNxZp+gDRModGyIMdRIotkRiDbgNl0VWIT0SS1GUUlUHKzQ/ZPUvpvk6Gq s/SYBS7rBQNSoXXmJxNW6I6atVNW7JhInC1tkHxBlbpik4FK07J6NHFTx+9ygyCxbxwNA/Le FGkL3kU0VFXR2dNiAVbeueUPF6tU5Bye5ftgpLKOSAbo1g++EKUkc8335/4oYRBMcGEk4xUr NAvzoFPhA2W3KtklruJ9ThrFt9+//NB5ySlVgTwGWMuBJoskEmNOTBv34/UQPUIuE4xSwy6y H+nRQJooiMFo5QCosslJPlwyV63NS9lYXB6n3QWOCP6sFdWACNUCOFv4uk7LQdY9BsCmt2Tk cLuHmoS+fvUesQXnYV2aQi9HciriPIj2gvJ6WjgiaC/PpePil0fzyrfG/JMyHL0qcgmYoj0= Organization: FreeBSD Message-ID: <1f45099e-6a37-3edb-6bd4-f92eb2c4fde8@FreeBSD.org> Date: Fri, 18 Jan 2019 22:44:28 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AEFzee3et6juaqcqkoJ2136tBmkks5VIk" X-Rspamd-Queue-Id: E28E9706E2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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 19:44:36 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --AEFzee3et6juaqcqkoJ2136tBmkks5VIk Content-Type: multipart/mixed; boundary="YLhrvtn4KbffTQzTQ6TqpRvZRqNEIrPje"; protected-headers="v1" From: Lev Serebryakov Reply-To: lev@FreeBSD.org To: Warner Losh Cc: FreeBSD Current Message-ID: <1f45099e-6a37-3edb-6bd4-f92eb2c4fde8@FreeBSD.org> Subject: Re: GPT boot has less features than legacy MBR-based one (Was: UEFI, loader.efi and /boot.config) References: <8DDD8F7A-40CA-48BB-9F71-56733100AFE0@me.com> <1a19320b-2211-129c-b213-96601814e0d0@FreeBSD.org> In-Reply-To: --YLhrvtn4KbffTQzTQ6TqpRvZRqNEIrPje Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18.01.2019 22:27, Warner Losh 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. > =C2=A0And loader looks to "bootme" attribute and try to boot from p= artition > which has one, even if it is loaded from other partition itself. > Correct. And system crashes, because "bootme" partition has broken installation. With MBR + boot0/boot0sio it is solved with one keypress. > > GPT does not have the concept of active partition. > =C2=A0It has "bootme" / "bootonce" attributes. And [zfs]gptboot doe= sn't have > any tools to set these attributes, AFAIK. Same for UEFI boot code. >=20 > gpart can set these. You need live, booted system (at least single-user) to use gpart. > UEFI completely ignores them, though, because getting to that data is > hard in the UEFI environment. But in UEFI, you're supposed to use > BootXXXX and BootOrder/BootNext as managed by efibootmgr. Again, you need booted system to use efibootmgr. boot0/boot0sio works before system and could switch boot partition in case of MBR. It is why I write, that GPT/Legacy and GPT/UEFI miss important feature which is present for MBR boot for ages. Which is sad & funny at same time, as GPT/UEFI has much more code than 512 bytes of boot= 0. --=20 // Lev Serebryakov --YLhrvtn4KbffTQzTQ6TqpRvZRqNEIrPje-- --AEFzee3et6juaqcqkoJ2136tBmkks5VIk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE+W0coLX0MYtnSzMK6rA8WL/cR48FAlxCLJxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 NkQxQ0EwQjVGNDMxOEI2NzRCMzMwQUVBQjAzQzU4QkZEQzQ3OEYACgkQ6rA8WL/c R4+FAA//Q39fd1/1JuoTBAqXVWdSZ0LLz8ZCfl4x8O3Gxjg2e4ZGYqUq7hL22yEQ V6k4XxajEinBaXvxLRiRbtely4UH51JEray7uPuBiE44IGSqwe//AqQGyWWIFock MoIaaVvzXGzfXOM30/ry64ru21Ee79wIKG2YF7hgajZRbxOY3Qj1SadW0PFms8tf LIDxTsyy5KPWLAklBvXYCYvJHTUuanal0JUuujna9ipNtHwXo1uwCPIzDWY6qaq1 uiTKcJ7DDC93dhy3sEl1eBK2uWZX9PQ23c+/150ym1AEiHk9CXX/emx7JpLSTxdZ xtPbF4B/BoH8J9pG5sGZEqSyfzSeyU5ixixBxkPIf0WwEGfDXvT2533EtctBSpYo feS23rV+4RWFS4RWcnkHA/2loW2JEBEju8xV3rcNM5IIS6xJQE3EemtRUUdXEOS1 PWjMLupR3RnNWgMVck2y9NWCeM/XnEyxq7OyFAdY1EOm9ftQxCTvxFY/BfmUCg29 yUTuJ6qVWLy2I+rtVfBcqlo2kLnj7YITaSW/25nfjrkZutsox1WcBVtzsHAI6vKV DH6hy+boFjbmV2owt45UfoAD+wXqCkfuN7UIF4boHAHRj7KOZYVrwMZwfEE7odM/ dXP7KVM02yWOyV0h4E6OhoSwd6RU21SMg/eqGOCgcjHCcmL6Mg8= =i3sP -----END PGP SIGNATURE----- --AEFzee3et6juaqcqkoJ2136tBmkks5VIk--