summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8f673fa)
It might be possible that we can load the efivars module, while
/sys/firmware/efi still doesn't exist and efibootmgr then fails
to execute.
We noticed this on Hetzner's Dell PowerEdgeâ„¢ R6515 DX181 server,
which was booted in BIOS mode via PXE, while the hardware itself
is EFI capable. Loading the efivars module worked there, but
invoking efibootmgr then fails, and the resulting system isn't
bootable.
Thanks: Darshaka Pathirana for reporting and feedback
# check for EFI support or try to enable it {{{
efi_support() {
# check for EFI support or try to enable it {{{
efi_support() {
- if lsmod | grep -q efivars ; then
+ local efivars_loaded=false
+ if modprobe efivars &>/dev/null ; then
+ efivars_loaded=true
+ fi
+
+ if [ -d /sys/firmware/efi ] ; then
einfo "EFI support detected." ; eend 0
return 0
fi
einfo "EFI support detected." ; eend 0
return 0
fi
- if modprobe efivars &>/dev/null ; then
- einfo "EFI support enabled now." ; eend 0
- return 0
+ if ! [ -d /sys/firmware/efi ] && [ "${efivars_loaded:-}" = "true" ] ; then
+ einfo "EFI support detected, but system seems to be running in BIOS mode."