Re: bhyve: can't find /boot/entropy

From: Kyle Evans <kevans_at_freebsd.org>
Date: Thu, 07 Apr 2022 14:56:09 UTC
On Thu, Apr 7, 2022 at 8:07 AM Benoit Chesneau <bchesneau@mac.com> wrote:
>
> I am trying to install a firewall appliance from stormshield [1]  using bhyve and vm-bhyve. They only support KVM so I had to first convert their qcow2 image to a raw image (vm-bhyve take care of it).  They don't have n UEFI boot so I'm using the default bhyve loader. But After the boot (started manually I get stuck to the message "can't find '/boot/entropy'".
>
>
> ```
> Loading kernel...
> /boot/kernel/kernel text=0x6de318 data=0x95f20+0x95a430 syms=[0x8+0xbdc18+0x8+0xbbc32]
> Loading configured modules...
> can't find '/boot/entropy'
> Consoles: userboot
>
> FreeBSD/amd64 User boot lua, Revision 1.2
> Loading /boot/defaults/loader.conf
> Loading /boot/loader.whitelist
> Loading /boot/device.hints
> Loading /boot/device.hints.sns
> Loading /boot/loader.conf
> Loading /boot/loader.conf.local
> ERROR: /boot/lua/password.lua:127: attempt to call a nil value (field 'restrictInteractive').
>

Noted in the PR, but you are overlooking the real error, here ^.

>
> Type '?' for a list of commands, 'help' for more detailed help.
> OK ls
> /
>  d  .snap
>  d  data
>  d  boot
>  d  libexec
>     COPYRIGHT
>  d  bin
>  d  dev
>  d  etc
>  d  lib
>  d  sbin
>  d  tmp
>  d  usr
>  d  var
> OK ls boot
> boot
>  d  kernel
>     boot1.efi
>     gptboot
>     mbr
>     loader.efi
>     pmbr
>     userboot.so
>     loader
>     boot
>  d  lua
>  d  defaults
>     loader.whitelist
>     device.hints
>     manifest
>     manifest.rcerts
>     manifest.rsig
>     pass_manifest
>     pass_manifest.rcerts
>     pass_manifest.rsig
> OK boot
> unknown command
> OK boot
> Loading kernel...
> /boot/kernel/kernel text=0x6de318 data=0x95f20+0x95a430 syms=[0x8+0xbdc18+0x8+0xbbc32]
> Loading configured modules...
> can't find '/boot/entropy'
> ```
>
>
> The vm-bhyve configuration is the following:
>
> ```
> loader="bhyveload"
> cpu=1
> memory=2G
> network0_type="virtio-net"
> network0_switch="public"
> disk0_type="virtio-blk"
> disk0_name="disk0"
> disk0_dev="sparse-zvol"
> uuid="7aa0cad4-b4fc-11ec-898b-1402ec690a80"
> network0_mac="58:9c:fc:04:33:de"
> ```
>
> They are using a custom version of hardened bsd (freebsd 12.3 I think).  Any ide how this can be fixed? Using proxmox and latest KVM + seabios, the image boot with succcess. Any hint is welcome :)
>

Ah, that explains it. We can't really debug custom loader scripts,
you'll need to find someone closer to the downstream you're working
with to help out with this one.