Bhyve, Debian - EFI Boot Failure
2020-12-17 UPDATE
Suppose recent FreeNAS s/w update(s) to FreeNAS-11.3-U5 made this all a non-issue … on a new VM, deleted the CD-ROM device to break out of the ISO boot loop and the VM booted just fine! The built-in console connection now works and didn’t have to muck with changing the resolution!
Hence the text below is for anyone using an older version of FreeNAS.
At first it took several tries just to make a successful VNC connection (using Remmina) with the new virtual machine (VM) created in bhyve running under FreeNAS 11. Even if I got something to display, the image was completely undecipherable – some sort of resolution mismatch. The key here is to configure the VNC device as follows:
Resolution: 800×600
Web Interface: unchecked
The real objective was to create a Debian 10 email server.
After completing the OS installation steps via GUI, I decided to delete the hypervisor’s CD-ROM device with its mapping to the installation ISO. Unbeknownst to me, that renumbered installed device mappings and effectively changed my NIC’s Predictable Network Interface Name: enp0s5 -> enp0s4
.
After rebooting the VM, I was faced with two surprising problems:
- the system booted into the EFI CLI {FACEPALM}
- the NIC lost network connection {facepalm}
To solve the first problem, research illuminated that apparently Debian does not have a consistent way of saving its EFI data – though CentOS at one point did not have this problem. Instructions that helped solve this came from discussion thread (#3).
Steps:
- from UEFI CLI, type
exit
- from the EFI menu select
Boot Maintenance Manager
- select
Boot from File
- navigate down to and select file
grubx64.efi
Then after booting your VM, from the terminal:
# mkdir /boot/efi/EFI/BOOT
# cp /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi
- reboot
To solve the second problem … get your current interface name from
$ ip a
.. then edit your /etc/network/interfaces file:
# nano /etc/network/interfaces
# The primary network interface
allow-hotplug enp0s4
iface enp0s4 inet dhcp
# This is an autoconfigured IPv6 interface
iface enp0s4 inet6 auto
Final Notes
Someone in the discussion thread (#146) suggested that when installing Debian, select the Expert Mode; when asked Force grub-efi installation to the removable media path
, select Yes. I have not tried this.
Lastly, if there is a change to UEFI, you may need to go through the above steps again and manually copy bootx64.efi.
C’est tout ~