Origin : http://www.hadez.org.
Author : Stuart Morrison <webmaster@hadez.org>

LILO bitmaps and color menu.


Contents
Introduction.
Overview.
Bitmap Options.
Color Values.

Introduction.
I'm a big fan of the LILO boot-loader. Although LILO has it's limitations it remains popular due to it's robustness, flexibility and maturity.

Note on spelling : In the UK we spell the word colour COLOUR. In the US it is spelled COLOR. I stick with the spelling used in LILO for this document.

In the past LILO provided a text message and prompt at boot-time. The person booting the macine could specify options for starting their Operating System by typing in codes.

Some newer versions of LILO, however, allow images to be displayed and the options for starting the Operating System to be chosen from a menu.
To find out if your version supports images read the man pages for lilo and lilo.conf or look for the -E option in the output of
lilo --help.

This article aims to fill some gaps in the information I have found on the web regarding the use of images and colour menus with LILO.

It does not aim to be a general guide to LILO as there is loads of good documentation available elsewhere. It is assumes you have at least read the lilo man page and lilo.conf man page and have some idea of how to use LILO properly. You use this informaton at your own risk.

Misconfiguring LILO can prevent your Operating System from running.

Overview.
The old
install = /boot/boot.b
option for the lilo.conf file has been superceded. While the line above is still valid there are new values that have special meanings..

install = text
this is the equivilent of the above line. It presents a text prompt and message.
install = menu
this is the default in newer LILOs. It presents the boot choices in a menu.
install = bitmap
this displays an image and presents the menu superimposed on the image.

The option we are interested in here is the install = bitmap line. In conjunction with a few more lines in the global section of the lilo.conf file it tells LILO to display an image at prompt time and present the options as a menu. The other lines are described below.

Bitmap Options.
In the following options positional values can be specified as character positions or pixels. If a positional value ends with a p character it will be interpreted as a value in pixels. A plain number is interpreted as a character position. The positional origin ( 0,0 ) and (0p,0p) is the top-left corner of the screen.
The number of character rows and columns may vary depending on your VGA mode.

bitmap = filename
filename identifies the image to use as a background. Should be 640x480 bitmap with 256 or 16bit color depth.

bmp-colors = fg,bg,sh,fg,bg,sh
Specifies the colors for the menu. The first three values refer to the color of unselected menu items, the second triplet refer to highlighted items.
fg = foreground, bg = background, sh = text shadow.

bmp-table = x,y,col,row,sep
Specifies the position and layout of the menu.
x and y are the position (in character positions or pixels), col and row are the number of columns and rows and sep is the seperation between columns.

bmp-timer = x,y,fg,bg,sh
Specifies the x and y co-ordinates of the countdown timer and it's colors..

Color Values
The color values used for the bmp- options are the index numbers from the bitmap's palette. They therefore vary from image to image - there is no way to hard-code specific colors, you have to reference the palette.

The first color in the pallete is 0, the second is 1 and so on. This is to ensure the maximum number of unique colors is not exceeded. If you need a color that is not in the image's palette you will have to add them to the palette. Hint: reduce the number of colours to 250 then increase it to 256 and use the last 6 palette entries for your menu colours which will now be free.


© Stuart Morrison 2003.