# HOWTO: Lilo boot screen - Rough Draft

## araemo

FIRST OF ALL! BE CAREFULL!!!! backup your lilo.conf and keep a boot disk on hand.  screwing with lilo CAN render your system unbootable.

I decided to write this up for inclusion in the bootsplash/grubsplash thread, but I want to post it for everyone to peek at before I give it over to Narada to put in this post.  Please post your comments, corrections, and questions.

If you have the lilo docs installed, the interesting stuff is at 

/usr/share/doc/lilo-{version}/samples

Lilo can only handle 16 color or 256 color (4 or 8 bit) raw uncompressed or RLE encoded bitmap images.  Most of the time lilo can only support 320x200, 640x480, or 800x600.  If you want to know what modes your system supports via lilo, and you booted via lilo.

```
sudo lilo -T video
```

Once you have decided on an image, you probably have to convert it to bitmap, which can be done with The GIMP, photoshop, or, ostensibly, imagemagick convert.  If anyone can give me a working command to convert an image to a 640x480 256 color bitmap using convert, let me know.  I'll give the instructions in GIMP only for now.

First, open your file.  Right click on the image and select image->scale image.  Set it to 640x480 (You may have to click on the little chain link if your chosen picture isn't already at a 4:3 aspect ratio), and click ok.

Next, right click on the image again, go to image->mode->indexed.

This is where you set the color palette.   You want the GIMP to "Generate optimal palette" of 256 colors, and I chose to use "Floyd-Steinberg color dithering (Reduced color bleeding)" but you can play around to figure out what works best for your image. Click ok and you will have a 640x480 256 color bitmap for lilo.  Save this in your work directory as a bitmap.  I chose not to use RLE encoding, but it should work.  Next you have to set up a data file to tell lilo where the box of selections will go, what colors, how many columns there are, where to place a timer, etc.  There are example files in the directory mentioned above.  I personally used the background picture from "gentoo emergence 2" for gdm, and placed the selection box in the middle of the bottom.

```

bitmap=gentoo-emergence.bmp

bmp-table=133p,262p,1,6,327p,6

# bmp-table=[x],[y],[columns],[rows],[spaces between the start of the first row and the start of the second],[spill value per row.. not sure if it's needed?]

#note that I used p to specify pixel positioning instead of character/row positioning

bmp-colors=0,,;8,,

#bmp-colors=[fg],[bg],[I think this one is shadow color];[highlighted foreground],[highlighted background],[highlighted shadow color]

bmp-timer=5,19,0,14,

#bmp-timer=[x],[y];[foreground],[background],[.. Perhaps this is shadow color?]

```

Once you have created your filename.dat, and specified the bmp in that, you must run 

```
lilo -E filename.bmp

#make sure that you have filename.dat in the same directory
```

The above command adds the colors and timer information directly to the bitmap, so you only have to copy the bitmap to /boot after this and 

edit your lilo.conf.

```

install=/boot/boot-bmp.b

# ^^this may be previously set to boot.b or boot-menu.b

bitmap=/boot/gentoo-emergence.bmp

```

Oddly enough, I just realized I do not have a boot-bmp.b, but it still works for me.

Now you just have to run lilo to install the bitmap, and reboot to enjoy your new graphical boot menu.

Once again, please let me know if I got anything wrong, or I'm unclear about anything, and I'll edit the original post.

----------

## araemo

*Bump*

Noone using lilo out there? I hope SOMEONE will find this usefull.

----------

## Greven

Don't worry..... I soon will be testing this.

----------

## nevynxxx

 *araemo wrote:*   

> FIRST OF ALL! BE CAREFULL!!!! backup your lilo.conf and keep a boot disk on hand.  screwing with lilo CAN render your system unbootable.

 

for bootdisk, read knoppix cd, your system screwing up cos lilo is dead is not a major problem, the gentoo live cd is also good for this.

----------

## charlieg

Must link to COOLEST EVER SPLASH SCREEN... done... thanks.

----------

## kronon

I once found this in the man of lilo and got this to work. Then my hd crashed and all whas lost. Later on I tried again but didn't know how to get 256 colors encoding, so thnx very much for this great howto  :Smile: .

----------

## araemo

Well, I'm glad to be of some help.  I'm gonna clean up the grammar and organize it a bit better, and then give a copy of it to the guy maintaining the bootsplash howto.

And thats a very silly looking bootsplash.. I might just have to try it out. :)

