All About LILO

LILO is the acronym for LInux LOade. This is a program that allows the use of two or more operating systems on the same computer. The tool has a series of instructions to manage the boot sector (boot) HD, allowing that if you boot the computer from a partition that is not the first disk.

LILO is configured through instructions existing in the file /etc/lilo.conf. An example of a file lilo.conf is:

# /etc/lilo.conf # LILO configuration file # Start LILO global section append = `sbpcd=0x260, SoundBlaster ether=10,0×300,eth0 ether=9,0×340,eth1″ boot = /dev/hda #compact # faster but won’t work on all the systems. delay = 50 vga = normal # force sane state ramdisk = 0 # paranoia setting # End LILO global setting # Linux bootable partition config begins image = /vmlinuz root =/dev/hda2 label = linux read-only #Non-UMSDOS filesystems should be mounted read-only for checking # Linux bootable partition config ends # DOS bootable partitions begins other = /dev/hdb1 label = DOS loader = /boot/any_d.b table = /dev/hdb # DOS bootable partition config ends

This file is divided into two parts: one for the settings general to load Linux and other operating systems that may be loaded at boot time. In the second part, there are a section for Linux, which is installed in the the second partition of the first disk (/dev/hda2). Also there is a part for the DOS that is installed on the same machine, however, on the second disk.

See the following, how to deal with certain situations in LILO:

1 – How to recover the LILO:

Place the floppy disk boot Linux on your computer and restart. When you see the ‘LILO boot:’ type rescue. Go answering the questions that will appear (type of keyboard, language, etc), and when prompted, insert the supplemental disk in the computer. Will appear the prompt. You are in rescue mode. Now it is necessary to run /sbin/lilo. The less you have created a special partition for the/sbin (recommended) the /sbin directory is on the partition /. The next step is to mount this partition, only there are no devices to do this, then you should create them:

# mknod /dev/hda b 3 0 – to create the device hda.

IF the HD is IDE use hda, if it is SCSI, use sda.

Now to create a device for the partition /:

# mknod /dev/hda2 b 3 2 – / partition 2 – hda2; or # mknod /dev/hda5 b 3 5 – / the partition 5 – hda5, and so on.

With the devices created, now if you can mount them. To do that create a directory:

# mkdir /

Mount the partition / is in /the

# mount /dev/hda2 /

Run LILO (the -r is for specifying the root directory) # /a/sbin/lilo-r /a and just pull out the floppy disk from the device, give Ctrl plus Alt more Del and everything is back to normal.

2 – How to increase the timeout on the LILO:

To increase the timeout on the Lilo (that is, the time in which he must wait for there to be any typing on the part of the user), edit /etc/lilo.conf, which is the file configuration of LILO. Look for the line: timeout=50. This waiting time serves for the user to choose, for HD’s that have different operating systems, which operating system you want to load. When you see the message ‘ LILO boot: ‘ tightenthe TAB key to see the options. This waiting time is measured in decisegundos (10 = 1 second). For example, in the script above the timeout is 50, which means that the system will wait 5 seconds to load the chosen operating system without the intervention user. After editing this file, run LILO: # /sbin/lilo. It may be that in your lilo, you find the word delay. It has similar function to the timeout.

3 – Errors in LILO installation:

The most common error that happens in the installation is when if you create a new partition and define it with the ID “OF the 16-bit” for Windows during the installation. LILO checks if there is an MS-DOS partition, and if there is a system of files installed on that partition, it not if you install, accusing error. To resolve this, partition the HD, install first Windows and then Linux. If this this is not possible, at the time of installation of the LILO, remove the entry “of the” that the program puts or, in the latter case, use the rescue mode to recover the LILO, described above.

4 – How to load Windows in Default mode instead of the Linux:

To change the default operating system to be loaded, it must be edit the file /etc/lilo.conf and change the order of the components, placing the call to the Windows load first than the load of theLinux, as in the example below. Edit # vi /etc/lilo.conf and change to:

# boot=/dev/hda2
# map=/boot/map
# install=/boot/boot.b
# prompt
# timeout=50
# other=/dev/hda1
# label=win
# table=/dev/hda
# image=/boot/vmlinuz-2.0.X-0.6
# label=linux
# root=/dev/hda2
# read-only

Save everything and run the command # /sbin/lilo-v. With this, the file up to date will be written to the boot device. When you reboot the system, it will load Windows as default, instead of Linux.

In Lilos the most current, that come with the latest versions of the distributions just look for the line default and change its value to windows (or the name that your system gives the Windows, which can be win, dos, or other). Would look like this: default = windows. If the default line does not exist, you even you can add it, for example, below the line timeout.

5 – How to remove the LILO:

There are many ways to remove LILO. One of them, it can be done within Linux, by running the command # /sbin/lilo-u. In Windows/DOS you can use the command fdisk with the option notdocumented /mbr. This will rewrite the MBRonly in a primary partition DOS: fdisk /mbr.

Lilo 1