LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > Garda
User Name
Password

Notices

Rate this Entry

Add splash image to GRUB

Posted 12-15-2008 at 02:59 AM by Garda

I wanted to add something to the default GRUB screen that greets you as you start Linux more nicely than monochrome text.
I did this using the splashscreen feature of GRUB version 1, the boot loader that I had installed.
I used Krita for some of the image manipulation, but GIMP is also a good app. On Debian, you can get GIMP as root with

Code:
apt-get install gimp
Splash images in GRUB have to be in .xpm or "X PixMap" format and they have to be 640x480 in size, and 14 colours.
I found a nice image of tux on the internet and converted it to the right format.
For interest, images can be .xpm or .xpm.gz (a gzipped image) which are created using

Code:
cat image.xpm | gzip > image.xpm.gz
Images are completely uncompressed and compressing using gzip does significantly reduce their size, however it's not really necessary given that they are only ~300KB anyway.

I placed the image in /boot/grub

To make the image appear during boot, I added the line to /boot/grub/menu.lst
This file may be called something different depending on your distro.

Code:
splashimage=(hd0,0)/grub/splash.xpm
(hd0,0) may be different depending on the location of where Linux is installed for you. There should be a section in this file that looks something like this:

Code:
title		Linux
root		(hd0,1)
kernel		/vmlinuz root=/dev/hda2 ro
In this case (hd0,1) should be used. This is probably the easiest way of figuring out your drive's GRUB designation.
I'm not sure why, but the splash image line needs to be entered into the GRUB configuration file in the early part of the file before the OS lists, otherwise it does not work.
I could not get really good results with Krita, but I was able to find a nice Debian package (there may be a similar package for other distros) with pre-made images

Code:
apt-get install grub-splashimages
These images are placed in /boot/grub/splashimages/ and can be accessed using a line such as

Code:
splashimage=(hd0,0)/grub/splashimages/debsplash.xpm.gz
Posted in Uncategorized
Views 2180 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration