You are here
Home > Redhat > How to change grub image in Redhat

How to change grub image in Redhat

Grub is used to select between two or more operating systems installed on your computer. Grub's default background is black with white text, but it is possible to choose the background image of your choice. This tutorial will go through the process of creating your grub background and having Grub to show it next time you start your computer.

Creating the background image

Use a simple logo or a graphic that looks good with very few colors ; don't use a photo, for instance. Launch your favorite tool to create your splash image and save it with only 14 colors and 640x480px. Here's how you can do so in Adobe Photoshop and in GimpShop: Go to "Image > Size" and then "Image > Mode > Indexed colors". Then save your image as PNG if you used Photoshop, or as XPM if you used GimpShop/The GIMP. If your image is in PNG, you'll have one more step to convert your image in XPM: Open your terminal and issue the following command that uses ImageMagick to convert your image:

$ convert splash.png -resize 640×480 -colors 14 splash.xpm

Now that you have your image indexed at 14 colors and resized to 640x480px in the XPM format, let's compress this splash image. Go back to your terminal and issue:

$ gzip splash.xpm

This will create a splash.xpm.gz file suitable for Grub. We now need to copy this file to the Grub directory. Let's do this now:

$ su –

(Type your root password)

# cp splash.xpm.gz /boot/grub/

Make sure your Grub background image is in the Grub directory:

# ls /boot/grub/splash*


Configuring Grub to use the new image

Now we only need to ask Grub to use this background image. This is set in Grub's configuration file. Now open this file:

$ vi /boot/grub/menu.lst

And add the following line in the beginning of the Grub configuration file:


You need to change (hd0,0) according to the partition where Grub resides. If Grub is already set up, you will find out observing the configuration for your current system in this particular file; more information can be found in the Grub manual.

Save and reboot your computer. Grub should use your image as background now 🙂


Leave a Reply

7 − 7 =