I’m having trouble installing a grub theme but I don’t know what i’m doing wrong. I followed this tutorial: https://youtu.be/nZu0rEgJcXA
In the end I up just having the normal black grub menu. one thing that I find odd is that my config file looks like this using vim (I had to add
sudo nano because I didn’t know how to do it in vim):
While his looks a lot more… advanced? He also had a lot more settings than I did by default.
I’m using a dual boot configuration with windows which I achieved by following this tutorial: https://www.techhut.tv/how-to-dual-boot-fedora-and-windows-11/
And this is what i’m using:
Did you update grub to generate the new configuration? I ran quickly through the tutorial, he used
update-grub which doesn’t work on Fedora. Try the following command:
sudo grubby --update-kernel=ALL
Then reboot and I think it should work.
Quick note: To edit a file using vim, you need to enter insert mode by pressing
i, editing normally as you do in nano, them press
esc, and type
:wq to save and exit.
:x work too? Anyway, thanks for the tip, I used
sudo grub2-mkconfig -o /etc/grub2.cfg which obviously didn’t work so i’ll try your command tomorrow and write back if it worked or not
Of course it does, and in addition
:x will only write the file if it has been modified.
sudo grubby --update-kernel=ALL didn’t work, what now?
sudo grub2-mkconfig -o /etc/grub2.cfg atleast gave me the same “text” as in the video when he typed
update-grub, so I guess i’m stuck with the boring default grub menu?
Edit: Figured it out! I went back to the tutorial I used to install fedora because I remembered he updated grub in that video to get more entries into grub-customizer. The command was
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Hello @thedinotamer ,
For Fedora, Grub2 is used a bit differently so you should consult Bootloading with Grub2 for info on how Fedora uses Grub2 and what customization is available to you. In Fedora workstation configuration of Grub (the menu and behaviour) is found in
/etc/gurb.d which is restricted by permission so you must use sudo when doing things there.
It has been a few years ago now but I did manage to change the background image (displayed one) on my menu that was the PiPBoy background from Fallout. This was done on a Fedora Workstation prior to F25 I think. Grub has changed since then for sure, but I still think it’s do-able since GuixSD does it, and so do others.
Glad you got it working!
grubby didn’t do the job because the command I provided was meant to update the kernel command line options. I assumed it updates grub too, but apparently not.
@td211 Now i’m encountering a new problem i’m trying to change the resolution of the the to fit my 1366x768 laptop but neither
videoinfo works and when i’m in the terminal by pressing
c while in the grub menu I can’t type
/ which led me to press
esc and proceed logging in normally followed by entering
sudo vim /etc/default/grub in the normal terminal and changing the resolution to
`GRUB_GFXMODE=1366x768x32 and then after saving and exiting using
:wq I entered
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg.
But when restarting afterwards it seems nothing changed. Should I try
grub-mkconfig -o /boot/grub/grub.cfg like it says on the grub theme’s github page or is that an old command from before grub2 became a thing?
It gets a bit complicated.
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg was correct some releases ago, but no longer correct.
The contents of
/boot/efi/EFI/fedora/grub.cfg should look something like
search --no-floppy --fs-uuid --set=dev 56a83e29-1e98-44f6-a33e-8988906ef2a1
56a83e29-1e98-44f6-a33e-8988906ef2a1 is the file system uuid of your
/boot file system. The file system uuid can be found when running
lsblk -fp so don’t use my value verbatim.
/etc/grub2.cfg is a symbolic link to
/boot/grub2/grub.cfg and that is the file you would update with the
grub2-mkconfig command. Do be careful when experimenting with these files. A mistake can make the system un-bootable.
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg is not correct? Why did it work when I needed the theme to get applied then? How should I proceed to not screw up everything?
You can leave it as is, but there is a possibility that some things doesn’t quite work properly.
Also, keep in mind that various tutorials you find in the internet my not be correct or are out of date with the current version.
Yep, also some that apply for Ubuntu doesn’t for Fedora due to different configurations.
That command will work, but after running it then it must be manually repeated with EVERY kernel update.
Several releases back fedora modified grub and made that file (/boot/efi/EFI/fedora/grub.cfg) a pointer file that redirects grub to the actual grub.cfg file located at /boot/grub2/grub.cfg. Normal updates no longer modify that file in any way so once one has modified it the automatic updates done with a kernel install do not touch it.
Recovery is fairly simple.
sudo rm /boot/grub2/grub.cfg /boot/efi/EFI/fedora/grub.cfg
dnf reinstall grub2-common (or
dnf reinstall grub2-*)
This should recreate both the files removed in step 1
Just so you are aware for future use the proper command to update grub.cfg is
sudo grub2-mkconfig -o /boot/grub2/grub.cfg or as was already mentioned
sudo grub2-mkconfig -o /etc/grub2.cfg.
Official documentation is here
@computersavvy If I understand correctly I should do those two commands and then reboot to make the grub.cfg update itself automatically when I update the kernel, which i’m guessing is the normal behaviour? Are you sure this won’t eat up my Windows 10 boot option?
I have more than once done those commands in that sequence for testing purposes.
If the system now shows the windows option in the grub boot menu it should continue to do so. I would not anticipate any differences.
And, yes, by resetting both those files to the ‘default’ state as fedora normally creates them then kernel updates should automatically be shown. Without resetting the /boot/efi/EFI/fedora/grub.cfg file then automatic kernel updates will not show in the grub menu since that file is not normally altered on fedora systems.
I see, thank you all for the help