running FreePBX SNG7 Official Distro
Rodney W. Grimes
freebsd-rwg at gndrsh.dnsmgr.net
Sat Apr 6 10:02:15 UTC 2019
> Rodney W. Grimes wrote:
> > >
> > > [dd]
> > >
> > > > >
> > > > > root at mfsbsd:~ # find /mnt/ -name grubx64.efi
> > > > > /mnt/EFI/centos/grubx64.efi
> > > > >
> > > > > Who is to blame, bhyve or FreePBX's installer?
> > > > >
> > > > > How can I tell bhyve's UEFI loader to look for grubx64.efi in a
> > > > > different place? Or look for a different loader?
> > > > >
> > > > > Who says that the image to load should be "\EFI\BOOT\grubx64.efi" and
> > > > > not "\EFI\BOOT\BOOTX64.EFI" for example?
> > > >
> > > > I can not quickly answer that, but lets try the short quick fix
> > > > and simply copy this file to the right place and see if that
> > > > gets you up and running.
> > >
> > > Yes, copying grubx64.efi to "\EFI\BOOT\" does get the guest up and
> > > running (I used mfsbsd from a different VM to manipulate the EFI
> > > partition).
> >
> > You can usually use the host by doing mdconfig -f <path+to+diskimage>
>
> Unfortunately mdconfig does not work with zvols:
>
> root at vas:~ # mdconfig -a -f /dev/zvol/d02/vm/freepbx/disk0
> mdconfig: /dev/zvol/d02/vm/freepbx/disk0 is not a regular file
If its a zvol cant you just do
gpart show /dev/zvol/d02/vm/freepbx/disk0
and
mount -t msdosfs /dev/zvol/d02/vm/freepbx/disk0p2
>
> > > 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.
> > > Shell> fs0
> > > FS0:\> cd \EFI\centos
> > > FS0:\EFI\centos\> grubx64.efi
> > >
> > > I also managed to boot the guest OS all right.
> > >
> > > But naturally, the latter fix worked till next reboot only, I don't know
> > > how to save the new EFI setup in the guest's configuration.
> >
> > My recommedation at this time would be to simply copy grubx64.efi
> > to the right place and leave it there so that it just boots without
> > any other change.
>
> That's what I have done for now.
>
> > >
> > > The hardware UFI BIOSes I've seen so far (not many, I must admit)
> > > permitted me to save which efi binary I would prefer to boot next time.
> >
> > That is done with an efivar, as it stands right now bhyve efi has
> > no persistant variable storage, a feature that needs to be implemented.
>
> I see.
>
> [dd]
>
> >
> > > 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.
--
Rod Grimes rgrimes at freebsd.org
More information about the freebsd-virtualization
mailing list