Grub menu resolution

I am trying to change to resolution of my Grub2 menu to make it look nicer.

Here is my /etc/default.grub file

  GNU nano 7.2                                                                                                                         grub                                                                                                                                   
# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
# /boot/grub2/grub.cfg.

# Uncomment to set your own custom distributor. If you leave it unset or empty, the default
# policy is to determine the value from /etc/os-release
GRUB_DISTRIBUTOR=
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent preempt=full quiet security=apparmor mitigations=auto"
GRUB_CMDLINE_LINUX=""


# Uncomment to automatically save last booted menu entry in GRUB2 environment

# variable `saved_entry'
# GRUB_SAVEDEFAULT="true"
#Uncomment to enable BadRAM filtering, modify to suit your needs

# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
# GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
#Uncomment to disable graphical terminal (grub-pc only)

GRUB_TERMINAL="gfxterm"
# The resolution used on graphical terminal
#note that you can use only modes which your graphic card supports via VBE

# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE="1920x1200x16"
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# GRUB_DISABLE_LINUX_UUID=true
#Uncomment to disable generation of recovery mode menu entries

# GRUB_DISABLE_RECOVERY="true"
#Uncomment to get a beep at grub start

# GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
SUSE_BTRFS_SNAPSHOT_BOOTING="true"
GRUB_USE_LINUXEFI="true"
GRUB_DISABLE_OS_PROBER="false"
GRUB_ENABLE_CRYPTODISK="n"
GRUB_CMDLINE_XEN_DEFAULT="vga=gfx-1024x768x16"

I then ran the following to update:

grub2-mkconfig -o /boot/grub2/grub.cfg

This made no difference, so I then ran:


grub2-mkconfig -o /boot/efi/EFI/opensuse/grub.cfg

This didn’t change the resolution either, but I now have the following error message before the Grub menu:


error: ../../grub-core/fs/fshelp.c:258:file ‘/EFI/opensuse/fonts/unicode.pf2’ not found.

I have also tried to change the resolution in YaST but that didn’t work either.

Any ideas how I can (a) change the resolution, and (b) undo what has generated that error?

Thank you

This one.

This is the error:

I do not know, why you want to write the grub.cfg there?

Use Yast bootloader. Change something (easiest it to change the timeout by 1 second). That should reinstall the boot loader about as it was at the original install.

1 Like

hui - thanks but that didn’t work

sauerland - I think I needed to write grub there as it’s EFI? (see below)

nrickert - thanks, that has undone the problem.

I tried Hui’s advice on another system. That one uses bootloader “Grub2” according to YaST and it worked fine. However, on THIS system the bootloader is set to “Grub2 for EFI”. I wonder if that has something to do with it?

I am unaware of any differences during installation, but could this be relevant?

If so, why don’t those changes work on this machine - and what do I need to do to differently?

Thanks

You can only change the resolution if your graphic card support your 1920x1200x16 resolution.
So when you are in grub menu press c at the promt type videoinfo

I use #grub2-mkconfig -o /boot/grub2/grub.cfg to write my grub data to its latest iteration, and I use EFI boot and so forth, multi-booting from a bootloading patition that one of the installers used to set up grub bootloading. Other than the problems that showed up in grub a month or so back, it works well.

Unfortunately that command does not work (not vbeinfo) “command not recognised”

I already gave you the command and it is not vbeinfo
It should be **videoinfo**

By default openSUSE is using pre-built signed grub image which does include this command.

1 Like

I use also EFI with secure boot but
grub2-mkconfig -o /boot/grub2/grub.cfg
does it all the time…

My
/boot/efi/EFI/opensuse/grub.cfg
has another content as my
/boot/grub2/grub.cfg

Here:

cat /boot/efi/EFI/opensuse/grub.cfg 
set btrfs_relative_path="yes"
search --fs-uuid --set=root a62bc1a3-2bc9-44d8-bb4c-a32ad954507e
set prefix=(${root})/boot/grub2
source "${prefix}/grub.cfg"

And

cat /boot/grub2/grub.cfg 
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set btrfs_relative_path="y"
export btrfs_relative_path
if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi

if [ "${env_block}" ] ; then
  set env_block="(${root})${env_block}"
  export env_block
  load_env -f "${env_block}"
fi

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   if [ "${env_block}" ] ; then
     save_env -f "${env_block}" next_entry
   fi
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    if [ "${env_block}" ] ; then
      save_env -f "${env_block}" saved_entry
    else
      save_env saved_entry
    fi

  fi
}
.
.
.
.
1 Like

My

/boot/efi/EFI/opensuse/grub.cfg

file is functionally the same as yours. However writing to /boot/grub2/grub.cfg does not change anything.

I am not using secure boot, but in YaST > System > Bootloader > BootCodeOptions, the Bootloader is set to “Grub2 for EFI”. All my other machines just have “Grub2” in this field.

What’s the difference, and what do I risk by changing it?

Grub2 for EFI is for using UEFI for booting.

Grub2 (without EFI) boots to old fashioned way of loading a boot sector.

The main risk of changing is that your system might not boot. Your BIOS/UEFI firmware settings set whether you use UEFI booting or traditional (legacy, MBR) booting.

1 Like

Thanks for explaining that. I have checked - the other machines which work are legacy boot, and this one which does not is UEFI.

So the question remains, why is the change of resolution on the UEFI machine failing to work?

Grub does its input/output via calls to the BIOS (traditional grub) or calls to the UEFI firmware (grub for EFI). You are possibly seeing a limitation of the UEFI firmware on your system.

2 Likes

Looks like it can’t be done then, but many thanks for your advice.

1 Like