Almost 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
- A text editor
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.
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.
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.
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
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/
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
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.