[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub core.img video screen resolution modules/commands

From: moo can
Subject: grub core.img video screen resolution modules/commands
Date: Sun, 7 Feb 2021 02:55:45 +0000 (UTC)

I'm trying to optimize a GRUB 2 core.img.
I have made a custom minimal core.img for a x64_86 laptop with BIOS/GPT (with 
partition bios_grub) using grub-mkimage.- load required module
- custom keyboard layout when typing passphase
- decrypt the device- load /boot/grub/grub.cfg from decrypted deviceIt works 
fine and I can type my strong password without rebooting many times due to 
typos errors.
But I would like to optimize my little core.img with some video(s) modules 
because characters which are printed on the screen at this 1st stage are very 
very big. 

The grub which is on the encrypted /boot volume of the Ubuntu install called at 
2nd stage are printed normaly (not so big). I'm not searching any theme or 
custom gfx just normal size. 

I have added  some module to my little core.img  for the 1st stage as these 
onse : normal  gfxterm gfxterm_menu all_video videotest videoinfo vbe vga 
video_bochs video_cirrus.
videotest and videoinfo are working and videotest give me a preferred 
resolution of 1200x800.I tried to load manually some modules and change video 
screen resolution at the grub console prompt:

insmod all_videoinsmod gfxtermset gfxmode=auto
terminal_output auto (tried too with terminal_output gfxterm)
terminal_output gfxterm

But nothing change (only one ... with pager=1 output from command as set is no 
more split per page)
Standard video mode are working well on the 2nd stage grub which is controlled 
by ubuntu and grub scripts. I have read the generated grub.cfg from it and I 
don't not see any additional module which are loaded with insmod. I didn't add 
any value to GFX_ variable in /etc/default/grub so it is an "auto-mode" which 
is perfect and would be perfect for the 1st stage core.img.
What are the default modules that a standard grub is loading by default when 
all modules are available inside the /boot/grub/plateform/*.mod for this laptop 
i386-pc ?
What are the commands required to load and change video mode resolution from 
the grub console prompt (to test before adding it to the core-grub.cfg) ?

I tried to find some references about the grub console prompt and video mode 
but it is always related to the /etc/default/grub variables.

Minimal core.img
insmod echo
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod lvm
insmod ext2
insmod keylayouts
insmod at_keyboard

echo "Starting GRUB..."

set root=(memdisk)
set prefix=($root)/

terminal_input at_keyboard
keymap /fr.gkb

cryptomount -u xyz123
set root='lvmid/aaaa-bbbb-cccc-xxxx/dddd-eeee-gggg-yyyy'
set prefix=($root)/grub

configfile grub.cfg

Thanks you in advance for your help.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]