Personalise your GRUB Boot Menu with a Custom Image

If you dual (or triple, or more) boot your machine, i.e. you have many different operating systems you choose between at startup, you might have to use your bootloader fairly frequently.

GRUB is a very functional boot loader and can do the job in most cases. But its default text-based view is a little visually unattractive, is it not?

In this tutorial, I'll show you how to put together a custom image which will be the background for the boot menu - so your multi-boot system can be a little more stylish.

Custom GRUB splash image

I'll assume the primary operating system where GRUB was installed from is Ubuntu (8.10) for the purposes of this tutorial, but instructions should follow for most Unix-like operating systems. We will be using GIMP to convert the background image.

Getting Creative (Within Constraints)

The GRUB background needs to be an image of exactly 640×480 pixels to begin with. In addition, due to the limited environment in which GRUB runs, the image needs to be fairly simple, particularly with respect to the number of colours it uses.

We need to mix the final file down to an image containing just 14 different colours, so this may affect what kind of design you'd like for your background image. You'll also want to it bear in mind the colours available for the actual GRUB text are also quite limited, along with the fact that the middle of the picture will be taken up by the menu.

Crafting your image in GIMP

Once you've got your design done, I recommend you save it in GIMP's native XCF format, in case you want to make edits later.

Save As and Change to Indexed

Now, use Save As and make a new copy of the image called splash.xpm. Entering this file extension will automatically tell GIMP to save in the X Pixmap Format, which GRUB requires.

Save as XPM

Once you've make this new copy in XPM format, we now need to mix this image down to just the 14 colours that GRUB will let us use.

Go to Image > Mode > Indexed. In this dialogue, choose Generate optimum palette and set the number of colours to 14. Now click Convert.

Convert to Indexed Colours

You will now notice how much your image is affected by this palette change. This is how the image will look in GRUB.

Once you're happy, save the file (keeping it in the XPM format).

Copy to GRUB Folder

Now our image is ready, we need to copy it to the GRUB folder and instruct GRUB to use it as a splash image.

You'll likely need root privileges to copy the splash image to the right place, so we'll perform this step from Terminal.

$ sudo cp /wherever/it/is/splash.xpm /boot/grub/splash.xpm

Copy file to GRUB folder

Edit the GRUB Config File

Before we proceed with this final step, be careful. Don't go messing with things in the GRUB configuration file, or you could end up having problems booting your machine. You have been warned.

You'll need to open up the file /boot/grub/menu.lst in your favourite text editor, with root privileges. For example:

$ sudo gedit /boot/grub/menu.lst

Simply add the following line somewhere near the top and save the file:

splashimage=(hd0,0)/boot/grub/splash.xpm

Note - this assumes that the primary OS where the GRUB bootloader was installed from is on the first physical hard drive, on the first partition. If your setup is different, you may need to use different numbers. For example, the second physical disk and third partition would be (hd1,2).

Editing GRUB configuration file

Once you've saved and rebooted, you should see your new boot screen!

You may also want to play around with the colours of the menu text to fit in with your new theme.

Avatar for peter Peter Upfold - http://peter.upfold.org.uk/

Peter Upfold is a technology enthusiast from the UK. Peter’s interest in Linux stems back to 2003, when curiosity got the better of him and he began using SUSE 9.0. Now he runs Linux Mint 9 on the desktop, runs a CentOS-based web server from home for his personal website and dabbles in all sorts of technology things across the Windows, Mac and open source worlds.

Home » Articles »

Discussion: Personalise your GRUB Boot Menu with a Custom Image

  1. Lee (guest)

    # Posted on 10 February 2009 at 09:10 PM

    One word: Fancy Although it is a bit of a shame that in this day & age of high-res, widescreen monitors that GRUB doesn't support higher/wider resolutions. But that's only little niggle of mine. After all I don't tend to stare at the boot menu wondering why it is so pixelated.

    Lee ;)

    p.s. On a totally unrelated note; Topman ads ... not exactly FOSS is it GOOGLE!



  2. anarki13 (guest)

    # Posted on 11 February 2009 at 02:08 PM

    ummm.. shouldn't

    splashimage=(hd0,0)/boot/grub/menu.lst

    actually be:

    splashimage=(hd0,0)/boot/grub/splash.xpm

    ?



  3. Peter (guest)

    # Posted on 11 February 2009 at 02:10 PM

    anarki13,

    Thanks for pointing out, I have corrected the article.



  4. Binny V A (guest)

    # Posted on 12 February 2009 at 07:50 PM

    Grub2 offers a lot more possibilities. But then again, I use <a href="http://lindesk.com/2009/01/xosl-boot-loader-an-alternate-for-grub/" rel="nofollow">XOSL as my primary bootloader</a>



  5. computerwizard (guest)

    # Posted on 27 September 2009 at 12:51 PM

    thanks .. it helped me ..



Home » Articles » Personalise your GRUB Boot Menu with a Custom Image