From nobody Thu Aug 18 13:02:23 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M7lRK2yYSz4ZRm3 for ; Thu, 18 Aug 2022 13:02:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M7lRJ5mwHz3sGl for ; Thu, 18 Aug 2022 13:02:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x930.google.com with SMTP id e3so626898uax.4 for ; Thu, 18 Aug 2022 06:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=5jI83qT5OTUEh9VidoSGwYssytMuJbgnw34bXkoGECs=; b=fCN/HPOssRSZ/BoemkxbzgoKCULCnJl/oxakhW3hTPCejLJl/sSsYsCx5VFgMLpHPc 1RSLsUBL5IHh69d9btVbXKMWPlvz4u+OMNpjl9cfAy4Fx8LQ2Kk1tadJ4D0pG89Oan/n DbYdcW0rLmcNgwKpwxXrGk0XRPycJVcxiUclvc3pv4BOgQrZ5PcnWRxxaYW3VVik7+JN T+eeVcHWK1prK8f9SkS1lO8XVPO1nmfvadDBSPTCpsV806goShpt2K3zxm8PProV8KFF 8emneXOQXw/sKpYfIxekJ2P7lvtf4SmgSHq5QR/AvVg/EoSJ0Gs25nW1JgTaw8m7HPUk P3Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=5jI83qT5OTUEh9VidoSGwYssytMuJbgnw34bXkoGECs=; b=BfsAScWpbETaSMz59VX5VLzxQOAzSq2l+lNd1E6haqBZaA2MDs1uq2sdtMui+Yo7O6 mKFMOw+ZpehZnyLDZW7MmaqjGOuV5tvl0tXbjPv0kUzWe/xL6+gYMqyeDvwso3q9VyOl xYYqQsncGZ0UOKBd8W8xYK+Nzb1O3VDj1+a2vOqmQX1sWl0yVWCLRvVj+j7/c7KiddAz FJ9YYAw8meXbnTGXncsJcSD0MrRiZE1C594RQQRtvR+5iBy1gedPzcixvjY4ps0KMrAq 2LMRBnPH5RxNjCUXb+PJNdG1ZBjjwxU7m8i7EWXAWV+pfjl271JjWQDkiqypZDTvsyOo 1jWA== X-Gm-Message-State: ACgBeo3V+g8/gnMNnWbNseSchOYwg6upJVlVpzxO+yE6w4Ao8HCzxHE7 ZVR6T7ypVOI2R14oGnUeWk6uajQl637DEyQaPCPGcg== X-Google-Smtp-Source: AA6agR5gfuc7wlPRqhUtRKxMPKjyYVS6GcFFcVuMk0sDekgCeDDWkbJ3RagPC7esu8b0cfXQJonb7xQLyo/Or2/hxhs= X-Received: by 2002:a05:6130:112:b0:38c:4226:62f2 with SMTP id h18-20020a056130011200b0038c422662f2mr1058286uag.82.1660827755433; Thu, 18 Aug 2022 06:02:35 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20220814.095721.849461222067829352.yasu@FreeBSD.org> <20220814.110850.1703361053728529792.yasu@FreeBSD.org> <45007308-136a-8938-33d0-bb2509ee6ae7@FreeBSD.org> <20220814192609.wyfcogl3dwzteuva@colony.nomadlogic.org> <16144.1660803537@kaos.jnpr.net> In-Reply-To: <16144.1660803537@kaos.jnpr.net> From: Warner Losh Date: Thu, 18 Aug 2022 07:02:23 -0600 Message-ID: Subject: Re: Updating EFI boot loader results in boot hangup To: "Simon J. Gerraty" Cc: Pete Wright , Stefan Esser , FreeBSD Current , Yasuhiro Kimura , Oleg Lelchuk Content-Type: multipart/alternative; boundary="00000000000065659305e683982b" X-Rspamd-Queue-Id: 4M7lRJ5mwHz3sGl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b="fCN/HPOs"; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::930) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::930:from]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; FREEMAIL_CC(0.00)[nomadlogic.org,freebsd.org,gmail.com] X-ThisMailContainsUnwantedMimeParts: N --00000000000065659305e683982b Content-Type: text/plain; charset="UTF-8" On Thu, Aug 18, 2022, 12:19 AM Simon J. Gerraty wrote: > Warner Losh wrote: > > I think I broke it with my latest updates. I don't have a good ZFS > testing setup > > so I'm spending a little time enhancing the bootable image generator to > have > > one that I can easily test boot with qemu. > > FWIW bhyve is *excellent* for mucking about with EFI and loader in general. > > I did all the UEFI support for Junos using bhyve (initially so I could > test LOADER_VERIEXEC), and I regurlarly use it to test various install > processes - pxe boot and net install, usb install, etc. > > I build loader.efi from a branch off main, everyting else is from > stable/12 at present. > > The combination of makefs, mkimg and bhyve - make hacking the low level > boot bits much safer. > > Byhve is quick too - my Junos VM's take about 40-50s from start to login > prompt. > Yup. Use all that stuff. My issue was tooling (creating the bookable ZFS images) as well as not being able to create an image that recreates the problem. I've fixed the tooling issue, but used qemu so I could capture stout to see if the tests pass/fail easily in a script. Bhyve, as far as I know, can't do that without delving into separate expect scripts. And it can't run arm binaries on x86... I also use bhyve when I want to attach a debugger or need to test longer running things. But in this case it took a while to find how to reproduce... but I found one and just pushed a fix. Warner > --00000000000065659305e683982b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Aug 18, 2022, 12:19 AM Simon J. Gerraty <sjg@juniper.net> wrote:
Warner Losh <imp@bsdimp.com> wrote:
> I think I broke it with my latest updates. I don't have a good ZFS= testing setup
> so I'm spending a little time enhancing the bootable image generat= or to have
> one that I can easily test boot with qemu.

FWIW bhyve is *excellent* for mucking about with EFI and loader in general.=

I did all the UEFI support for Junos using bhyve (initially so I could
test LOADER_VERIEXEC), and I regurlarly use it to test various install
processes - pxe boot and net install, usb install, etc.

I build loader.efi from a branch off main, everyting else is from
stable/12 at present.

The combination of makefs, mkimg and bhyve - make hacking the low level
boot bits much safer.

Byhve is quick too - my Junos VM's take about 40-50s from start to logi= n
prompt.

Yup. Use all that stuff. My issue was tooling (creating the bookable= ZFS images) as well as not being able to create an image that recreates th= e problem. I've fixed the tooling issue, but used qemu so I could captu= re stout to see if the tests pass/fail easily in a script. Bhyve, as far as= I know, can't do that without delving into separate expect scripts. An= d it can't run arm binaries on x86...

=
I also use bhyve when I want to attach a debugger or need= to test longer running things.

But in this case it took a while to find how to reproduce... but = I found one and just pushed a fix.

Warner=C2=A0
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
--00000000000065659305e683982b--