problems with debian 11 guest on bhyve always staying at the grub screen

From: tech-lists <tech-lists_at_zyxst.net>
Date: Thu, 10 Feb 2022 06:04:15 UTC
Hi,

I'm using grub2-bhyve. Not sure if it's still needed in recent linux, but
it's the only way I know of on console of booting the image. Debian has 
been installed into the image. The problem is it always boots into the 
grub menu and stays there instead of automatically loading.

There's a device.map containing this line:
(hd0) ./debian.img

I invoke grub-bhyve like so:
sudo grub-bhyve -m ./device.map -r hd0,msdos1 -M 16384M debian

the grub menu appears and stays up if I don't intervene.
This has to be entered:

grub> linux (hd0,msdos1)/vmlinuz-5.10.0-11-amd64 root=/dev/mapper/v011--vg-root
grub> initrd (hd0,msdos1)/initrd.img-5.10.0-11-amd64

then grub loads and the following commands launch the vm:

sudo bhyve -A -H -P -s 0:0,hostbridge \
-s 1:0,lpc \
-s 2:0,virtio-net,tap0 \
-s 3:0,virtio-blk,./debian.img \
-l com1,stdio \
-c 4 -m 16384M \
debian

Because the grub menu stays up and waits for a response, I can't just script it like 
i do for ubuntu like so:

[ in a different directory ]

sudo bhyvectl --vm=ubuntu2004 --destroy
sudo grub-bhyve -m ./device.map -r hd0,gpt2 -M 16384M ubuntu2004
sudo bhyve -A -H -P -s 0:0,hostbridge \
-s 1:0,lpc \
-s 2:0,virtio-net,tap3 \
-s 3:0,virtio-blk,/dev/zvol/data/ubuntu2004-1 \
-l com1,stdio \
-c 8 -m 16384M \
ubuntu2004 

Why is this?

thanks,
-- 
J.