Creating Custom Grub Splash Image

I’ve not posted anything technical for a while, well if you can call this technical. I just thought I would write a quick ‘how to’ for creating your own custom grub splash images.

I am assuming that since you are trying to create a grub splash image that you are using some variation of Linux and have the gimp & gzip installed.

Creating The Grub Splash Image

To begin you need to either create your image or find one you like. Once you have an image, open it up with the gimp and resize it to 640 x 480. To do this go to Image > Scale Image and then enter the width 640px & the height 480px and then click scale. now you need to reduce the amount of colors used in the image to 14 to do this select Image > Mode > Indexed Colours and then where it shows maximum number of colors set this to 14 and click ‘ok’.

Now save the image with an .xpm extension by selecting File > Save As then entering the name of you new grub splash image followed by .xpm (mygrubsplash.xpm) or you can select the file extension from a list by selecting File > Save As then clicking Select File (Type By Extension) then just click save, but it is probably easier just to type the .xpm extension after you enter the file name.

The last step to creating your custom grub splash image is to gzip it. Just as long as you remembered where you saved it, if you are using Gnome (not sure about KDE) you should be able to right click on your new .xpm file and select create archive then select the .gz file extension from the drop down list and click create. If for some reason you are unable to do this, then you can do it all through the command line as a normal user, just make sure to change to the directory that your splash image resides in first.

$ cd /foo/bar/
$ gzip -c mygrubsplash.xpm > mygrubsplash.xpm.gz

Installing The Grub Splash Image

Now you can install it. All you have to do is move your .xpm.gz file to /boot/grub/, You can do this through the command line but you must be root, so either su - or sudo like so:

# su -
# mv /foo/mygrubsplash.xpm.gz /boot/grub/

or

# sudo mv /foo/mygrubsplash.xpm.gz /boot/grub/

You then have to edit a file called menu.lst which is located in the same directory /boot/grub/menu.lst and adding this line: splashimage=(hd0,0)/grub/mygrubsplash.xpm.gz to it where mygrubsplash is the name of your.xpm.gz file. first check to see if this is already present in your menu.lst file, if so just edit the name of the .xpm.gz bit to match your own.

I’m using Vi to edit the file, because it’s pretty much the default text editor for most Linux distros. Feel free to use a text editor you feel more familiar with.

# vi /boot/grub/menu.lst
splashimage=(hd0,0)/grub/mygrubsplash.xpm.gz

Quick tip if you have never used Vi to edit with, you must first press ‘i‘ to start editing and when you are done editing press the escape key in order to save the changes to the document you must press ‘:wq‘ that will save changes and exit the document. if you just want to quit without saving the changes press ‘:q!‘.

Also you may want to change the default background colour and text colour to better suite your new splash image. You can do so by adding the text below to your menu.lst.

foreground = ffffff
background = 000000

If you are using Debian like me, you may want to comment out the default colours first before you add your custom colours. You can comment them out using the hash ‘#’ symbol.

#Pretty colours
#color cyan/blue white/blue

Hopefully if you followed everything correctly you should have your custom grub splash installed and ready. You should now be able to view it the next time you reboot. Have fun ;).


0 Responses to “Creating Custom Grub Splash Image”


  1. No Comments

Leave a Reply