Bug 1525228 - Cannot set background image in grub2 EFI boot menu
Summary: Cannot set background image in grub2 EFI boot menu
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 27
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-12 20:41 UTC by CJ Oster
Modified: 2019-02-14 01:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-16 22:14:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
grub2-efi.cfg of working efi background image (6.54 KB, text/plain)
2018-01-16 22:08 UTC, CJ Oster
no flags Details

Description CJ Oster 2017-12-12 20:41:05 UTC
Description of problem:

When setting "GRUB_BACKGROUND" in /etc/defaults/grub to an image and rebuilding the config, the image is not displayed when the machine is booted. This is because the grub-command `background_image` is in gfxterm_background.mod, a module that is not included in the grub2 boot image from the grub2-efi-x64 package.


Version-Release number of selected component (if applicable): 2.02-19.fc27


How reproducible: Constantly


Steps to Reproduce:
0. Fresh install, F27 MATE-compiz spin from Live USB.

1. Copy a png image to /boot/grub/themes/

    cp /usr/share/backgrounds/default.png /boot/grub2/themes/

2. Add a GRUB_BACKGROUND line to /etc/default/grub

    echo "GRUB_BACKGROUND=/boot/grub2/themes/default.png" >> /etc/default/grub

3. Rebuild grub2 config

    grub2-mkconfig -o /etc/grub2-efi.cfg

Actual results:

grub2 boot menu does not have a background.


Expected results:

grub2 boot menu has background image.


Workaround:

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

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

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

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

5. Rebuild grub2 config

Comment 1 CJ Oster 2018-01-16 22:08:53 UTC
Created attachment 1382184 [details]
grub2-efi.cfg of working efi background image

Comment 2 Peter Jones 2018-01-16 22:14:01 UTC
Okay, so what you're doing is creating a config file that tells it to load a background image, but you're not doing anything to actually install the module that loads the image.  From what I can see, the "insmod gfxterm_background" and "background_image" lines are both emitted correctly already.  But you still need to do something to actually install the module.  That can be any of manually installing the module like you've done in your workaround, making sure the -modules package is installed and running grub2-install, or using grub2-mkimage manually.

I'm not seeing a bug here.

Comment 3 Peter Jones 2018-01-17 14:44:41 UTC
On IRC, cjo said:

> There's nothing in any stock packages that causes the "insmod gfxterm_background" to be emitted. I had to add that. I'll install a fresh VM and see what I can get out of the grub2-install, but the issue is that it's broken after a fresh install.

That does appear to be a bug, but it needs to be handled upstream rather than as a packaging bug.

Comment 4 Brian Kaye 2019-02-14 01:36:49 UTC
The workaround provided by CJ Oster appears to work only if secure boot is disabled. I do think it is a packaging problem


Note You need to log in before you can comment on or make changes to this bug.