From owner-freebsd-virtualization@freebsd.org Sun Apr 7 08:14:46 2019 Return-Path: Delivered-To: freebsd-virtualization@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 C7548157B4B8 for ; Sun, 7 Apr 2019 08:14:46 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA98F87DAE for ; Sun, 7 Apr 2019 08:14:45 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=MQbf71YlQ40fnrRKpkqP8VIgJtDQoQDBdoFz9cwWc9Q=; b=QhENcF1KKD4xl3I2YqixuLd7JD aHFCWxkNuZpASnDhkLoZk6gp0cD7VJvAqsQr28Nj3yqMRi+8CJyef4Npc25Qo5BqLotdp9JdGvGpS pUxZi5JjEEnhD+0T1IrCTNgESEUxn+PfOnNPMlMaVzQW61K0WtytCW5mp3epKWaodufQ=; Received: from vas by admin.sibptus.ru with local (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hD2wv-000Azq-4h for freebsd-virtualization@freebsd.org; Sun, 07 Apr 2019 15:14:45 +0700 Date: Sun, 7 Apr 2019 15:14:45 +0700 From: Victor Sudakov To: freebsd-virtualization@freebsd.org Subject: Re: running FreePBX SNG7 Official Distro Message-ID: <20190407081445.GB40361@admin.sibptus.ru> References: <20190407031237.GA7489@admin.sibptus.ru> <201904070426.x374Q641048406@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZfOjI3PrQbgiZnxM" Content-Disposition: inline In-Reply-To: <201904070426.x374Q641048406@gndrsh.dnsmgr.net> X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.11.4 (2019-03-13) Sender: Victor Sudakov X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2019 08:14:47 -0000 --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--