View previous topic :: View next topic |
Author |
Message |
mounty1 l33t


Joined: 06 Jul 2006 Posts: 849 Location: Queensland
|
Posted: Wed Sep 09, 2020 12:29 pm Post subject: UEFI boot not working after CDROM removed |
|
|
Hello, I'm following these instructions to create a Gentoo guest in a VM. I don't know if the problem lies in the host+VM setup, or in the guest, so I'm asking here first. Please don't do the Captain Obvious and suggest that I ask the OmniOS people for help, as I have thought of that but have to start somewhere and it's here.
I set up a three-HDD system using virtio and booted and installed Gentoo just fine, as per the usual handbook instructions. The three disks are EFI, root and swap. The EFI disk was set up according to the GPT+UEFI instructions here and as per those instructions is formatted as a FAT FS and mounted at /boot/efi. It is 20 MiB in size. As per the OmiOS page, I ran cp /boot/efi/EFI/gentoo/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi to copy the UEFI loader to where the bhyve EFI implementation expected to find it.
The OmniOS instructions are then to shut down the VM, remove the CD-ROM and restart the VM. When this happens, the screen shows:
Code: | Boot Failed. EFI Misc Device
Boot Failed. EFI Misc Device 1
Boot Failed. EFI Misc Device 2 | Any ideas on how to get this VM to boot from disk? Clearly there is something missing from the EFI disk. _________________ Michael Mounteney |
|
Back to top |
|
 |
dmpogo Advocate

Joined: 02 Sep 2004 Posts: 2969 Location: Canada
|
Posted: Wed Sep 09, 2020 6:31 pm Post subject: Re: UEFI boot not working after CDROM removed |
|
|
mounty1 wrote: | Hello, I'm following these instructions to create a Gentoo guest in a VM. I don't know if the problem lies in the host+VM setup, or in the guest, so I'm asking here first. Please don't do the Captain Obvious and suggest that I ask the OmniOS people for help, as I have thought of that but have to start somewhere and it's here.
I set up a three-HDD system using virtio and booted and installed Gentoo just fine, as per the usual handbook instructions. The three disks are EFI, root and swap. The EFI disk was set up according to the GPT+UEFI instructions here and as per those instructions is formatted as a FAT FS and mounted at /boot/efi. It is 20 MiB in size. As per the OmiOS page, I ran cp /boot/efi/EFI/gentoo/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi to copy the UEFI loader to where the bhyve EFI implementation expected to find it.
The OmniOS instructions are then to shut down the VM, remove the CD-ROM and restart the VM. When this happens, the screen shows:
Code: | Boot Failed. EFI Misc Device
Boot Failed. EFI Misc Device 1
Boot Failed. EFI Misc Device 2 | Any ideas on how to get this VM to boot from disk? Clearly there is something missing from the EFI disk. |
Does efibootmgr -v shows what you expect ? (efivarfs partition needs to be mounted before you run it) |
|
Back to top |
|
 |
mounty1 l33t


Joined: 06 Jul 2006 Posts: 849 Location: Queensland
|
Posted: Wed Sep 09, 2020 8:19 pm Post subject: Re: UEFI boot not working after CDROM removed |
|
|
dmpogo wrote: | Does efibootmgr -v shows what you expect ? (efivarfs partition needs to be mounted before you run it) |
You mean when booted from CD-ROM, and chrooted into the Gentoo root FS, during the installation of Gentoo? Yes, but if I reboot into that environment, it is gone.
The Gentoo instructions don't refer to an efivarfs partition. There is the EFI (FAT-formatted) partition, but no separate efivarfs partition. Good point, because this is a VM, there is no flash memory as on a real computer, so where would the Gentoo boot setting be stored? _________________ Michael Mounteney |
|
Back to top |
|
 |
Logicien Veteran


