From 43c00d0b0934d86d9dfd0aa16149f4d7bc86e77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Wed, 29 Apr 2020 11:14:53 +0200 Subject: [PATCH] Use auto video mode as default for grub An explicit video mode 800x600 was used for grub if no video mode setup exists in the XML description. For grub this should better result in the auto mode. Related to bsc#1165730 --- kiwi/defaults.py | 9 ++++++--- test/unit/bootloader/config/base_test.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kiwi/defaults.py b/kiwi/defaults.py index 013e7892..d597e3bc 100644 --- a/kiwi/defaults.py +++ b/kiwi/defaults.py @@ -299,6 +299,7 @@ class Defaults: '0x319': video_type(grub2='1280x1024', isolinux='1280 1024'), '0x31a': video_type(grub2='1280x1024', isolinux='1280 1024'), '0x31b': video_type(grub2='1280x1024', isolinux='1280 1024'), + 'auto': video_type(grub2='auto', isolinux='800 600') } @staticmethod @@ -337,13 +338,15 @@ class Defaults: @staticmethod def get_default_video_mode(): """ - Provides 800x600 default video mode as hex value for the kernel + Uses auto mode for default video. See get_video_mode_map + for details on the value depending which bootloader is + used - :return: vesa video kernel hex value + :return: auto :rtype: str """ - return '0x303' + return 'auto' @staticmethod def get_grub_boot_directory_name(lookup_path): diff --git a/test/unit/bootloader/config/base_test.py b/test/unit/bootloader/config/base_test.py index e752a0df..7ee42054 100644 --- a/test/unit/bootloader/config/base_test.py +++ b/test/unit/bootloader/config/base_test.py @@ -261,7 +261,7 @@ class TestBootLoaderConfigBase: def test_get_gfxmode_default(self, mock_get_vga): mock_get_vga.return_value = None assert self.bootloader.get_gfxmode('isolinux') == '800 600' - assert self.bootloader.get_gfxmode('grub2') == '800x600' + assert self.bootloader.get_gfxmode('grub2') == 'auto' @patch('kiwi.xml_parse.type_.get_vga') def test_get_gfxmode(self, mock_get_vga):