When using nmdm(4) as the console (like nmdm0A), grub-bhyve 0.30 will hang until the corresponding "B" device is open by another process. For example: # grub-bhyve -c /dev/nmdm0A -d /boot/grub -r hd0,msdos1 -m debian-7.8.0.map -M 1024 debian-7.8.0 will hang until any command accesses /dev/nmdm0B: # kermit -l /dev/nmdm0B
Created attachment 157153 [details] O_NONBLOCK fix Opening the console device with O_NONBLOCK seems to fix the issue.
A commit references this bug: Author: kmoore Date: Tue May 26 16:55:41 UTC 2015 New revision: 387492 URL: https://svnweb.freebsd.org/changeset/ports/387492 Log: - Add patch to fix bug with hanging when using nmdm as console - Bump PORTREV PR: 200460 Submitted by: olgeni@ Changes: head/sysutils/grub2-bhyve/Makefile head/sysutils/grub2-bhyve/files/ head/sysutils/grub2-bhyve/files/patch-grub-core_term_emu_console.c