[Bug 1711452] Re: grub.cfg falls back to 'text' video mode on UEFI which is not supported
Steve Langasek
steve.langasek at canonical.com
Wed Feb 7 06:48:45 UTC 2018
Junien, no, this can't be worked around with a kernel boot option.
Are you experiencing this when booting via MAAS? MAAS does its own
grub.cfg management, and would need to be fixed separately for this
issue.
You can work around this in the grub.cfg on a given installed system by
running:
sudo sed -i -e'/linux_gfx_mode/s/text/auto/' /etc/grub.d/10_linux &&
sudo update-grub
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1711452
Title:
grub.cfg falls back to 'text' video mode on UEFI which is not
supported
Status in grub2 package in Ubuntu:
Triaged
Bug description:
The grub.cfg generated by update-grub for both UEFI and BIOS includes
the following logic:
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
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/loader/i386/linux.c has:
#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_MODE_TYPE_PURE_TEXT out of the allowed set when calling
grub_video_set_mode().
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1711452/+subscriptions
More information about the foundations-bugs
mailing list