LILO bootloader - fix, configure and customize

From Salix OS
Jump to: navigation, search

LILO is the default bootloader for Salix. This page describes how to configure and fix it. It also gives some additional tips.


Fix or configure

To fix a broken LILO bootloader or even to configure it from scratch, the easiest way is to use LiloSetup.

LiloSetup is a GUI utility which enables you to configure a new LILO bootloader from the comfort of a graphical interface. It can be executed both from a LiveCD environment or from a standard system. It supports multiboot, Windows & Linux operating systems, ata and/or libata subsystems, 32 and/or 64 bit architecture, etc.

Since version 13.1, LiloSetup is available on Salix repository & was included on Salix-LXDE-13.1 ISO release as well as Salix-13.1.1 ISO release. So if you are using a 13.1 version & it is not on your system yet, a simple slapt-get or gslapt will install it for you.

Otherwise, if you are still using the 13.0 version, you can easily install it manually by pasting the following command in a root terminal: wget && installpkg lilosetup-0.2.1-noarch-1plb.txz && slapt-get -u && slapt-get -i os-prober

You will then be able to access LiloSetup from the System menu. The usage is simple and a contextual help is available to support you with every step.

Advanced users can easily edit LiloSetup configuration file for extra customization.

How to fix broken LILO

If your bootloader is completely broken so that you cannot even boot into any of your installed OS, then the easiest option is to boot your computer with SalixLive. LiloSetup. which is included in all versions of SalixLive, can then be transparently executed from the live environment.

Another option is to use the Installation CD as described here: Boot into existing installation on hard disk using installation CD


LILO is loading slowly

Sometimes LILO is booting very slowly showing lines of dots on the screen. To fix this just add a line containing "compact" (without quotes) at the top inside the global section of /etc/lilo.conf by editing it through a text editor or LiloSetup; then reinstall LILO.

Chainload another system or bootloader

With the two simple lines below you're able to chainload - which is much like redirection - another bootloader (or system) that is able to continue the boot process by itself:

other = /dev/partition
label = Name

where partition stands for i.e. sda1, sda5, etc.

Most often this is used to boot Windows by chainloading its own native bootloader:

other = /dev/sda1
label = Windows

However it also allows to chainload another LILO or GRUB instance if either was not installed in the MBR but on a separate partition. For example assume Fedora installed its bootloader on partition sda5 and Salix in MBR (sda). In such case we can load Fedora`s bootloader with:

other = /dev/sda5
label = Fedora

Just add these two lines below the global section of /etc/lilo.conf among other entries for Linux.

Custom bitmap for LILO

This is quite easy with GIMP:

  1. Take an image
  2. Scale it to 640x480
  3. Choose Image->Mode->Indexed
  4. Generate optimum palette (255 colors, you may want to experiment with dithering to gain quality)
  5. Save as name.bmp (Windows BMP Image)
  6. enable Run-Length Encoded during saving

Copy the new image to the /boot directory and specify its name in /etc/lilo.conf by finding and modifying the line:

bitmap = /boot/name.bmp

Reinstall LILO. If it complains about the bitmap then one of the steps above must have gone wrong. Here you find an example colored LILO bitmap for Salix

Adding Memtest

Memtest is a useful tool that allows testing memory for errors. It is easy to add it to LILO menu:

  1. Download memtest as Pre-Compiled Bootable Binary (.gzip or .zip)
  2. extract it into /boot directory
  3. rename to memtest to simplify LILO entry
  4. add the two lines as below to /etc/lilo.conf below the global section among other entries for Linux and reinstall LILO

Restrict passing parameters

Passing parameters to the kernel with LILO is not restricted by default, so anybody can type init 1 and boot into single user mode. If you want to protect parameters with a password, add these two lines at the top inside the global section of /etc/lilo.conf :


Your system will boot as usual but it will ask for the password when someone wants to add a parameter to the kernel. Since the password is not hidden make sure lilo.conf is only readable by root:

chmod 600 /etc/lilo.conf

Important: This doesn't prevent a person who really wants to bypass this limitation from doing so. Such a person can still change data (e.g. root password or LILO password) by booting from another media (e.g. Salix LiveCD) unless BIOS booting sequence doesn`t allow it or by attaching the hard drive to another computer if he has physical access to it. (TO CLARIFY HERE: What about the case when partition is encrypted?)