About text mode on EFI when booting Linux
Hi Vladimir,
We encounter an error message "no suitable video mode found" when booting a VM on i386 platform. Though I think this is not a big problem, but the LinuxKit guys(we use grub2 in LinuxKit project) have some concerns about this error message, so I submit a patch[1] try to eliminate this message. Would you please take a look at that patch?
I also dig into the commit logs of the grub2 git tree, and found below commit:
commit b1257f653367e8d21b625276f53f086d68fab0b3
Author: Vladimir 'phcoder' Serbinenko <[email protected]> Date: Tue Aug 16 16:11:10 2011 +0200
Don't accept text modes on EFI when booting Linux.
* grub-core/loader/i386/linux.c (ACCEPTS_PURE_TEXT): New define. (grub_linux_boot) [!ACCEPTS_PURE_TEXT]: Restrict to graphics modes.
...
grub-core/loader/i386/linux.c +1 -0
@@ -45,15 +45,18 @@ GRUB_MOD_LICENSE ("GPLv3+");#include <grub/efi/efi.h> #define HAS_VGA_TEXT 0#define DEFAULT_VIDEO_MODE "auto" +#define ACCEPTS_PURE_TEXT 0#elif defined (GRUB_MACHINE_IEEE1275 )#include <grub/ieee1275/ieee1275.h> #define HAS_VGA_TEXT 0
I am very curious about the context/background of this commit here, what's the reason leads us not to accept a text modes on EFI when booting Linux?
[1] https://lists.gnu.org/archive/html/grub-devel/2017-10/msg00031.html
Thanks,
Dennis
Hi,
Quoted 11 lines · Dennis Chen
Hi Vladimir,
We encounter an error message "no suitable video mode found" when booting a VM on i386 platform. Though I think this is not a big problem, but the LinuxKit guys(we use grub2 in LinuxKit project) have some concerns about this error message, so I submit a patch[1] try to eliminate this message. Would you please take a look at that patch?
I also dig into the commit logs of the grub2 git tree, and found below commit:
[...]
Quoted 3 lines
I am very curious about the context/background of this commit here, what's the reason leads us not to accept a text modes on EFI when booting Linux?
it appears that (U)EFI dos not feature any text services. See also this thread
[1] from the help-grub mailing list.
As far as I have understood things, UEFI has the "Console I/O Protocol" API which can be used to output to a console without caring about what the console actually is (serial port or something). To output something on the screen the "Graphics Output Protocol" is used which doesn't support any text mode.
Best,
Matthias.
[1] https://lists.gnu.org/archive/html/help-grub/2011-12/msg00023.html
Quoted 4 lines
[1] https://lists.gnu.org/archive/html/grub-devel/2017-10/msg00031.html
Thanks,
Dennis