Giving GRUB a Custom Background

by Kholddagger | 11:11 PM in , , |

Sorry, I will post my rant on the lack of functionality out there common to all operating systems that allows you to boot with a file or folder as the root partition soon. First I want to give you all another customization method for GRUB, which you now know how to put on your flash drive.

One fun and easy way to customize GRUB is to add your own background to it. I personally use the famous deep space photograph from the Hubble Space Telescope with all the different galaxies as mine because dark backgrounds work very well and it doesn't have a large range of colors. Since the images used have to be 640x480 resolution and only 14 colors, having a detailed photo with important color shading doesn't work very well after conversion.

Anyway, let's get started.

If you have ImageMagick installed on your computer, try this easy way to convert your favorite images into horribly mangled versions that can be used as a background for GRUB.

If you have funnypic.jpg stored in your "Pictures" folder, do this.

$ cd ~/Pictures
$ convert -resize 640x480 -colors 14 funnypic.jpg splash.xpm
$ gzip splash.xpm
$ mv splash.xpm.gz /media/disk/boot/grub/

Now add the following line to the top portion of your menu.lst file.

splashimage (hd0,0)/boot/grub/mybootsplash.xpm.gz
assuming that your boot directory is in the first partition, if not change the number after the comma

If you already have a splashimage line or gfxmenu line, you'll have to delete it.

You can also convert your image easily in GIMP if you like to take a more graphical approach. Just open your image in GIMP and resize it to 640x480. You can convert the image to 14 colors by going into the menus on the image window. Go Image > Mode > Indexed and change the max number of colors to 14. Now you can see how your image will look. Save it as an xpm then gzip it just as above. Move it to your flash drive and edit your menu.lst to finish up your work, and you're ready to try it out. If it didn't work, make sure that it is only 14 colors and ends in .xpm.gz and not anything else.

If you don't like the hassle of choosing and editing your own image, there are plenty of good premade ones you can download on lots of other websites and blogs. So try lots of images out and have fun with your customized GRUB menu!

0 comments: