From owner-freebsd-current@freebsd.org Tue Apr 30 21:15:27 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 ED23B159EA7D for ; Tue, 30 Apr 2019 21:15:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFB748EFCD for ; Tue, 30 Apr 2019 21:15:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x835.google.com with SMTP id j6so18115700qtq.1 for ; Tue, 30 Apr 2019 14:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MdSdBRb3ceBRn59BAWiZ0uV+waWI+EyLl4YOQnHwlqI=; b=ul4tNIcxZ+wVR81wddK7eUbqX/fB9wT/+8z6ktKSKMW7Pr/I8vBQiY/GI75XJJVenC k3xkpxlE+9t5MXm0hqPf4WOTMr1TyWaBWjpUMvzr1TN0LJ57Qfl/OIsCEPI1yt/nU3j5 l9BoRjH0XMVseDUjrTu4SZtlNyLSuZ2jI2voYaVUidXDV2B+dIGWAC5ySvQgTNE8PSAI 8pq+X9aDLX4eQCdMQ4ak2odmRd5KZob9QDBQtSwIyk5n5JC5h0u2nZ4QO7M1IOLxKHE3 q+EXeUFI/m/utxJT6Qj0g1+Afo7ZfiL1DCyXTQpWULhlhRWnNvU+b5aq5pEyCHkmtJHg NCPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MdSdBRb3ceBRn59BAWiZ0uV+waWI+EyLl4YOQnHwlqI=; b=NmLCCcfeMyGS+8Kzc1G1PDqw3SBXOFmAn9vo3PVgQdG/hapE3SyJGzwzSuSRS9pTEY wlNCpdC2WfvfgxOXx56M/hIz6jHYrYURhSDMlgaQWjvYbAubgL/aX31/sq7Ks9ZnT3kU to6NrCZP0zUizOIL8MAw71a9DEgT+qKdidfG3zhCOAijrz2+Q89LjIORuCGET3gvuAd1 EYSAdrvFiVR8oAerl6CTYdfzOeqofS/ZZeosQK0eOCC1wtCYs77vTZKyCpujz5eVc95u AZjSEErJJrw/kprtn4Hcsvg+wQSsmX2nFZgJ4x0c1u4mTVtyX1+N0hwHHU9CXKb5jvHw umHw== X-Gm-Message-State: APjAAAX4iCIzM5rs9dB0Gv8uIMavHwTW/p24du89PBOh9Br7MRkRtyvY Jzdy/rFFEusB3rA59LFeJmEgqbYquCZwjxq4tqkFRA== X-Google-Smtp-Source: APXvYqznrQCf2M4U1HJtECDAfoWvDhrl77SJp13ZfgESTbQHm3bpFBEr4munbcki3XEcRgKv9ufuHvr4ZWTq5ZFO8oc= X-Received: by 2002:ac8:3237:: with SMTP id x52mr21602884qta.242.1556658925371; Tue, 30 Apr 2019 14:15:25 -0700 (PDT) MIME-Version: 1.0 References: <912985968.20190119125228@serebryakov.spb.ru> <1951151017.20190119235425@serebryakov.spb.ru> <4636753.YNO7O01DYZ@photon.int.bluestop.org> <17710465740.20190120134042@serebryakov.spb.ru> <3f4214e2-36af-cc87-0a3c-2c7ce26cffd8@FreeBSD.org> <0bbb962f-cc59-f29d-b26d-fa675cbb1082@FreeBSD.org> In-Reply-To: <0bbb962f-cc59-f29d-b26d-fa675cbb1082@FreeBSD.org> From: Warner Losh Date: Tue, 30 Apr 2019 15:15:14 -0600 Message-ID: Subject: Re: GPT boot has less features than legacy MBR-based one (Was: UEFI, loader.efi and /boot.config) To: Lev Serebryakov Cc: Toomas Soome , Rebecca Cran , FreeBSD Current X-Rspamd-Queue-Id: EFB748EFCD X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ul4tNIcx X-Spamd-Result: default: False [-5.91 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[5.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-2.93)[ip: (-9.19), ipnet: 2607:f8b0::/32(-3.18), asn: 15169(-2.24), country: US(-0.06)]; FREEMAIL_CC(0.00)[me.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 30 Apr 2019 21:15:27 -0000 On Mon, Jan 21, 2019 at 6:13 AM Lev Serebryakov wrote: > On 21.01.2019 15:59, Toomas Soome wrote: > > >>>>> Is too complicated? Boot1.efi doesn't allow that, but loader.efi > does. > >>>> loader.efi lives on ESP partition, do I understand it right? So, it > >>>> could not be damaged with "bad" upgrade? > >>> > >>> It could, unless the backup is created. > >> Does it live on code (root) FS or ESP? I understand, that when you > >> upgrade ESP partition, you could ruin it, but typically root FS is > >> upgraded much more often than ESP/boot0/boot1 parts. > > > > If you are using boot1.efi, the loader.efi is in OS /boot/loader.efi > annd boot1.efi is stored to ESP and will execute loader.efi as bios boot2 > programs do. > So, Warner's advice to use > > set currdev=diskXpY: > boot > > with loader.efi is not direct replacement to choosing boot partition > via boot0 now (as "boot1.eif doesn't allow that" and /boot/loader.efi > could be broken with unsuccessful upgrade), am I right? > Yes. And after my latest fixes, you can add 'set currdev=diskXpY' to ESP's /efi/freebsd/loader.env as well. boot1.efi is really super limited and tries too much DWIM to be useful, so it's being retired in favor of loader.efi. > > we will drop boot1.efi (it is already dropped in illumos btw), and will > only use loader.efi - and in this case, the loader.efi is installed to ESP > and will only start the kernel. > Ok, I need to wait for it. > I think all the features are there. You can install loader.efi as you used to install boot1.efi and have it work as well or better than boot1.efi. > > But then again, if you are using stock (generic) OS on embedded system, > you are already doing it wrong and will get into the trouble sooner or > later:) > I can not say, is NanoBSD "stock" or not :-) > One of the big reasons I did the latest changes was to make it possible for NanoBSD to work better. Warner