Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2022 07:02:23 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "Simon J. Gerraty" <sjg@juniper.net>
Cc:        Pete Wright <pete@nomadlogic.org>, Stefan Esser <se@freebsd.org>,  FreeBSD Current <freebsd-current@freebsd.org>, Yasuhiro Kimura <yasu@freebsd.org>,  Oleg Lelchuk <oleglelchuk@gmail.com>
Subject:   Re: Updating EFI boot loader results in boot hangup
Message-ID:  <CANCZdfopk%2Bakv9omTfZauvC=0kYBgu1mMWpto0wao4SRZQKRCg@mail.gmail.com>
In-Reply-To: <16144.1660803537@kaos.jnpr.net>
References:  <20220814.095721.849461222067829352.yasu@FreeBSD.org> <CA%2BGqWgsMYEp4goeLBO4%2BufDU_ap5Opmf4udL_WSd-NZU1Q3dog@mail.gmail.com> <CANCZdfp4Har%2BrLV5kg94EWO_Uc767K7ga9AKLTznvqoC2JvQXw@mail.gmail.com> <20220814.110850.1703361053728529792.yasu@FreeBSD.org> <CA%2BGqWguOkHegLmijD2BAYhj7t9qCVY%2BmYNLN1_tJGp%2Bi=mNn6g@mail.gmail.com> <45007308-136a-8938-33d0-bb2509ee6ae7@FreeBSD.org> <20220814192609.wyfcogl3dwzteuva@colony.nomadlogic.org> <CANCZdfqgQ9ufhaBZ-FRjOAnFQtGJVtVoO4%2BJYgCU3eH_QExDqg@mail.gmail.com> <16144.1660803537@kaos.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000065659305e683982b
Content-Type: text/plain; charset="UTF-8"

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 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

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Thu, Aug 18, 2022, 12:19 AM Simon J. Gerraty &lt;<a=
 href=3D"mailto:sjg@juniper.net">sjg@juniper.net</a>&gt; wrote:<br></div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
#ccc solid;padding-left:1ex">Warner Losh &lt;<a href=3D"mailto:imp@bsdimp.c=
om" target=3D"_blank" rel=3D"noreferrer">imp@bsdimp.com</a>&gt; wrote:<br>
&gt; I think I broke it with my latest updates. I don&#39;t have a good ZFS=
 testing setup<br>
&gt; so I&#39;m spending a little time enhancing the bootable image generat=
or to have<br>
&gt; one that I can easily test boot with qemu.<br>
<br>
FWIW bhyve is *excellent* for mucking about with EFI and loader in general.=
<br>
<br>
I did all the UEFI support for Junos using bhyve (initially so I could<br>
test LOADER_VERIEXEC), and I regurlarly use it to test various install<br>
processes - pxe boot and net install, usb install, etc.<br>
<br>
I build loader.efi from a branch off main, everyting else is from<br>
stable/12 at present.<br>
<br>
The combination of makefs, mkimg and bhyve - make hacking the low level<br>
boot bits much safer.<br>
<br>
Byhve is quick too - my Junos VM&#39;s take about 40-50s from start to logi=
n<br>
prompt.<br></blockquote></div></div><div dir=3D"auto"><br></div><div dir=3D=
"auto">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&#39;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&#39;t do that without delving into separate expect scripts. An=
d it can&#39;t run arm binaries on x86...</div><div dir=3D"auto"><br></div>=
<div dir=3D"auto">I also use bhyve when I want to attach a debugger or need=
 to test longer running things.</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">But in this case it took a while to find how to reproduce... but =
I found one and just pushed a fix.</div><div dir=3D"auto"><br></div><div di=
r=3D"auto">Warner=C2=A0</div><div dir=3D"auto"><div class=3D"gmail_quote"><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex">
</blockquote></div></div></div>

--00000000000065659305e683982b--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfopk%2Bakv9omTfZauvC=0kYBgu1mMWpto0wao4SRZQKRCg>