« Net neutrality debate heating up | Main | Coporate malware caught in the act »



Some distros have sexy boot screens, some have basic, boring ones. Here's what I get from a default installation of Kubuntu...



What a yawn! But there's an easy way to spice them up. Add either or both of the grub-splashimages...




and kubuntu-grub-splashimages packages...



To add a new splash image, edit /boot/grub/menu.lst and add the line

splashimage /boot/grub/splashimages/FILENAME.xpm.gz



DIY Splashing

If you find the above selection a bit dull, its a doddle to create your own.

The images used by the grub bootloader must be in X PixMap (.xpm) format and may or may not be compressed with gzip (.gz). What's more, they have to be sized 640x480 pixels and have no more than 14 colours(!?). Fortunately, if you have ImageMagick installed, this command will do the whole conversion for you...
convert infile.jpg -resize 640x480 -colors 14 -depth 8 outfile.xpm.gz
 (Note that you can use pretty much any graphic with convert. You're not restricted to JPGs.)

Not every image converts nicely. That 14-colour format can turn great images grainy -- or worse -- so here's a quick batch file to convert a bunch of randomly named JPGs into .xpm.gz format. To use it, create a new folder, copy in the files you want to try, save the following as xpm_convert.sh, and make it executable by typing chmod +x xpm_convert.sh in a console window.

#!/bin/bash
FILE_NO="1"
for i in *.jpg
  do
    echo Converting $i
    convert $i -resize 640x480 -colors 14 -depth 8 $FILE_NO.xpm.gz
    FILE_NO=`expr $FILE_NO + 1`
  done


Running the program with ./xpm_convert.sh will create a bunch of consecutively numbered .xpm.gz files, which should be copied to /boot/grub. Why use numbers instead of names? Because it makes it easier to test the new files.

When you reboot, hit "c" when the boot menu appears. This will take you to the a grub command line. Now type splashimage /boot/grub/1.xpm.gz to try out the first of your new images. Then try splashimage /boot/grub/2.xpm.gz to test the second one, and so forth. There's no need to do a full reboot and change menu.lst every time!

A couple of other notes:
*  The above doesn't seem to work unless your menu.lst already contains a working splashimage.
*  You can use auto-complete on the grub command line, so instead of typing the whole command you can type sp <tab> /bo <tab> g <tab> etc.



<--Previous Hidden Linux        Next Hidden Linux -->


 


Comments

its not working please tell clearly...
i am using redhat linux 5

Thanks! I'm so bored by the text but you saved my boot!

You need to specify the drive and partition also:
splashimage (hd0,0)/boot/grub/splashimages/FILENAME.xpm.gz

(hd0,0) obviously should change depending on one's specific partition and drive setup - it's (hd0,2) for me. The kernel entries at the bottom of the menu.list file are helpful if you're not sure. If you have a separate /boot partition then it's more like (hd0,0)/grub/splashimages/etc.etc

This post on the Ubuntu forums has some more tips I found useful after setting up a splashimage. Namely details on the viewport option, which adjusts the size of the box surrounding the menu of OS/kernel choices.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)