Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Apr 2019 15:14:45 +0700
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        freebsd-virtualization@freebsd.org
Subject:   Re: running FreePBX SNG7 Official Distro
Message-ID:  <20190407081445.GB40361@admin.sibptus.ru>
In-Reply-To: <201904070426.x374Q641048406@gndrsh.dnsmgr.net>
References:  <20190407031237.GA7489@admin.sibptus.ru> <201904070426.x374Q641048406@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--ZfOjI3PrQbgiZnxM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Rodney W. Grimes wrote:
> > > > > > > I can guess that it looks for a FAT16 partition in the GPT wi=
th the type
> > > > > > > "efi" but the rest is a mystery for me. Why is it trying to f=
ind
> > > > > > > "grubx64.efi" and not the default "boot64.efi" (which is pres=
ent), for
> > > > > > > example?
> > > > > >=20
> > > > > > I suspect that what ever guest you installed installed something
> > > > > > else someplace, either within the eft partition, or possibly in
> > > > > > the MBR?
> > > > >=20
> > > > > Do you mean to say, the guest installing something else someplace=
 can
> > > > > influence the boot sequence of bhyve efi?
> > > >=20
> > > > The guest created all of the bits on that zvol,
> > > > it can influence many things.  There is probably a tiny initial
> > > > stub that efi loads that has this bath to grubx64.efi codded in
> > > > it and that is what is causing this issue.
> > >=20
> > > It is very important to find and debug it because Oracle VirtualBox in
> > > UEFI mode installs and runs this guest just fine. So it must be some
> > > issue in bhyve itself.
> > >=20
> > > Here is the complete archive of everything the guest created in the E=
FI
> > > partition: http://admin.sibptus.ru/~vas/freepbx.tar.gz
> > > can you find those confusing bits?
> >=20
> > I got it! bhyve does the right thing: it tries to boot BOOTX64.EFI, but
> > BOOTX64.EFI  makes it look for grubx64.efi. So BOOTX64.EFI must be some
> > kind of chain loader.
>=20
> And it brobably tries to read a efivariable, and if that variable
> is not set it defaults to grubx64.efi.  This bootx64.efi is something
> the guest installed into the EFI partition, hence my assertion that
> the issue is with something the guest installed is some what valid.

Do you think the guest OS installer set some efi variable during the
installation process, which bhyve did not save? That would explain a
lot.

> > > > > > Moreover, I waited (for a long time!) for the EFI interactive s=
hell
> > > > > > prompt and with a few commands:
> > > > >=20
> > > > > Yes, the timeout is very long, and I do not know that we
> > > > > document anyplace that if you wait long enough at a failed
> > > > > boot you do get a EFI shell prompt eventually.
> > > >=20
> > > > Can I press some key to escape to the EFI shell?
> > > Not that I am aware of.
> >=20
> > It's a major problem! There must be a well-known way to break the boot
> > sequence any time and enter the EFI shell.
>=20
> Agreed, hopefully those working on edk2 take note and either
> chime in with what that way is, or create a bug and track
> so that someone may fix this issue.

Would it be useful to create a PR in the FreeBSD bugtracker with a
feature request?

> >=20
> > It is very important to find and debug it because Oracle VirtualBox in
> > UEFI mode installs and runs this guest just fine. So it must be some
> > issue in bhyve itself.
>=20
> As I stated earlier bhyve is missing percistant efi variables,
> and that is most likely the reason that VirtualBox just works
> and bhyve does not.
>=20
> Probably you well find in your VirtualBox directory a
> file that is used to store efivars, that is where the

I'll look into the VirtualBox directory tomorrow and report here. I was
under the impression that efivars are stored in a configuration file in
the EFI partition but I was probably wrong, they are kept in NVRAM
somewhere, like BIOS settings, and not on a disk.

--=20
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

--ZfOjI3PrQbgiZnxM
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJcqbF1AAoJEA2k8lmbXsY05s8IAJPMWCzDz6BtHoPcziomjk5R
4xtzCKizy4NbZjpbg4jrG4Sw3E0BBtcQkJNlSwpXYj7/mq+NhgbXG9xtOLiSZYnd
rzCo8WOjEv9TxoUg/2HRjiECiSjl2krUxk/qfOiUqaayrdy2eCvJCXL9AWE1K/aE
bqWfBxrtfC+yIZI5OvU21IDOM3waZtaF8fXBxFFKM48M3SWw++O+4Z8oZxKeLyrE
N2v4Vz2j5ZRbGNaW21RoL98JNH3/LHh7ZIDu/+FYdNpVShmZmd7rskZpl2a9ZCbW
Y1YG4Ah00LvU2acLgCavnzrhZi2+siNlWE8I8HprzO37Ir7z8kQiVA9U7aeEB4w=
=eKWW
-----END PGP SIGNATURE-----

--ZfOjI3PrQbgiZnxM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190407081445.GB40361>