# GRUB2 finds background image but doesn't display it

On a new installation of Fedora 28 KDE Spin on an x64 system, I cannot get GRUB to show a background image.

Things I have tried:

• Using grub-customizer to set the background image.
• Manually placing different PNG and JPG images in various places on /boot and mentioning them in /etc/default/grub. I have also tried manually converting the images to 8-bit RGB using GIMP.
• Checking that the native resolution is set properly using videoinfo at the GRUB prompt---it is.
• Checking that GRUB is in the gfxterm mode---it is.
• Using a non-native resolution, as well as the native one. Every time, the background image size matched the chosen resolution. I even tried an image smaller than the set resolution.

Here is my config file:

GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT="0"
#GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_BACKGROUND="/boot/backgrounds/lightblue-256.jpg"
GRUB_GFXMODE="2560x1440x32;1920x1080x32;1600x1200x32;1400x1050x32;1280x800x32;1280x800x24;1280x768x32;1280x768x24;1280x1024x32;1024x768x32;auto"

export GRUB_COLOR_NORMAL="white/black"
export GRUB_COLOR_HIGHLIGHT="magenta/black"
GRUB_SAVEDEFAULT="false"


Of course, after every change to the config file I regenerate grub.cfg:

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg


... which produces:

Found background: <given-file>


Non-exhaustive list of references that I have read: 1, 2, 3, 3, 4, 5.

Where could the problem be and what more can I try?

edit retag close merge delete

@andreipoe, not dupe only related question, grub2-will-not-display-background-image

( 2018-07-19 08:48:02 -0500 )edit

Don' t use grub-customizer, because you will run in troubles, grub-customizer has issues with undo operations (revert a change).

( 2018-07-19 09:02:09 -0500 )edit

@andreipoe , Resolution_Settings and your image maybe is not a valid format of jpeg for grub2. You must transform this image in a valid jpeg : 8-bit (256 color) and non-indexed, (RGB), maybe you need to select only one resolution not a variaty of them.

( 2018-07-19 09:18:37 -0500 )edit

@heliosstyx I know it's not ideal, and the only reason I tried it is because for other is did the trick.

@hhlp I took a fresh image an went through the color process in GIMP, but still not success. I also tried your other suggestion to only keep a single resolution---no luck.

( 2018-07-19 10:41:55 -0500 )edit

Works for me with

GRUB_BACKGROUND="/boot/grub2/themes/system/background.png"


These two have no effect in gfxterm mode.

export GRUB_COLOR_NORMAL="white/black"
export GRUB_COLOR_HIGHLIGHT="magenta/black"

( 2018-07-19 11:30:15 -0500 )edit

Sort by » oldest newest most voted

UEFI grub does not (currently) support background images. The module needed for that is not included in the signed copy of grub.

At the boot prompt you can type "c" to get a command prompt. Then try to run the command "background_image" and find that this command is not supported.

more

Thank you! I had actually tried background_image` at some point, and indeed it didn't work, but it didn't click that the reason was missing support for this and I thought I was doing something wrong.

( 2018-07-21 05:47:05 -0500 )edit

It seems like this is possible to do but the packages needed are not installed by default. I have used the following steps and it worked.

Here is the workaround:

1. Install the grub2-efi-x64-modules package

2. Create directory /boot/efi/EFI/fedora/x86_64-efi/

3. Copy /usr/lib/grub/x8664-efi/gfxtermbackground.mod to /boot/efi/EFI/fedora/x86_64-efi/

4. Add the line "insmod gfxtermbackground" to /etc/grub.d/00header immediately after the line "insmod gfxterm"

5. Rebuild grub2 config

more