This guide will tell you how to get a nice background image while in Grub. The guide will first explain how to load an image into Grub and use it as a background and then, for those of you who are interested, how to create such an image in Gimp.
Beware! Do only do this if you feel that you know what you're doing! It may mess up your boot loading if you are careless. (Thanks to jonny for pointing this out, together with backing up). That said, it shouldn't be too hard to follow this anyway.
Table of Contents
Making your own splash image
- Adding an image
- Editing the grub configuration
- Seeing your results
- New file
- Create the art
- Reduce colors
- Save and compress
I have attached the splash image I'm using (and a thumbnail of it). We will be using this in the guide but you can use any image you want (assuming it is in the boot splash format, see Making your own splash image below). More images can be found in the Links section.
Get the splash image here.
1. Adding an image
First, move the image to the grub folder (assuming the current dir is your home folder and this is were you downloaded the image).
2. Editing the Grub configuration
sudo mkdir /boot/grub/images
sudo mv usplash.xpm.gz /boot/grub/images
Then open the grub config file menu.lst:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.old
Locate a appropriate place to add the image, find the following (row 24 or therabout):
sudo gedit /boot/grub/menu.lst
And add a new section below the above lines:
# Pretty colours
#color cyan/blue white/blue
Important! You MUST replace X and Y with the proper numbers. Grub's configuration syntax is a bit weird because it does not have the same offset as the usual mount for example. X in this case is the actual disk drive and Y is the partition. Assuming you have a pretty standard installation of Ubuntu you could find this information further down in menu.lst. Locate the section which matches the entry you normally boot from:
## Splash image!
There you can find the proper numbers to use for your splashimage command.
## ## End Default Options ##
title Ubuntu, kernel 2.?.??-?-??
Enter those in the line added before. Save the file.
Important2! If you have a separate boot partition you have to remove the /boot in the path, this is because the root of the boot partition is mounted in /boot on your other partition. Resulting in this section instead:
3. Seeing your results
## Splash image! (On separate partition)
Reboot and your splash image should be visible as the Grub background.
If the image somehow does not load Grub will behave weird, although if you have a timeout (Ubuntu has by default) Grub should boot Ubuntu anyway. Then you should be able to correct the problem. More information and tips & tricks available here.
Making your own splash image
Here's how you make your own image, I will not tell you how to use the Gimp as there are plenty of other tutorials on that, use google.
1. New file
There are some restrictions on the image, it must be 640x480 pixels large and only contain 14 colors.
2. Create the art
Uh, use your artistic talents and produce wicked art! If you want a photo or something just past it in and resize it. If you want to do something Ubuntu specific this page might be of interest. If you want to use the Ubuntu logo in SVG format (vector graphics) there is a Gimp SVG plugin available in apt-get.
3. Reduce colors
The next step is to reduce the amount of colors to 14. Go Image->Mode->Indexed... and select Generate optimum palette, set the maximum number of colors to 14 and chose a dithering algorithm that looks good. Normal gives the most coherent colored areas but the Floyd-Steinberg algorithms are more appropriate for images with many colors.
4. Save and compress
Save the image as an XPM image. You might want to save a Gimp image also (XCF) in case you want to change it. Then compress it with gzip and copy it to the Grub folder:
sudo cp image.xpm.gz /boot/grub/images
You should now have a nice background in Grub, and perhaps even your own creation!
Grub Splash Image Documentation
Ubuntu Artwork Resources
Additional Ubuntu Splash Screens
Comments and suggestions welcome!
EDIT: Backing up and precautions added. Thanks jonny.
EDIT2: Separate boot partitions handled. Thakns todw1fd.