Introduction
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
Example Image
Configuring Grub
- Adding an image
- Editing the grub configuration
- Seeing your results
- Troubleshooting
Making your own splash image
- New file
- Create the art
- Reduce colors
- Save and compress
Conclusion
Links
Example Image
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.
Configuring Grub
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).
Code:
sudo mkdir /boot/grub/images
sudo mv usplash.xpm.gz /boot/grub/images
2. Editing the Grub configuration
Backup!
Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.old
Then open the grub config file menu.lst:
Code:
sudo gedit /boot/grub/menu.lst
Locate a appropriate place to add the image, find the following (row 24 or therabout):
Code:
# Pretty colours
#color cyan/blue white/blue
And add a new section below the above lines:
Code:
## Splash image!
splashimage (hdX,Y)/boot/grub/images/usplash.xpm.gz
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:
Code:
## ## End Default Options ##
title Ubuntu, kernel 2.?.??-?-??
root (hdX,Y)
There you can find the proper numbers to use for your splashimage command.
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:
Code:
## Splash image! (On separate partition)
splashimage (hdX,Y)/grub/images/usplash.xpm.gz
3. Seeing your results
Reboot and your splash image should be visible as the Grub background.
4. Troubleshooting
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:
Code:
gzip image.xpm
sudo cp image.xpm.gz /boot/grub/images
Conclusion
You should now have a nice background in Grub, and perhaps even your own creation!
Links
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.
Bookmarks