How To Create A Custom Splashimage For GRUB

Ads by Google

   How To Create A Custom Splashimage For GRUBAlmost all the popular Linux distributions use the GNU GRand Unified Bootloader (GRUB) as the bootloader of choice these days. If you have been experimenting with a number of distributions, you must have seen that some of them have a backdrop image for GRUB and some (like Ubuntu) don’t.

If, like me, the default black background of the GRUB menu looks boring to you or if you would like to change the default backdrop to something of your choice, like your girlfriend’s photo for example, then follow along!

We will use:

  • An image of the photo you want to use as the background
  • GIMP
  • A text editor

Steps

First, open up the image you want to use as the backdrop in GIMP. There are a few things you should keep in mind while choosing a image for a task like this. You must keep in mind that when the GRUB menu is displayed, your system has limited graphic capabilities. So don’t choose an image that is too wide or too high. A normal 4:3 aspect ratio photo or image would work well.

Also not something that we will have to reduce colors (to a mere 14 to be precise), so again don’t choose something with gradients, or soft edges or varying tones of a single color because all this will look abrupt once we finish editing to make it work with GRUB.

Ads by Google

Once the image is open inside GIMP, go to Image > Scale Image.  In the dialog that appears, type 640 for the width, the height would automatically be reduced to 480 (if it’s set to constrain proportion and if you chose the right sized image). Once you are satisfied hit ‘Scale’. The image will now be scaled to 640 x 480, which is perfect for our needs.

scalegrb   How To Create A Custom Splashimage For GRUB

Next go to Image > Mode > Indexed. Check ‘generate optimum palette’ if it’s not already checked and key in ’14’ in the ‘Maximum number of colors’ box. Leave color dithering to none. Hit ‘convert’ and you will see that your image loses some colors and looks a bit out of place. If it’s too much for you, maybe you should try it on a different image. It’s all about what you would like to see! If it looks good, then we are almost done.

indexcolor   How To Create A Custom Splashimage For GRUB

Click on File > Save and save the image as an xpm file. Further use gzip ~/background.xpm (assuming you saved it as background.xpm in your home directory) to create a file background.xpm.gz. You may also use File Roller to achieve the task as long as you get background.xpm.gz

savegrb1   How To Create A Custom Splashimage For GRUB

Now for the final part we need to tell GRUB to use the masterpiece you have just created as the background. Since now you know how to create the backgrounds for GRUB, you might as well create a dedicated directory to store them. Quickly type in the following set of commands:

sudo mkdir /boot/grub/backgrounds/
sudo mv ~/background.xpm.gz /boot/grub/backgrounds/

termgrb   How To Create A Custom Splashimage For GRUB

Finally edit the boot menu file to let GRUB know about the location of your master piece(s). You will need to edit the /boot/menu.lst file. Do so as follows:

sudo vi /boot/grub/menu.lst (or “gksu gedit /boot/grub/menu.lst” if you prefer GUI)

Scroll down or find the line which reads ‘End Default Options’. Just next to this line and before the title paragraphs start you need to insert the following line

splashimage=XXXXXX/boot/grub/backgrounds/background.xpm.gz

replace XXXXXX with your root partition. If everything went well, you should see the background next time you boot.

There you go, your very own personalized GRUB splashimage. You can also find ready made splashimages at gnome-look and other places.

Let me know in the comments if you have some questions.  Oh and don’t forget to show us what you are using as a splashimage for the GRUB menu on your machine.

Ads by Google

23 Comments - Write a Comment

Reply

hey hey

….would be nice if you could just browse to the Pictures folder, select the picture and have the software take care of it for you.

Nick

Ummm, it wouldn’t be Linux if you could do it like that.

Reply

Jorge

There seems to be a discrepancy between where the file is saved, and where GRUB thinks it is.

First there is: sudo mv ~/background.xpm.gz /boot/backgrounds/
Then: splashimage=XXXXXX/boot/grub/splashimages/bootwallaper.xpm.gz

Those directories need to match. I’d say to do create the directory splashimages in /boot/grub instead of the /boot/backgrounds directory.

Reply

fukawi2

You’re a bit confusing when all your paths are varying…

You move the .xpm.gz file to “/boot/backgrounds/”, but the screenshot of menu.lst refers to “/boot/grub/backgrounds/” and then the last text refers to “/boot/grub/splashimages/”

:-|

Reply

Varun Kashyap

Corrected the glitch guys! It should be fine now.

Reply

fgkkggf

a bunch of newbies are going to look at the sentenc

“replace XXXXXX with your root partition”

and go “huh??”

perhaps add in that the root partition can be found by doing “sudo grub” in the terminal and then typing “find /boot/grub/stage1″.

Newbie

Thanks!

Reply

AAK

Thank you very much Varun and fgkkggf.

Reply

Tharaka

hw beautiful is it? thank u very nuch.

Reply

SMiGL

Helpful article. Thanks!

Your comment