From owner-freebsd-virtualization@freebsd.org Sun Apr 7 04:19:40 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 0F4A91577490 for ; Sun, 7 Apr 2019 04:19:40 +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 908798168B for ; Sun, 7 Apr 2019 04:19:39 +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 x374JbdZ048374; Sat, 6 Apr 2019 21:19:37 -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 x374JbIp048373; Sat, 6 Apr 2019 21:19:37 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201904070419.x374JbIp048373@gndrsh.dnsmgr.net> Subject: Re: running FreePBX SNG7 Official Distro In-Reply-To: <20190407023743.GB99339@admin.sibptus.ru> To: Victor Sudakov Date: Sat, 6 Apr 2019 21:19:37 -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: 908798168B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] 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 04:19:40 -0000 > Rodney W. Grimes wrote: > > > > > > > > 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 > > No I can't if the zvol is in the "volmode=dev" mode which is the default. > > This is the default for a reason: it's no good exposing scores of always > coming and going guest geoms to the host system. I think you can even > get a conflict of labels or something like that one day. So it may take a few more commands but it should be possible to do this from the host side using host side tools without having to boot a guest to make these corrections. > > > > > 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. > > > > > 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. 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. > 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? Probably you well find in your VirtualBox directory a file that is used to store efivars, that is where the difference occurs. > The standard procedure should be as follows: > > Automated detection relies on standardized file paths to the OS > loader, with the path varying depending on the computer architecture. > The format of the file path is defined as > /EFI/BOOT/BOOT.EFI; for > example, the file path to the OS loader on an x86-64 system is > /efi/BOOT/BOOTX64.EFI and efi\boot\bootaa64.efi on ARM64 architecture. > > Nothing about grub*.efi. But only bhyve is confused, VirtualBox is not. bhyve is not really confused, it is simply missing a feature that this guest depends on for its boot procedures. This is a well known miss-feature, but I do not know of anyone actively working on fixing it. > Victor Sudakov, VAS4-RIPE, VAS47-RIPN > 2:5005/49@fidonet http://vas.tomsk.ru/ -- Rod Grimes rgrimes@freebsd.org