Note: Content on this page is old and probably no longer applicable, kept online for historical purposes

Installing a Custom Lilo (Bootsplash) Bitmap Image

One afternoon I was reading through a fairly linux book that I was to write a review on, and I came to a bit about bootloaders. It mentioned that systems like Red Hat take advantage of the ability to customize lilo. "Wow," I thought to myself "they do, I wonder how they do that." So I decided to figure it out.

Despite the few hours I spent on it, it's very simple, but it can be tedious when it comes to placing the text. The real trouble I encountered was the inability to find suitable documentation that explained things properly. Keep in mind you'll need framebuffer to do this!

Step One - Choosing an Image

The image will have to be 640x480. So crop, resize, do what you need to do to your chosen image to get it. Keep in mind that you should pick an image that won't look "horrible" when rendered in 16 colors[1]

[1] Technically you can use 256 colors in this image, but then you have trouble when it comes to setting your font color, as you only have the first 16 colors of your indexed palette to work with.

Step Two - Preparing the Image

Open your image in Gimp

Right click on the image, go to Image -> Mode -> Indexed

In this dialog, set the # of Colors to 16.

Your image will look different, as it's reduced to only 16 colors

Right click on the image, go to Dialogs -> Indexed Palette. This palette is what you will use when choosing font colors

Step Three - Editing /etc/lilo.conf

First of all, if you have menu-scheme defined, comment this out (or remove it)

Next, you'll want to actually see this, so add a line (if you don't have one already) that says:
prompt
You may also want to add a timeout (in tenths of seconds, so 100=10 seconds):
timeout=100

There will be at least three (possibly four) lines you want to add:
bitmap=<bitmap-file>
bmp-colors=<fg>,<bg>,<sh>,<hfg>,<hbg>,<hsh>
bmp-table=<x>,<y>,<ncol>,<nrow>,<xsep>,<spill>
And if you want to display timeout:
bmp-timer=<x>,<y>,<fg>,<bg>,<sh>

This might look daunting at first, but don't worry, most of it is pretty simple, the LILO.CONF(5) man page (man 5 lilo.conf) explains it well:

"bitmap=<bitmap-file>
Specifies use of a 640x480x16 bitmap file as the background on which a boot menu is displayed. May not be used if 'message=' is specified. Use of this option will select a bitmap-capable boot loader, unless overridden with "install=" (see below).

bmp-colors=<fg>,<bg>,<sh>,<hfg>,<hbg>,<hsh>
Specifies the decimal values of the colors to be used for the menu display on a 'bitmap=' background. The list consists of 6 entries, 3 for normal text followed by 3 for highlighted text. The order of each triple is: foreground color, background color, shadow color. If background color is not specified, "transparent" is assumed. If shadow color is not specified, then "none" is assumed. The list entries are separated by commas, with no spaces.

bmp-table=<x>,<y>,<ncol>,<nrow>,<xsep>,<spill>
Specifies the location and layout of the menu table. <x>,<y> specify the starting x- and y-position of the upper left corner of the table in character coordinates: x in [1..80], y in [1..30]. <ncol> is the number of columns in the menu (1..5); and is the number of rows (entries) in each column. If more than one column is specified, then <xsep> is the number of character columns between the leftmost characters in each column: (18..40), and <spill> is the number of entries in one column which must be filled before entries spill into the next column. <spill> must be .le.<nrow>. If pixel addressing is used, instead of character addressing, then any of <x>,<y>, or <xsep> may be specified with a 'p' suffix on the decimal value.

bmp-timer=<x>,<y>,<fg>,<bg>,<sh>
Optional specification of the 'timeout=' countdown timer. <x>,<y> specifies the character (or pixel) coordinate of the location of the timer thesame as 'bmp-table=' above; and the color triple specifes the character color attributes the same as 'bmp-colors=' above, with the exception that the background color must be specified. If used to override the timer specification in a bitmap file, then the form 'bmp-timer = none' is acceptable. This will disable the timer display entirely."

- LILO.CONF(5)

Confused? No worries, there are only a few vital parts to understanding this. For ease of explaining, let's look at mine for an example:

bitmap=/home/elizabeth/leiaLilo3.bmp
bmp-colors=0,,4,15,,4
bmp-table=90p,145p,1,15,17
bmp-timer=50p,450p,15,6,4

bitmap= points to the location of the image

bmp-color= is a bunch of needed color codes. You find these colors by looking in the "Indexed Palette" in gimp that you created in Step Two, the man page entry is quite clear as to what each place represents

bmp-table= the first two are the most important, they define the place on the screen you want to put the boot options, in my example I did it by pixels so I could match up on my image in gimp where I wanted the table to land, but for the y coordinate I could not go over 255p. You'll probably want to choose 1 for the ncol, and play around with settings you want for the rest, I just grabbed mine from an online example.

bmp-timer= this selects the place you want to put the timer(just like bmp-table), and the colors to use for it (similar to bmp-colors, but transparent (no option selected) doesnt seem to be an option!)

Once you've put in all this information, save your file

Step Four - Running lilo

To update lilo, type: lilo

Did you get any errors? There are a few you might run into, but they are pretty self explainatory, and you'll probably be able to figure them out. Don't reboot until you have fixed all fatal errors!

Step Five - Reboot and enjoy!

Not much to say there, reboot your machine and hope things work!



My Lilo

The bitmap image that I use is here: leiaLilo3.bmp

The following is a photo I took of my monitor while booting up:

pleia2's lilo boot screen
Click to enlarge


Links/Resources

http://wiki.archlinux.org/index.php/Graphical%20Lilo - This site is the one I FINALLY found to help me create and process my image so I knew what the 16 color options were.

http://www.debianplanet.com/node.php?id=664 - A thread that touches upon some common problems.

man 5 lilo.conf - more information about lilo options

Questions? Comments? Want to tell me to use grub instead? Email me! Lyz@PrincessLeia.com