So there are many tutorials about changing grub theme on lower version of fedora and to be honest I have tried many of the tutorials and have read numerous topics about grub themes and their solutions but none of theme work on fedora 40…so please anyone out here let me know the latest way to install a grub theme as of july 2024
Hi @ronovague
I did this last week with the Lenovo theme from: Preview / Wiki - Adrian Środoń
- put the theme in a directory under
/boot/grub2/themes/
, in my case/boot/grub2/themes/lenovo/
- in
/etc/default/grub
add the lineGRUB_THEME="/boot/grub2/themes/lenovo/theme.txt"
(substitute folder if you use a different theme) - I believe you need to change the terminal to:
GRUB_TERMINAL_OUTPUT="gfxterm"
(also in/etc/default/grub
) - run
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
and reboot
Hope it works for you
/Jaybe
I dont know how to thankyou…I spent so much time on this and the most imp key was gfxterm, mine was console before…Thank you so much man, it worked!!!
I wanted to thank you for the instructions and also add a slight change I had to make. For my computer, I had to modify the grub2-mkconfig command to the one below.
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg"
BAD BAD BAD, (sorry)
/boot/efi/EFI/fedora/grub.cfg
is supposed to be a small stub configuration whcih will refer to the real configuration in /boot/grub2/grub.cfg
To fix this up run this script
#!/bin/sh
# create a stub grub2 config in EFI
EFI_HOME=/boot/efi/EFI/fedora
GRUB_HOME=/boot/grub2
BOOT_UUID=$(grub2-probe --target=fs_uuid ${GRUB_HOME})
GRUB_DIR=$(grub2-mkrelpath ${GRUB_HOME})
cat << EOF > ${EFI_HOME}/grub.cfg
search --no-floppy --root-dev-only --fs-uuid --set=dev ${BOOT_UUID}
set prefix=(\$dev)${GRUB_DIR}
export \$prefix
configfile \$prefix/grub.cfg
EOF
echo Created ${EFI_HOME}/grub.cfg
That’s what I had read as well but the theme wouldn’t work until I used that line.
/boot/efi/EFI/fedora/grub.cfg should look somthing similar to
search --no-floppy --root-dev-only --fs-uuid --set=dev ${BOOT_UUID}
set prefix=(\$dev)${GRUB_DIR}
export \$prefix
configfile \$prefix/grub.cfg
@vekruse seems like the contents are a bit different. Using the config you provided bricked my grub install. The actual contents for the file after I reinstalled grub are;
search --no-floppy --root-dev-only --fs-uuid --set=dev eb2012e0-decb-4285-9897-cd59627a2667
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg
The suggested theme installation works like a charm.
Rather worrisome that there’s so much debate over something so important, with such significant ramifications if done incorrectly:
I’ve asked How to completely reset (and save modifications to) GRUB2? to attempt to clarify this, if of use: