Open sronsiek opened 3 years ago
Chances are this is the common problem of the Linux distro using a custom path for the EFI loader, then using EFI variables to point at it. These variables are lost when bhyve exits, so the UEFI firmware just looks for /BOOT/EFI/BOOTX64.EFI
instead.
We've been waiting a long time to get support for saving EFI variable state.
Not sure who you're waiting on ... but:
Is there a workaround for this?
Is it perhaps possible to configure the path to, and filename as per the grub loader?
If .efi filename is your problem try this as workaround: https://github.com/churchers/vm-bhyve/issues/336#issuecomment-565768120
The bhyve hypervisor devs have apparently been working for a while to implement persistent storage for the UEFI firmware. A real system would have some non volatile storage so that UEFI settings can be set once, and are still there after a poweroff. bhyve basically does the equivalent of a "reset bios to defaults" on every boot. Seems to have stagnated though. I think it's complicated by the fact that the firmware is quite behind the upstream so it has become part of a much larger job to get the entire firmware updated.
As far as I'm aware, it should be possible to workaround by mounting the EFI partition and moving the linux/grub bootloader to /BOOT/EFI/BOOTX64.EFI
, which is where UEFI will look by default if there's no EFI variable to tell it to look somewhere else. I think this can be done from the UEFI cli, although I can't really see why it couldn't be done by mounting the msdos EFI partition directly on the host and doing it in FreeBSD. I've never tried this though.
That's excellent feedback, thank you. The following fixes the UEFI for case 2. (no iso mounted):
cd /boot/efi/EFI
mkdir boot
cp -p sles/grubx64.efi boot/bootx64.efi
My final problem then is the inability to boot when I re-introduce a DVD/CD drive:
Boot Failed. EFI DVD/CDROM
Failed to set MokListRT: Invalid Parameter
Something has gone seriously wrong: import_mok_state() failed
: Invalid Parameter
Inspection of the boot order shows that DVD is tried first. Changing this is not possible as this is stored in non-volatile in real systems ... SELinux is disabled. Is a workaround known for this - (perhaps to remove CD/DVD from boot options) ? I've seen posts saying to cp bootx64.efi to shimx64.efi but this does not work.
Hi,
I've been trying to install & run SLES15 on bhyve with mixed success. I'm using a template based on a working openleap configuration, the install seems to work fine and I end up with a running system. However following a
vm stop
the system no longer boots, and drops into a UEFI interactive shell (which I don't know what to do with). The procedure and as much detail as I can muster are provided below. I've not found anything obvious in the wiki I might be doing wrong.Is there possibly a bug here - or is it a config issue?
Relevant Package versions:
Template content:
VM creation:
At this point a VNC client is opened and OS is installed. The procedure completes and we have a running system. It is possible to reboot the VM by issuing a
reboot
command within the VM.Disk allocation on host:
Disk config within the VM:
Following a
vm stop
at this point, a subsequentvm start
no longer starts the VM. The behaviour seen is:vm-bhyve.log:
The after a timeout of ~60 seconds:
vm-bhyve.log: