grub.cfg falls back to 'text' video mode on UEFI which is not supported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The grub.cfg generated by update-grub for both UEFI and BIOS includes the following logic:
### BEGIN /etc/grub.
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}
if hwmatch ${prefix}
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
[...]
menuentry [...]
gfxmode $linux_gfx_mode
This means that in some cases, we are calling 'set gfxpayload="text"' on UEFI systems.
However, grub-core/
#ifdef GRUB_MACHINE_EFI
#include <grub/efi/efi.h>
#define HAS_VGA_TEXT 0
#define DEFAULT_VIDEO_MODE "auto"
#define ACCEPTS_PURE_TEXT 0
#elif [...]
and if ACCEPTS_PURE_TEXT is 0, grub_linux_boot() masks GRUB_VIDEO_
So our generated grub.cfg should *never* be setting gfxpayload=text on a UEFI system. If we do, we get the following error message from grub at boot:
error: invalid video mode specification `text'.
Booting in blind mode
summary: |
- grub.cfg fails back to 'text' video mode on UEFI which is not supported + grub.cfg falls back to 'text' video mode on UEFI which is not supported |
Changed in grub2 (Ubuntu): | |
status: | Confirmed → Triaged |
Confirming, there are other such reports of "booting in blind mode".