Rodney W. Grimes wrote:
> > > > > > > I can guess that it looks for a FAT16 partition in the GPT with 
> > > > > > > the type
> > > > > > > "efi" but the rest is a mystery for me. Why is it trying to find
> > > > > > > "grubx64.efi" and not the default "boot64.efi" (which is 
> > > > > > > present), for
> > > > > > > example?
> > > > > > 
> > > > > > I suspect that what ever guest you installed installed something
> > > > > > else someplace, either within the eft partition, or possibly in
> > > > > > the MBR?
> > > > > 
> > > > > Do you mean to say, the guest installing something else someplace can
> > > > > influence the boot sequence of bhyve efi?
> > > > 
> > > > 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.
> > > 
> > > 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.
> > > 
> > > Here is the complete archive of everything the guest created in the EFI
> > > partition: http://admin.sibptus.ru/~vas/freepbx.tar.gz
> > > can you find those confusing bits?
> > 
> > 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.
> 
> 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 shell
> > > > > > prompt and with a few commands:
> > > > > 
> > > > > 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.
> > > > 
> > > > Can I press some key to escape to the EFI shell?
> > > Not that I am aware of.
> > 
> > It's a major problem! There must be a well-known way to break the boot
> > sequence any time and enter the EFI shell.
> 
> 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?

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to