----------

## Shaka001

how do you make the .dat file exactly ?? 

 :Embarassed: 

----------

## ed0n

thanks a lot ,

I always wanted to change it but I was to lazy to search for it.

lilo rocks  :Smile: 

----------

## Skotlex

Hmm.... has this tutorial made it into the bootsplash/grubsplash thread? It looks like not (I checked it for a while). So how come this has been abandoned for 4 days? Where are the lilo users when you need them?

Okay... here comes my 2 cents that try to save the day:

1. it works! Good. 

Now for some comments:

The lilo manpage says that you do not need to specify the "install=/boot/boot-bmp.b" line, the correct installer is used automatically when you include the "bitmap=/boot/yourbitmap.bmp", so the install line is no longer needed. As to "where did boot-menu.b go?" all those files got linked directly inside the main boot file (or something like that, read lilo's ebuild and it will explain it). 

One thing though... ya should specify that the .dat is a file you create with the entries shown in your first code section, otherwise old lilo users could get confused (as that data was in lilo.conf in earlier versions).

EDIT: Oh yeah I forgot to mention... lilo -T video displays what is available to the bootloader, but currently lilo supports only 860x480 (or that's what man lilo.conf says):

```

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).

```

I wonder if this had been explained or not.. but when you define the color of the text, the number you are entering is the index of the color in the image. So the number can go between 0->255 (I think), the best to do is to open the indexed image and use the color-picker, it will show you the index entry of the currently selected color ^.^

REEDIT: I just played a bit more around with 

```

lilo -E file.bmp

```

and figured out the following:

- If you use a bmp file, the .dat file is IGNORED, you will be editing the .bmp starting with the default values for the menu configuration. When you finish, you then get a chance to overwrite the .dat file, but lilo does not opens it for reading. 

- On the other hand, if you do

```

 lilo -E file.dat

```

Lilo will just ask to write the configuration data to the .bmp file (my lilo version is 22.5.8). In other words.. use -E with a bmp when you want to create your .dat file the first time! 

Another thing worth mentioned is that lilo allows input of coordinates in pixel values like in

```

bmp-timer = 500p,135p;60,142,24

```

This way, using the Gimp as helper, is much easier to define where you want what. Notice that lilo will not place the text on the exact pixel you ask it to, but to the nearest <row,col> to the specified pixel.

Finally... I suggest against using a transparent background for the timer, lilo does not saves a buffer of the background area of the timer, so as the timer ticks you will see numbers shown over the previous ones... (which does not looks very professional to me).

By the way... if you are like me and try to get the perfect boot-loading screen, it's likely you'll end up doing a lot of reboots while testing, so it might be a good idea to change your default run level to 1 or 2 for a while ^.^

----------

## araemo

FIRST OF ALL! BE CAREFULL!!!! backup your lilo.conf and keep a boot disk on hand.  screwing with lilo CAN render your system unbootable.

If you have the lilo docs installed, the interesting stuff is at 

/usr/share/doc/lilo-{version}/samples

Lilo can only handle 16 color or 256 color (4 or 8 bit) raw uncompressed or RLE encoded bitmap images.  Most of the time lilo can only support 320x200, 640x480, or 800x600(man lilo.conf says it only supports 800x480.. Personally, I'm using 640x480, so I can't confirm.).  If you want to know what modes your system supports via lilo, and you booted via lilo.

```
sudo lilo -T video
```

Once you have decided on an image, you probably have to convert it to bitmap, which can be done with The GIMP, photoshop, or, ostensibly, imagemagick convert.  If anyone can give me a working command to convert an image to a 640x480 256 color bitmap using convert, let me know.  I'll give the instructions in GIMP only for now.

First, open your file.  Right click on the image and select image->scale image.  Set it to 640x480 (You may have to click on the little chain link if your chosen picture isn't already at a 4:3 aspect ratio), and click ok.

Next, right click on the image again, go to image->mode->indexed.

This is where you set the color palette.   You want the GIMP to "Generate optimal palette" of 256 colors, and I chose to use "Floyd-Steinberg color dithering (Reduced color bleeding)" but you can play around to figure out what works best for your image. Click ok and you will have a 640x480 256 color bitmap for lilo.  Save this in your work directory as a bitmap.  I chose not to use RLE encoding, but it should work.  Next you have to set up a data file to tell lilo where the box of selections will go, what colors, how many columns there are, where to place a timer, etc.  There are example files in the directory mentioned above.  I personally used the background picture from "gentoo emergence 2" for gdm, and placed the selection box in the middle of the bottom.

```

bitmap=gentoo-emergence.bmp

bmp-table=133p,262p,1,6,327p,6

# bmp-table=[x],[y],[columns],[rows],[spaces between the start of the first row and the start of the second],[spill value per row]

#note that I used p to specify pixel positioning instead of character/row positioning

bmp-colors=0,,;8,,

#bmp-colors=[fg],[bg],[shadow color];[highlighted foreground],[highlighted background],[highlighted shadow color]

bmp-timer=5,19,0,14,

#bmp-timer=[x],[y];[foreground],[background],[shadow color]

#Note, if you use a transparent timer background, things will not look right.

```

Once you have created your filename.dat, and specified the bmp in that, you must run 

```
lilo -E filename.dat

#make sure that you have filename.bmp in the same directory
```

The above command adds the colors and timer information directly to the bitmap, so you only have to copy the bitmap to /boot after this and 

edit your lilo.conf.

It's worth noting, that if you  use pixel addresses instead of character addresses for any of the above lines, lilo does not place the corners at exactly that pixel location, but the nearest col/row to that location.

```

install=/boot/boot-bmp.b

# ^^this may be previously set to boot.b or boot-menu.b

bitmap=/boot/gentoo-emergence.bmp

```

Oddly enough, I just realized I do not have a boot-bmp.b, but it still works for me.

Now you just have to run lilo to install the bitmap, and reboot to enjoy your new graphical boot menu.

Once again, please let me know if I got anything wrong, or I'm unclear about anything, and I'll edit the original post.

Hopefully this is a little cleaner and more informative/

----------

## Awox

I like LILO.

I don't need some excessive bootloader to recover my system, I know how to spell /boot/conf/kernels/2.6.5-gentoo and hit lilo.. what's so hard about that? sheesh.

You grub guys annoy me!

"Why is GRUB better than LILO?"

"BECAUSE IT HAS RECOVERY CONSOLE!%#%^!"

LiveCDs are better for this purpose, atleast you can listen to music while you are thinking about what has gone wrong.

----------

## vdboor

Tip: for some cool lilo splash images look in 

/usr/doc/lilo-22.5.8-r1/samples/

I have the "Linux Inside" logo at the moment  :Smile:  imho it's the best logo out there.

The version of lilo may differ off course, but this is the stable version atm.

Slightly off topic, but this allows you to boot from a floppy with lilo:

```
other    = /dev/fd0

  label  = Floppy-Disk

  master-boot

  unsafe
```

Now I don't need the floppy drive in my boot sequence...  :Wink: 

----------

## NewBlackDak

How do you add the option to boot from cdrom?

This is something I've always wanted, but never looked into.  That would also be nice not to have to go change the BIOS every time I want to boot Knoppix or a liveCD.

----------

## vdboor

 *NewBlackDak wrote:*   

> How do you add the option to boot from cdrom?
> 
> This is something I've always wanted, but never looked into.  That would also be nice not to have to go change the BIOS every time I want to boot Knoppix or a liveCD.

 

I'm affraid you need to look for grub about this... I thought they supported this feature. However, if it is possible in lilo I would love to know this myself too..

----------

## nevynxxx

I have never done this but I would just follow the tip for booting from floppy, but replace fd0 with whatever your cd is at. My ide cdrom is at /dev/hdc. This can be found by running ls -l on whatever your cdrom device node is. Mine in a pure udev system i /dev/cdroms/cdrom0. Afterall the cd has to show up as a block device in the same way as a hard drive, it uses the same interface at a basic level.

----------

## TazG

 *charlieg wrote:*   

> Must link to COOLEST EVER SPLASH SCREEN... done... thanks.

 

I must have this.

But, it says the message file is too big. The site says I need SuSE's patch. How do I get this in Gentoo?

----------

## gentoo_dude

I tried adding the line in the lilo.conf file

```
install=/boot/boot-bmp.b
```

 and after that I added the penguins.boot image, and I didn't get the error anymore about have the image too big.

----------

## Manthis

 *TazG wrote:*   

>  *charlieg wrote:*   Must link to COOLEST EVER SPLASH SCREEN... done... thanks. 
> 
> I must have this.
> 
> But, it says the message file is too big. The site says I need SuSE's patch. How do I get this in Gentoo?

 

You have to install the modified SUSE lilo program. It's written on the website...

----------

## _mikec_

i did all the steps above but i'm having this error:

```
Fatal: Unsupported bitmap
```

the image i use is http://www.gamers.org/~quinet/lilo/xray-blue.pcx and i converted it to BMP with The Gimp without RLE.

note: upon running lilo -E xray-blue.bmp, i just typed W for write, then Y, Y and thats it, then i moved the picture to /boot, did the appropriate changes in /etc/lilo.conf and ran /sbin/lilo ...the error shows up. As stated in lilo.conf i dont need to boot-{text,menu,bmp}.b anymore as they are linked into the lilo binary.

i have lilo 22.6.1-r1

Type: Windows Bitmap

Compression: None

Bit Depth: 8bpp

Dimensions: 800x693 pixels

----------

## Noyan

 *Awox wrote:*   

> I like LILO.
> 
> I don't need some excessive bootloader to recover my system, I know how to spell /boot/conf/kernels/2.6.5-gentoo and hit lilo.. what's so hard about that? sheesh.
> 
> You grub guys annoy me!
> ...

 

im with u  : )

----------

## araemo

 *_mikec_ wrote:*   

> i did all the steps above but i'm having this error:
> 
> ```
> Fatal: Unsupported bitmap
> ```
> ...

 

Ok, sorry for the delay, if you haven't gotten it figued out, try A: fixing that image to fit inside 800x600, and resizing it.  B: Creating a xray-blue.dat file, and running lilo -E xray-blue.dat.  And make sure you set the boot-bmp in the lilo.conf.  The file doesn't exist, but the line in the config file seems to change lilo's behavoir.

----------

## comprookie2000

I just got a laptop and it would not boot from grub but just loves  lilo. here is my lilo -v;

```
LILO version 22.7, Copyright (C) 1992-1998 Werner Almesberger

Development beyond version 21 Copyright (C) 1999-2005 John Coffman

Released 12-Apr-2005 and compiled at 12:49:16 on Oct  8 2005

Reading boot sector from /dev/hda

Warning: Kernel & BIOS return differing head/sector geometries for device 0x80

    Kernel: 38760 cylinders, 16 heads, 63 sectors

      BIOS: 1024 cylinders, 255 heads, 63 sectors

Using BITMAP secondary loader

Calling map_insert_data

Mapping bitmap file /boot/black_2.bmp

Calling map_insert_file

Boot image: /boot/vmlinuz -> vmlinuz-2.6.13-gentoo-r3

Added gentoo

Boot image: /boot/vmlinuz -> vmlinuz-2.6.13-gentoo-r3

Mapping RAM disk /boot/fbsplash-livecd-2005.1-1024x768

Added Splash *

Writing boot sector.

/boot/boot.0300 exists - no boot sector backup copy made.

```

 So I was looking around for some info on lilo boot screen and framebuffer splash. I followed this guide for lilo plus the doc's;

http://www.13thfloor.at/old/Software/lilo-splash/

Then for the framebuffer splash 10.3 gensplash;

https://forums.gentoo.org/viewtopic-t-345229.html

Here is cat /etc/lilo.conf

```
boot = /dev/hda

map = /boot/.map

bitmap = /boot/black_2.bmp

bmp-table = 200p,30p:1,26

bmp-timer = 6,2:7,,4

bmp-colors = 6,,0,15,,0

prompt

timeout=50

default=Splash

image=/boot/vmlinuz

   label=gentoo

   read-only            

   root=/dev/hda3

   append="video=vesafb:mtrr,ywrap,1024x768-16@85"

image=/boot/vmlinuz

  label=Splash

  read-only

  root=/dev/hda3

  append="video=vesafb:ywrap,pmipal,1024x768-24@85 splash=verbose,theme:livecd-2005.1"

  initrd=/boot/fbsplash-livecd-2005.1-1024x768
```

May help someone and don't forget to mount boot...

----------

## MagnaDoodle666

I'm surprised no one mentioned this site: http://www.73lab.com/

Click on lilosplash and you have tons of cool lilo splash images. Some wallpapers as well.

----------

