Simple customization of the the GRUB 2 menu on openSUSE can be quickly done without any additional software.
GRUB stands for GRand Unified Bootloader. It was developed by Erich Boleyn in 1995 under the GNU Project and released under the GPLv3 license. Its current version is 2, that is why it is often written as GRUB 2.
GRUB is a bootloader which is the piece of software that a computer reads when booting up to know the location of the operating system.
In order to change the boot options and Kernel parameters, open YaST and go to System > Boot Loader.
More advanced customization can be done by editing the
/etc/default/grub file. However, one needs to proceed with caution as a broken config can prevent your computer from booting up.
/etc/default/grub is well documented. I suggest that you follow the in-line comments when modifying values, rather than relying on bits and pieces of info from the internet. The first line in the file reminds the user to execute
grub2-mkconfig -o /boot/grub2/grub.cfg after making changes to the file. Always remember to run after making changes.
Now, look at the bottom of the file:
# GRUB_INIT_TUNE="480 440 1" GRUB_BACKGROUND= GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt SUSE_BTRFS_SNAPSHOT_BOOTING="true" GRUB_DISABLE_OS_PROBER="false" GRUB_ENABLE_CRYPTODISK="n" GRUB_CMDLINE_XEN_DEFAULT="vga=gfx-1024x768x16"
These are pretty much everything you will need to make a fancy GRUB menu. Note that the above configuration is taken from openSUSE Leap 15.2. If you are using another Linux distribution, they may be different.
You can specify a background image for GRUB. The image must be .png, .tga, .jpg, or .jpeg and it will be scaled if necessary. The image should be in a location where GRUB can read. I suggest you put the image in the
/boot/grub2/themes/openSUSE folder for now. You could also add the
GRUB_DISTRIBUTOR key to provide a custom name to the distribution, like to say openSUSE Leap is rock-solid!. 😉
# GRUB_INIT_TUNE="480 440 1" GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/blue-background.png GRUB_DISTRIBUTOR='openSUSE Leap is rock-solid!' #GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt SUSE_BTRFS_SNAPSHOT_BOOTING="true" GRUB_DISABLE_OS_PROBER="false" GRUB_ENABLE_CRYPTODISK="n" GRUB_CMDLINE_XEN_DEFAULT="vga=gfx-1024x768x16"
Notice that I commented the
GRUB_THEME key to avoid it overwriting the change. Lastly, we run
grub2-mkconfig to re-build the GRUB configuration.
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot the machine & we should now see the blue background image that we specified.
You can also edit the openSUSE GRUB theme specified by editing the
/boot/grub2/themes/openSUSE/theme.txt file and experiment further with GRUB theming.
The GNU GRUB official manual can help you better understand the theme file format.
Read more on the getting nice background images.