Add pictures and passwords to Ubuntu’s boot menu

Ubuntu’s boot menu is provided by GRUB (GRand Unified Boot loader). Some other distributions use LILO, but GRUB has many benefits: it’s simple, small, and relatively easily configured.

Below I explain how to add a “wallpaper” to the GRUB boot menu, and then explain how to add password protection. Both tips are taken from my new book Ubuntu Kung Fu, and should work OK on other distributions of Linux, although I’ve only tested these steps on Ubuntu 8.04.1.

Let’s crack on with it.

Give the Boot Menu Wallpaper

Ubuntu’s boot menu is ugly and looks like it’s straight out of 1985. It doesn’t have to be this way. The GRUB menu software is capable of having a graphical backdrop that can be any picture. However, you’ll need to shrink the picture and reduce its color level. Because of this need to simplify the image, graphical designs tend to work better than photographs (I noticed that cartoon images work well too—pictures from The Simpsons are a particularly good choice!).

Choose a picture, and then load it into the GIMP (right-click, and select Open With —> Open with “GIMP Image Editor”); you might like to know that the default Ubuntu desktop wallpapers are stored in /usr/share/backgrounds. You should select a picture that’s roughly in 4:3 ratio, such as a digital camera snap. Don’t select very tall or broad images—they won’t work.

Right-click the image within GIMP, and select Image —> Scale Image. In the Width box, type 640, and hit the Tab key. The Height box should then automatically change to 480. If it doesn’t, click the small chain icon to the right of the Width and Height boxes so that it changes to a broken chain icon. Then enter 480 into the Height box. Once done, click the Scale button.

Right-click the image again within GIMP, and select Image —> Mode —> Indexed. Ensure Generate Optimum Palette is selected, and then type 14 into the Maximum Number of Colors box. Then click the Convert button. The picture might now look ugly, but such a low color count is all the GRUB boot menu allows. You might want to try an alternative simpler image if you don’t like what you see. Some nice Ubuntu-themed ready-made boot menu wallpapers are available for download from https://wiki.ubuntu.com/Artwork/Incoming/Hardy/Alternate/Grub.

Right-click the image again within GIMP, and select File —> Save As. Give the file a name in the Name box, and use the .xpm file extension. You might save the file as bootwallpaper.xpm, for example. Bear in mind that GIMP automatically detects the file type it should save the file as from the file extension. Click OK to select the default alpha values, if prompted.

Open a terminal window, and type the following (this assumes the file was saved to the desktop):

sudo mkdir /boot/grub/splashimages
gzip ~/Desktop/bootwallpaper.xpm
sudo mv ~/Desktop/bootwallpaper.xpm.gz /boot/grub/splashimages

Replace bootwallpaper mentioned earlier with the filename you chose.

Then open the boot menu file for editing in Gedit:

gksu gedit /boot/grub/menu.lst

Look for the line that begins ## ## End Default Options ##, and, after that, add a new line that reads splashimage=(hd0,4)/boot/grub/splashimages/bootwallpaper.xpm.gz.

As earlier, replace bootwallpaper with the filename you chose. Save the file, and then reboot to see the new wallpaper in action.

Note that the last step assumes your computer is dual-booting with Windows. If Ubuntu is the only operating system on your computer, the line should read splashimage=(hd0,0)/boot/grub/splashimages/bootwallpaper.xpm.gz.

To remove the wallpaper, simply edit the menu.lst file and remove the splashimage line you added.

Pages: 1 2

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.