From owner-freebsd-virtualization@freebsd.org Sat Apr 6 10:02:14 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 C1A5915313D3 for ; Sat, 6 Apr 2019 10:02:14 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 207EE7253F for ; Sat, 6 Apr 2019 10:02:13 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x36A2BHK044705; Sat, 6 Apr 2019 03:02:11 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x36A2BZE044704; Sat, 6 Apr 2019 03:02:11 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201904061002.x36A2BZE044704@gndrsh.dnsmgr.net> Subject: Re: running FreePBX SNG7 Official Distro In-Reply-To: <20190406085458.GA89832@admin.sibptus.ru> To: Victor Sudakov Date: Sat, 6 Apr 2019 03:02:11 -0700 (PDT) CC: freebsd-virtualization@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 207EE7253F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0] 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: Sat, 06 Apr 2019 10:02:15 -0000 > Rodney W. Grimes wrote: > > > > > > [dd] > > > > > > > > > > > > > root@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 > > Unfortunately mdconfig does not work with zvols: > > root@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@freebsd.org