Joined: 16 Sep 2005 Posts: 1415 Location: Montréal
|
Posted: Thu Sep 10, 2020 4:14 pm Post subject: |
|
|
To mount the efivar filesystem you must activate the
in the Linux kernel configuration. It may not be mount automatically by Gentoo at boot time so, you may need to add a line in /etc/fstab to make the efivar filesystem be mounted automatically at boot time. Without this you cannot manipulate the efi variables with efibootmgr.
If your virtual machine support booting in EFI mode it must have an efi firmware to store the efi variables like when you boot in a real Efi mode. _________________ Paul |
|
Back to top |
|
 |
Tony0945 Advocate

Joined: 25 Jul 2006 Posts: 4512 Location: Illinois, USA
|
Posted: Thu Sep 10, 2020 4:34 pm Post subject: |
|
|
Code: | tony@MSI ~ $ zgrep EFIVAR /proc/config.gz
# CONFIG_EFIVAR_FS is not set
| And I'm booting UEFI |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5055 Location: Dallas area
|
Posted: Thu Sep 10, 2020 4:41 pm Post subject: |
|
|
Code: | config EFIVAR_FS
tristate "EFI Variable filesystem"
depends on EFI
default m
help
efivarfs is a replacement filesystem for the old EFI
variable support via sysfs, as it doesn't suffer from the
same 1024-byte variable size limit.
To compile this file system support as a module, choose M
here. The module will be called efivarfs.
If unsure, say N.
|
Depending on which EFI boot manager you use, you might need this. _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
mounty1 l33t


Joined: 06 Jul 2006 Posts: 849 Location: Queensland
|
Posted: Thu Sep 10, 2020 7:13 pm Post subject: |
|
|
Logicien wrote: | To mount the efivar filesystem you must activate the
|
Yes but if you read the OP it is clear that I am a long way from loading the kernel. _________________ Michael Mounteney |
|
Back to top |
|
 |
Logicien Veteran


Joined: 16 Sep 2005 Posts: 1415 Location: Montréal
|
Posted: Thu Sep 10, 2020 9:24 pm Post subject: |
|
|
Have you check if your virtual EFI/BIOS is actually configure to make Gentoo boot in BIOS mode or in EFI mode? and if it is in EFI mode, be sure that only the EFI boot mode is allowed and not both EFI and BIOS modes. In plus is the Secure boot active or not? A virtual EFI/BIOS must play with these options too.
In real EFI mode there is a difference between Secure boot activate and desactivate. The first mode need an EFI key and the second one no. So when the Secure boot is desactivate the Linux kernel and it's modules do not need to be signed by an EFI key. I think it is better to desactivate the Secure boot generally for a normal user.
Tony0945,
it is possible to boot in UEFI mode without having CONFIG_EFIVAR_FS=y activated in the kernel .config file but you cannot manipulate the EFI variables without it under this kernel. _________________ Paul |
|
Back to top |
|
 |
Tony0945 Advocate

Joined: 25 Jul 2006 Posts: 4512 Location: Illinois, USA
|
Posted: Fri Sep 11, 2020 1:18 am Post subject: |
|
|
Logicien wrote: | Tony0945,
it is possible to boot in UEFI mode without having CONFIG_EFIVAR_FS=y activated in the kernel .config file but you cannot manipulate the EFI variables without it under this kernel. |
Ah! I use the motherboard BIOS for that. It's a GUI and very easy to use. |
|
Back to top |
|
 |
mounty1 l33t


Joined: 06 Jul 2006 Posts: 849 Location: Queensland
|
Posted: Fri Sep 11, 2020 1:32 am Post subject: |
|
|
Logicien wrote: | Have you check if your virtual EFI/BIOS is actually configure to make Gentoo boot in BIOS mode or in EFI mode? and if it is in EFI mode, be sure that only the EFI boot mode is allowed and not both EFI and BIOS modes. In plus is the Secure boot active or not? A virtual EFI/BIOS must play with these options too | Yes, bhyve operates in UEFI mode only. _________________ Michael Mounteney |
|
Back to top |
|
 |
|