ubuntu dual boot illustrated site ubuntu dual boot windows 7 maverick meerkat
Lilo Page
Edited Friday, June 04 2010  Document made with KompoZer
This web-page is part of a larger site giving examples of how to install Windows+Ubuntu Linux operating systems 'dual boot' in a computer.  Illustrated Dual Boot HomePage

 LiLo is the polite boot loader for Linux,
A few Linux users still prefer to boot with LiLo.
One reason some people might prefer LiLo over GRUB is that when LiLo is 'installed to MBR', it doesn't write to any sectors after the MBR. Only the small 'stage1' code will be installed in the appropriate area in the hard disk's Master Boot Record.
LiLo automatically makes a backup of the previously existing boot sector code in the hard disk's Master Boot Record first, for use in case the owner might want to revert their MBR to point to their original boot loader again.
The main part of a boot loader is called the 'stage2'. Lilo is always installed with the main body of the boot loader in the Ubuntu file system (partition). From there LiLo can present the user with a menu that allows the user to choose which operating system to boot, if there is more than one operating system in the machine.

Pprograms that might include code which can occupy some of the first track of the hard disk and conflict with GNU GRUB include 'Ontrack Disk Manager', and some older versions of Toshiba's' Express Media Player'.
I have also read of fancy keyboard drivers possibly being installed there by some computer manufacturers, but I'm not sure if that's really true or not.
If you do have a computer with special software like that you would probably know about it as you should have been warned about its location by whoever or whatever program installed something there. If you know you have some kind of special software installed to the first track, you should consider choosing to 'install LiLo to MBR' when you install Ubuntu, instead of GRUB.

When LiLo is 'installed to the Linux partition',
For the really paranoid, instead of installing LiLo to MBR, you can even opt only to install LiLO to the boot sector of your Linux partition and not even to MBR.
If you choose to do that then LiLo won't touch your MBR at all. The problem is you'll then need to find some way to boot your Ubuntu partition by chainloading LiLo in the boot sector with some other boot manager. Boot managers you may use include GAG Boot Manager or GRUB. You can even use Windows NTLDR if you know how to configure it, see Matthew J. Miller's HOWTOs: Dual Booting Ubuntu Linux and Windows XP.
For Windows 7 and Vista users there is EasyBCD by NeoSmart Technologies, which you can install in Windows.


Page Index
Installing Lilo during the installation when installing Ubuntu with the 'Alternate' install CD.

Having Two Bootloaders at Once.

Editing /etc/lilo.config.  

Run Liloconfig.

Adding you own customized LiLo Splashimage

Emergency LiLo Boot Disc - mkboot command

Get the Lilo Manual.

Install Lilo with apt-get - from terminal in a running system

Install Lilo with Synaptic Package Manager...(in a running system)

Install Lilo from a Linux Live CD...An emergency method for installing Lilo.
                                               (Even works for an non-bootable Ubuntu installation)

Install Lilo from Breezy Install CD...An emergency method for installing Lilo.
                                               (Even works for an non-bootable Ubuntu installation)

Error messages from  LILO




Installing Lilo during the installation of Ubuntu - with the 'Alternate' install CD
Most people who want to install Lilo would have installed it right from the outset, during the initial installation of their Ubuntu operating system. This can be done easily with the 'Alternate' Ubuntu Install CDs.
There are four examples in this website about how to install Ubuntu with the Ubuntu 'Alternate Installation' CD. See Illustrated Dual Boot HomePage.
Here is a link to another page on this site that shows how that part of the 'Alternate' CD install works..............GO



Having Two Bootloaders at Once
Lilo and Grub can both be happily installed in the same Ubuntu file system and even share the same /boot directory.  That might be handy if you want to have one bootloader in a MBR and the other in a partition. That way you have two bootloaders. If you have trouble with one, you can still boot with the other.
Whichever bootloader is in the first sector of the partition can allow the Linux system to be chainloaded from alternative boot managers in the event of problems with the other bootloader. For example, it is common to lose your ability to boot Ubuntu following a Windows re-install which overwrites GRUB on a dual-boot MBR with Windows boot loader code. It is also possible for users to accidentally lock themselves out of their systems by making certain mistakes in editing Grub's menu.lst file. 
If Lilo is installed, you can still boot Ubuntu by using another boot manager like GAG Boot Manager from a floppy disk or CD-ROM. For more on GAG Boot Manager, visit my GAG Page.
Having Lilo installed means you always have an auxiliary method for booting your system. It's free except for the small amount of your time taken to install it, and does no harm. It can sit idle for months and you would forget it's even there...until an emergency when you need it!
These days we have Super Grub Disk, but I used Lilo and GAG for an alternative boot method before Super Grub Disk became so well known.




Editing /etc/lilo.config

One thing users will need to know about Lilo is that after editing /etc/lilo.config, we need to run /sbin/lilo to update Lilo.

LiLo is already well documented. These links contain all the information you need to be able to do whatever you want with LiLo,
Links:
LiLo -Delta  -  The Home Page of Lilo at dyndns.org

Project Details for LiLo - Freshmeat.net

31. lilo, initrd, and Booting - Rute Linux User's Guide and Exposition - by Paul Sheer

LILO mini-HOWTO - by Miroslav "Misko" Skoric

There are more good LiLo links in 'Tips For Linux Explorers',
here are a few of those,
The Lilo bootloader
Multiboot Lilo
Password Protect Lilo
Booting in Runlevel 3 ( Trick with Lilo )
Making a boot floppy
Boot/Rescue CD

herman@bookpc:~$ gksudo gedit /etc/lilo.config
In Ubuntu, we need to use 'gksudo' before the command to open our /etc/lilo.config file.

# Generated by liloconfig

# This allows booting from any partition on disks with more than 1024
# cylinders.
lba32

# Specifies the boot device
boot=/dev/sda2

# Specifies the device that should be mounted as root.
# If the special name CURRENT is used, the root device is set to the
# device on which the root file system is currently mounted. If the root
# has been changed with  -r , the respective device is used. If the
# variable ROOT is omitted, the root device setting contained in the
# kernel image is used. It can be changed with the rdev program.
root=/dev/sda2

# Bitmap configuration for /boot/coffee.bmp
bitmap=/boot/coffee.bmp
bmp-colors=12,,11,15,,8
bmp-table=385p,100p,1,10
bmp-timer=38,2,13,1

# Enables map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the map
# smaller. Using COMPACT is especially recommended when booting from a
# floppy disk.
# compact

# Install the specified file as the new boot sector.
# LILO supports built in boot sectory, you only need
# to specify the type, choose one from 'text', 'menu' or 'bitmap'.
# new: install=bmp      old: install=/boot/boot-bmp.b
# new: install=text     old: install=/boot/boot-text.b
# new: install=menu     old: install=/boot/boot-menu.b or boot.b
# default: 'menu' is default, unless you have a bitmap= line
# Note: install=bmp must be used to see the bitmap menu.
# install=menu
install=bmp

# Specifies the number of _tenths_ of a second LILO should
# wait before booting the first image.  LILO
# doesn't wait if DELAY is omitted or if DELAY is set to zero.
# delay=20

# Prompt to use certain image. If prompt is specified without timeout,
# boot will not take place unless you hit RETURN
prompt
timeout=50

# Specifies the location of the map file. If MAP is
# omitted, a file /boot/map is used.
map=/boot/map

# Specifies the VGA text mode that should be selected when
# booting. The following values are recognized (case is ignored):
#   NORMAL  select normal 80x25 text mode.
#   EXTENDED  select 80x50 text mode. The word EXTENDED can be
#     abbreviated to EXT.
#   ASK  stop and ask for user input (at boot time).
#   <number>  use the corresponding text mode. A list of available modes
#     can be obtained by booting with  vga=ask  and pressing [Enter].
vga=normal

# Defines non-standard parameters for the specified disk.
#disk=/dev/sda
#    bios=0x80

# If you are using removable USB drivers (with mass-storage)
# you will need to tell LILO to not use these devices even
# if defined in /etc/fstab and referenced in /proc/partitions.
# Adjust these lines to your devices:
#
# disk=/dev/sda inaccessible
# disk=/dev/sdb inaccessible

# These images were automagically added. You may need to edit something.

image=/boot/vmlinuz-2.6.20-15-generic
    label="Lin 2.6.20img0"
    initrd=/boot/initrd.img-2.6.20-15-generic
    read-only

image=/boot/vmlinuz-2.6.20-16-generic
    label="Lin 2.6.20img1"
    initrd=/boot/initrd.img-2.6.20-16-generic
    read-only

image=/boot/memtest86+.bin
    label="Memory Test+"
    read-only

# If you have another OS on this machine (say DOS),
# you can boot if by uncommenting the following lines
# (Of course, change /dev/hda2 to wherever your DOS partition is.)
# other=/dev/hda2
#   label="MS Windows"

This is what my /etc/liloconfig file looks like.



Running Liloconfig

In Ubuntu we can get away without doing this for some time, because our old kernels don't get deleted right away. We keep them around for a time first. But who wants to be booting old out of date kernels when there are newer, better ones there? Someday the older kernels will be deleted, and you will be left with an operating system that won't boot if you don't bring your Lilo up to date now and again.

To run liloconfig, all you need to do, is type 'sudo liloconfig' after your terminal prompt and press 'enter'.
code:
herman@bookpc:~$ sudo liloconfig

Package Configuration


LILO configuration

 WARNING!

Your /etc/fstab configuration file gives UUID=2d58733e-b9be-4c9e-a6a1-c0a30f783341 as the root filesystem device. This doesn't look to me like an "ordinary" block device. Either your fstab is broken and you should fix it, or you are using hardware (such as a RAID array) which this simple configuration program does not handle.

You should either repair the situation or hand-roll your own /etc/lilo.conf configuration file; you can then run /usr/sbin/liloconfig again to retry the configuration process. Documentation for LILO can be found in /usr/share/doc/lilo/.

                                                                         <Ok>



fig1lilo
The liloconfig program is complaining here because it has not yet been updated to handle the recent improvements developers have made in our Ubuntu /etc/fstab files. The Liloconfig program doesn't recognize our filesystem (partition) UUID numbers in our Ubuntu /etc/fstab. More details about filesystem UUID numbers can be found in my Filesystems and Mounting Page, here is the link, /etc/fstab files with UUID filesystem ID.

We will work around this for now by editing our /etc/fstab files in the old style until Lilo is installed.

herman@bookpc:~$ sudo cp /etc/fstab /etc/fstab.backup
This is to make a backup of our /etc/fstab file, so we can restore it again easily when we are finished. It's a good thing to have anyway, you never know when it might come in handy at some other time in the future as well.

herman@bookpc:~$ gksudo gedit /etc/fstab
This opens our /etc/fstab file so that we can edit it.

# /etc/fstab: static file system information.
#
# <file system> <mount point>       <type>           <options>                <dump>  <pass>

   proc          /proc               proc             defaults                  0       0

#
/dev/hda2       
UUID=61e29deb-c5c3-4401-8557-81482aedc839  /   ext3    defaults,errors=remount-ro 0       1

# /dev/hda1
UUID=124D-170D   /media/hda1         vfat    defaults,utf8,umask=007,gid=46       0       1

# /dev/hda5
UUID=a08d44f6-d681-4901-a7cc-345fc9fa9eb6 none  swap     sw                       0       0

/dev/cdrom      /media/cdrom0     udf,iso9660         user,noauto                 0       0

/dev/fd0        /media/floppy0      auto             rw,user,noauto               0       0
Before.
To 'hash out' a line in a text file that programs will look at, we simply place a '#' mark before the line. That makes programs in the operating system ignore that line.
As you can see, the old style device names like 'dev/hda2'  that LiLo understands, have been hashed out in our new style /etc/fstab files in favor of file system UUID numbers.



# /etc/fstab: static file system information.
#
# <file system> <mount point>       <type>           <options>                <dump>  <pass>

   proc          /proc               proc             defaults                  0       0

#
UUID=61e29deb-c5c3-4401-8557-81482aedc839 
/dev/hda2           /                ext3    defaults,errors=remount-ro         0       1

#
UUID=124D-170D
/dev/hda1        /media/hda1         vfat    defaults,utf8,umask=007,gid=46      0       1

#
UUID=a08d44f6-d681-4901-a7cc-345fc9fa9eb6
 /dev/hda5        none               swap                 sw                     0       0

/dev/cdrom      /media/cdrom0     udf,iso9660         user,noauto                 0       0

/dev/fd0        /media/floppy0      auto             rw,user,noauto               0       0
After.
See, now the UUID numbers are hashed out (for now), and the fstab line are all edited to the traditional style?  
I had to do a little bit of fancy copying and pasting to get it looking like this, but now the UUID numbers are all behind hash marks and the lines without any hash marks are changed back to the old fashioned style /etc/fstab line style.

This is how I edited mine, you must make up your own mind how to edit yours in a similar fashion.  Save it and exit the text editor.
More information on editing /etc/fstab is in this link, Tuxfiles: How to edit and understand /etc/fstab

Now we are retrying the liloconfig again.
You can expect to be given some information (below) and asked five easy questions.

Package Configuration


LILO configuration
 
 Booting from hard disk.

You must do three things to make the Linux system boot from the hard disk. Install a partition boot record, install a master boot record, and set the partition active. You'll be asked to perform each of these tasks. You may skip any or all of them, and perform them manually later on.

This will result in Linux being booted by default from the hard disk. If your setup is complicated or unusual you should consider writing your own customized /etc/lilo.conf.  To do this you should exit this configuration program and refer to the comprehensive lilo documentation, which can be found in /usr/share/doc/lilo.


                                                                         <Ok>



fig2lilo
All you need to do is press enter to move on to the next screen.

Package Configuration


LILO configuration

 Install a partition boot record to boot Linux from /dev/sda2?
 

                                  <Yes>                                                             <No>



fig3lilo
In this illustration I selected yes, I want to install a partition boot record to boot Ubuntu from /dev/sda2, which is my current Ubuntu partition in this computer.


Package Configuration


LILO configuration

 The following is a list of the available bitmaps

                                                  /boot/sarge.bmp
                                                  /boot/sid.bmp
                                                  /boot/coffee.bmp       
                                                  /boot/debianlilo.bmp
 

                                  <Ok>                                                             <No>



fig5lilo
This question is asking me which bitmap I would prefer for my Lilo splashimage. If you want to see what they look like, go to your /boot directory and open each one and take a peek.

You should be able to easily make your own splashimages for Lilo later on if you want to.
See Adding you own customized LiLo Splashimage in this web page.

For now I chose the coffee cup for mine. (Number 3), and I used my tab key to select 'okay'.

Package Configuration


LILO configuration

 A master boot record is required to run the partition boot record. If you are already using a boot manager, and want to keep it, answer "no" to the following question. If you don't know what a boot manager is or whether you have one, answer "yes".
 

                                   <Yes>                                                          <No>  



fig6lilo
No, I don't want to install Lilo to MBR, at least not on this occasion. I am planning to use either GRUB or a boot manager (GAG) in MBR, to chainload the partition boot record (Lilo).

Most people would have chosen 'yes' here, for Lilo to take over as their main boot manager, (of all the operating systems in the computer), as well as boot loader for the Linux operating system we are working in now. For some people this will be desirable. The choice is yours.

LiLo is a very good boot manager and some people use in in the MBR in preference to GRUB or GAG because it only installs in the MBR and does not touch the rest of the first track of the hard disk.

I selected 'No' this time.

Package Configuration


LILO configuration

 The master boot record will boot the active partition. If you want your system to boot another operating system, such as DOS or Windows, by default, answer "no" to the following question. You may still use your boot manager or the master boot record to boot Linux. If you want the system to boot Linux by default, answer "yes". In this case you could still boot some other OS if you know what partition it is on.

Make /dev/sda2 the active partition? 

                                  <Yes>                                                             <No>



fig7lilo
You can make a primary partition active  by setting the boot flag in the partition table, but not a logical partition.
You can also use a partition editor such as GParted -- LiveCD or Gnome Partition Editor (GParted installed in Ubuntu), do small jobs like that later on at any time you wish.

herman@red:~$ sudo liloconfig
Searching for installed kernels and updating image entries ...
Warning: Partition 2 on /dev/sda is not marked Active.
Warning: Unable to determine video adapter in use in the present system.
Warning: Video adapter does not support VESA BIOS extensions needed for
  display of 256 colors.  Boot loader will fall back to TEXT only operation.
Added Lin_2.6.20img0 *
Added Memory_Test+

OK. If you installed the master boot record, and the partition
boot record, you may boot Linux by holding down the shift key
as the system boots, and then pressing the 2 key
when you see the "1234F:" prompt.

For more information about LILO, see the documentation in
/usr/share/doc/lilo/. For details about the MBR, see also
/usr/share/doc/mbr/.
fig8lilo
When
you get to the end you will be returned to your regular terminal prompt. Type exit to quit the terminal if you are finished with it.

That's it! Now you can boot Ubuntu with Grub in MBR or GAG Boot Manager via Lilo bootloader. Adding Lilo does not interfere with Grub or whatever bootloader you may have installed to MBR.
This gives a great alternative booting method in case something gets deleted or messed up with your other bootloader. It's a lot better to be able to just throw in your GAG CD and re-boot than it is to have to perform a file rescue and then re-install because you have locked yourself out of your operating system somehow.

Note:
You can now use Super Grub Disk to boot your computer with if it becomes accidentally unbootable due to some boot loader problem. Super grub Disk will bypass your MBR without touching it, (unless you want it to).
Super Grub Disk Page........................................................................Super Grub Disk Page



Adding you own customized LiLo Splashimage 

Source: Linux Desktop Hacks by Nicholas Petreley & Jono Bacon pages 16 & 17

Here's my interpretation of the above link,

1. Create or copy an image and open it in GIMP.  
    You can use your own digital art work or a digital photo or any image file.

2. Crop the image until it has a width x height ratio of 4:3
    (Press your Shift + C keys for the crop tool in GIMP)

3. Go: 'Image'-->'Scale Image', and scale (resize) the image to 640 x 480 pixels.

4.  Go 'Image'-->'Mode'-->'Indexed', and check the 255 colors are enabled and click 'Okay'.

5. Click 'File'-->'Save As', and give the file any name you want to make up, as long as you type .bmp at the end of it. For example: my_first_lilosplash.bmp

6. Copy the image file to your /boot directory.
herman@bookpc:~$ sudo cp my_first_lilosplash.bmp /boot

7. Edit /etc/lilo.config, adding the name and file path for the new splashimage file
herman@bookpc:~$ gksudo gedit /etc/lilo.config

That should open your /etc/lilo.config file, so you can edit it.

Find this part of your lilo.config file,
# Bitmap configuration for /boot/coffee.bmp
bitmap=/boot/coffee.bmp
bmp-colors=12,,11,15,,8
bmp-table=385p,100p,1,10
bmp-timer=38,2,13,1

Delete the entry for the old LiLosplash

Replace it with the entry for your own
# Bitmap configuration for /boot/coffee.bmp
bitmap=/boot/
my_first_lilosplash.bmp
bmp-colors=12,,11,15,,8
bmp-table=385p,100p,1,10
bmp-timer=38,2,13,1

Save the changes.

8. Take a look at the book's instructions on pages 15 and 16, Linux Desktop Hacks
 about how to set up the font color, position and shading.
If you can set your font colors well it makes a huge difference to the way your splashimage will look, and it is well worth the time it might take.

Save and close the file.

9. Run lilo -v
herman@bookpc:~$ sudo lilo -v

10. Reboot and see how it looks.




LiLo Emergency Boot Disc
mkboot - /usr/sbin/mkboot - script to make an LiLo Emergency Boot Floppy Disc

There is a script in /usr/sbin called 'mkboot', which looks like it will make an emergency boot floppy disc with LiLo in it. I haven't tried that out yet.



Get the Lilo Manual - from /usr/share/doc/lilo/

code:
herman@red:~$ cp /usr/share/doc/lilo/Manual.txt.gz  /home/herman
This will copy the Lilo Manual from inside your filesystem to your /home/username directory. Please replace my username, herman, with your own username, unless of course your name is Herman too.

herman@red:~$ gunzip Manual.txt.gz
This command is to ungzip (uncompress) the manual so you can open it with a text editor.
Go look for a text file in your /home/username folder called Manual.txt and open it.
The LiLo Manual is quite interesting, at least I think so. 



Install Lilo from terminal

This is a method that most people would normally use for installing LiLo under normal circumstances if your operating system is already installed. We can use this method when your Linux Operating System is already up and running okay. Maybe we installed Grub to MBR during installation and now we want to add Lilo as well, installed in the partition's first sector. Or the other way around, we could install Lilo to MBR, overwriting grub's stage1 code. Later I'll show a couple of methods that can even be applied to an unbootable system.

Code:
herman@bookpc:~$ ls /boot
abi-2.6.17-10-generic     initrd.img-2.6.17-10-generic  Ubuntusplash.xpm.gz
abi-2.6.17-11-generic     initrd.img-2.6.17-11-generic  vmlinuz-2.6.17-10-generic
config-2.6.17-10-generic  memtest86+.bin                vmlinuz-2.6.17-11-generic
config-2.6.17-11-generic  System.map-2.6.17-10-generic
grub                      System.map-2.6.17-11-generic
This is just to show you what I had in my /boot directory before I started. There are no Lilo files here at all.

To begin installing Lilo, all I did was type 'sudo apt-get install lilo',
code:
herman@bookpc:~$ sudo apt-get install lilo
into a terminal and press 'enter', then type my password when asked.

herman@bookpc:~$ sudo apt-get install lilo
Password:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  lilo-doc mbr
The following NEW packages will be installed:
  lilo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/343kB of archives.
After unpacking 1098kB of additional disk space will be used.
Media change: please insert the disc labeled
 'Ubuntu 6.10 _Edgy Eft_ - Release i386 (20061025.1)'
in the drive '/cdrom/' and press enter

I had to put my CD in the drive and press 'enter', like the sign says.

Be sure to remember to remove the CD later. One time I got an urgent phone call and had to go to work in the middle of doing something like this and I left the CD in the drive. Someone else who didn't know what I had been doing came home and rebooted the computer and wiped the entire hard drive with the 'Alternate' CD installer.

Or, go to this website's Post-install Page and see how to hash out the line in /etc/apt/sources.list to prevent it asking for the CD at all from now on, Enable Standard Repositories.  That way you will be installing software from the internet only.

 working...
Ubuntu Configuration


Configuring lilo

 LILO configuration

 It seems to be your first LILO installation. It is absolutely necessary to run liloconfig(8) when you complete this process and execute /sbin/lilo after this.

LILO won't work until you do this.

<Ok>



 fig2 Lilo
Just press your 'enter' key and this will go away. It is just to let you know that you have to run liloconfig to enable Lilo to be usable. The way to do that is the very next subject I'll cover, right under here.

Preconfiguring packages ...
Selecting previously deselected package lilo.
(Reading database ... 128285 files and directories currently installed.)
Unpacking lilo (from .../lilo_22.6.1-7ubuntu2_i386.deb) ...
Setting up lilo (22.6.1-7ubuntu2) ...
This is just to show you the rest of the text you'll see in the terminal after the blue and grey sign goes away.

herman@bookpc:~$ ls /boot
abi-2.6.17-10-generic         initrd.img-2.6.17-11-generic
abi-2.6.17-11-generic         memtest86+.bin
coffee.bmp                    sarge.bmp
config-2.6.17-10-generic      sid.bmp
config-2.6.17-11-generic      System.map-2.6.17-10-generic
debian.bmp                    System.map-2.6.17-11-generic
debianlilo.bmp                Ubuntusplash.xpm.gz
grub                          vmlinuz-2.6.17-10-generic
initrd.img-2.6.17-10-generic  vmlinuz-2.6.17-11-generic
herman@rocky:~$
This is my /boot directory now. As you can see there are now some Lilo files in it, where there weren't any before I started.

Next we'll need to run liloconfig.





Install Lilo by Using Synaptic Package Manager

This is another method that most people would normally use for installing LiLo under normal circumstances if your operating system is already installed and you can boot it. You can do this in any running Ubuntu operating system, even if you already have another boot loader already, like GRUB or GAG Boot Manager. A new directory called LiLo will be made in your /boot directory beside your GRUB or GAG directory and you can use whichever boot loader you decide to install to MBR (first sector of the first hard disk), or to the boot sector (first sector of the operating system's partition).

fig1lilo

"LInux LOader - The classic OS loader can load Linux and others.
This package contains Lilo (the installer) and boot-record-images to
install Linux, OS/2, DOS and generic Boot Sectors OSes.

You can use LILO to manage your master boot record (with a simple text screen,
text menu or colorful splash graphics) or call LILO from other Boot-Loaders to
jump-start the Linux kernel."


fig2lilo
Configuring lilo
lilo configuration
It seems to be your first LILO installation. It is absolutely necessary to run liloconfig (8)
when you complete this process and execute /sbin/lilo after this.

LILO won't work if you don't do this.
                                                     X Cancel   < Back   > Forward
Clicking forward allows the Synaptic Package Manager to install the software.

fig3lilo
Watch while the reciprocating bar bounces from left to right a few times. Try not to get hypnotized.

fig4lilo
You will know Lilo has been installed, to check, look in the /boot directory.
It has been populated with five new files.
                              coffee.bmp
                              debian.bmp
                              debianlilo.bmp
                              sarge.bmp
                              sid.bmp

After installing LiLo, you may need to run lilo config before LiLo will work, see Run Liloconfig.





Install Lilo from a Linux LiveCD
This method is an emergency method for installing Lilo, even when your Linux system is unbootable due to some other problem with your other bootloader. It should work even if there is no boot loader at all installed in the operating system.
Under normal circumstances it should be easier to install LiLo with apt-get or Synaptic Package Manager.
This procedure is only necessary if LiLo is not present in your operating system at all.

This is yet another method for installing Lilo. This method can be done to an non-bootable system to try to make it bootable again.


1) Set the boot flag to the Ubuntu partition.  
You can use any partition editor you like to change the boot flag.  Gnome Partition Editor in your Ubuntu Live CD is one of the best, just go System'-->'Administration'-->'Gnome Partition Editor'.
Right-click on the partition you want to set the boot flag in and click 'Manage Flags', click on the checkbox for 'boot', and close the dialog box.

2) Mount your Ubuntu File System
You can use just go 'Places'-->'Removeable Media', and click on the icon representing your desired partition for mounting now in all modern versions of Ubuntu.

 Check to see what the name of the mount point for your Ubuntu file system is in /media,
ls /media

From now on, please replace the word 'mountpoint' with whatever the actual name of your own mount point is.

TIP:  If you took the time to set a user freindly file system label, you'll have a user friendly name for your mount point. See How To Set File System Labels With GParted - recommended.

For LVM encrytped installations, your mount point may be arbitrarily called: luksvolume



3) Remove UUID file system code from  /etc/fstab.
Because the last time I checked, LiLo couldn't work with file system UUID numbers.

(i) first, make a backup of the /etc/fstab file,
sudo cp /media/mountpoint/etc/fstab /media/mountpoint/etc/fstab.backup

This is to make a backup of our /etc/fstab file, so we can restore it again easily when we are finished. It's a good thing to have anyway, you never know when it might come in handy at some other time in the future as well.

(ii) Edit your /etc/fstab to remove the
gksudo gedit  /media/mountpoint/etc/fstab
This opens our /etc/fstab file so that we can edit it.

/etc/fstab - before editing
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc            /proc           proc    defaults        0       0


# /dev/sda2
UUID=2d58733e-b9be-4c9e-a6a1-c0a30f783341  /   ext3    defaults,errors=remount-ro  0       1

/dev/sda1
UUID=3D4D-16F1  /media/sda1    vfat    defaults,utf8,umask=007,gid=46 0       1

# /dev/sda2
UUID=320D-180E  /media/sda2     vfat    defaults,utf8,umask=007,gid=46 0       1

# /dev/sda5
UUID=5d65f4b4-b659-460e-8bca-78328c4d6d23    none            swap    sw              0       0

/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
I have highlighted the line I need to change for my system. Everyone's system will be different, so don't be surprised if yours looks a lot different from mine.
If you aren't sure which one is your Ubuntu partition, take a look first with any partition editor. GParted -- LiveCD is my favorite. It may be quicker to type 'sudo fdisk -lu' in a terminal, that's another good way to take a look at your partition table.

/etc/fstab - after editing
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc            /proc           proc    defaults        0       0


# UUID=2d58733e-b9be-4c9e-a6a1-c0a30f783341
/dev/hda2  /               ext3    defaults,errors=remount-ro 0       1

# UUID=3D4D-16F1  /media/sda1
/dev/sda1     vfat    defaults,utf8,umask=007,gid=46 0       1

# UUID=320D-180E  /media/sda2
/dev/sda2     vfat    defaults,utf8,umask=007,gid=46 0       1

# UUID=5d65f4b4-b659-460e-8bca-78328c4d6d23
/dev/sda5    none            swap    sw              0       0

/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

To 'hash out' a line in a text file that programs will look at, we simply place a '#' mark before the line. That makes programs in the operating system ignore that line.
See, how the UUID numbers are all hashed out now?
My /dev/sda2 line is edited to the traditional style.  
I had to do a little bit of fancy copying and pasting to get it looking like this, but now the UUID numbers are all behind hash marks and the lines without any hash marks are changed back to the old fashioned style /etc/fstab line style.

I also found out I had to change 'sda2' to 'hda2', to get everything to work okay for my computer.
(I actually have an IDE hard drive, but modern Ubuntu installs insist on calling it 'sda' regardless. LiLo doesn't seem to like that though).

This is how I edited mine, you must make up your own mind how to edit yours in a similar fashion, but not exactly like mine (unless your partition set-up is identical to mine). Save it and exit the text editor.
More information on editing /etc/fstab is in this link, Tuxfiles: How to edit and understand /etc/fstab

4) chroot into the Ubuntu install and apt-get and install Lilo (must be connected to the internet).

New: chroot method now updated based on the following Ubuntu Web Forums thread: how to chroot, simple and fast, by taavikko

sudo mount -o bind /proc /media/mountpoint/proc

sudo mount -o bind /dev  /media/mountpoint/dev

sudo mount -o bind /dev/pts  /media/mountpoint/dev/pts

sudo mount -o bind /sys  /media/mountpoint/sys

sudo cp /etc/resolv.conf  /media/mountpoint/etc/resolv.conf

sudo chroot  /media/mountpoint /bin/bash


root@ubuntu:/# apt-get install lilo   
Reading package lists . . .  Done
Building dependency tree . . .  Done
Suggested Packages:
   lilo-doc mbr
The following NEW packages will be installed:
   lilo
0 upgraded, 1 newly installed, 0 to remove and 128 not upgraded.
Need to get 343kB of archives.
After unpacking 1098kB of additional disk space will be used.
Get:1 http://au.archive.ubuntu.com dapper/main lilo 1:22.6.1-7ubuntu2 [343kB]
Fetched 343kB in 7s (48.0kB/s)
Preconfiguring packages . . .
Selecting previously deselected package lilo.
(reading database . . .  69523 files and directories currently installed.)
Unpacking lilo (from . . . /lilo_1%3a22.6.1-7ubuntu2_i386.deb) . . .
Setting up lilo (22.6.1-7ubuntu2) . . .lilo -b

root@ubuntu:/# lilo -b /dev/hda
This is to install LiLo's IPL or stage1 to a device, it could be to the Master Boot Record or to the boot sector of a partition.
-b /dev/hda3 means install LiLo to the first sector of partition 3.
-b  /dev/hda means to install LiLo to MBR.

root@ubuntu:/# exit
This exits the chroot to hard disk and returns you to a normal shell in the LiveCD.

sudo umount /media/mountpoint/proc

sudo umount /media/mountpoint/dev/pts

sudo umount /media/mountpoint/dev

sudo umount /media/mountpoint/sys


sudo umount /media/mountpoint
These four commands unmount the file systems we had mounted.

exit
Close the terminal

After installing LiLo, you may need to run lilo config before LiLo will work, see Run Liloconfig.

There is an interactive blog site for this how-to here, Bauer-Power by El Di Pablo. It's great to see people interested in helping others like that, I'm happy someone made a blog about this how-to, thank you El Di Pablo ! :)

If you had trouble getting /media/mountpoint unmounted, just try: sudo umount -a
ubuntu@ubuntu:~$ sudo umount -a

that worked for me.




Install Lilo from Alternate Installation CD

Below is "ye olde methode" for installing Lilo even if your system is unbootable. This used to work with Ubuntu Warty and Hoary 'Alternate Installation' CDs.
This method is an emergency method for installing Lilo, even when your Linux system is unbootable due to some other problem with your other bootloader. It should work even if there is no boot loader at all installed in the operating system .
NOTE: I tried this with a Dapper CD, and I could not get this to work. I have not tested this yet with an Edgy Eft, Fiesty Fawn or Gutsy Gibbon Alternate CD, but it might work.

Note:
You can use Super Grub Disk to boot your computer with if it becomes accidentally unbootable due to some boot loader problem. Super grub Disk will bypass your MBR without touching it, (unless you want it to).
Super Grub Disk Page........................................................................Super Grub Disk Page

INSTALL LILO BOOT LOADER TO UBUNTU PARTITION.....

(So you can boot with GAG boot manager).
GAG boot manager link: http://gag.sourceforge.net/
The GAG bootmanager does not need to disturb your MBR and can be used from a floppy disk or CD-ROM without affecting whatever bootloader you might have installed to MBR.
You can install GAG to your MBR later sometime if you want.
GAG boot manager is 'operating system independent', so you can install and uninstall operating systems without losing your boot.

When you use this method to install Lilo it is not necessary to run Liloconfig (shown above).


1. Boot the computer with the 'Breezy' install CD.

2. Complete the questions for the first stage of the installation as if you were installing, until       '[!!] Partition Disks' is reached.

3. Select 'Manual Partitioning'.

4. Select your Ubuntu partition.

5. (a) change mount point from /media/hda4 (or whatever) to /.
    (b) change 'bootable' off to 'bootable' (a progress bar will display).
    (c) choose 'done setting up the partition'.
    (d) choose 'finish partitioning and write changes to disk.

6. Sign says: 'If you continue, changes will be written to disk, etc,''Continue?'choose 'Yes'.

7. A red warning screen appears, saying 'Not installing to unclean target' choose 'continue'.

8. A second red warning screen says 'Install the base system failed' choose 'continue' again.         (we don't care!).

9. This sees you back in the 'Ubuntu Installer Main Menu', and once there you can scroll down      to 'Install Lilo boot loader to a hard disk'.

10. 'Install Lilo to target' '/dev/hda: new Ubuntu partition' (not your MBR if you are doing this         for GAG). A progress bar should display as Lilo gets installed.

11.A red warning screen appears, saying 'Not installing to unclean target' choose 'continue'.

12. A second red warning screen says 'Install the base system failed' choose 'continue' again.

13. Then you will be back in the 'Ubuntu Installer Main Menu' again, but be careful not to              press 'enter' on anything you don't want,but scroll down immediately to 'Abort Installation'.

14.Exit the installer.

15.Remove the install CD from your CD drive quickly as soon as you can before it boots from it again!

After installing LiLo, you may need to run lilo config before LiLo will work, see Run Liloconfig.

These instructions are almost the same as  vnbuddy2002's famous thread on how to restore GRUB, HOWTO: Restore GRUB (if your MBR is messed up. I have used the same basic idea but for installing LiLo instead of GRUB. 
 


Error messages from  LILO

The information in this section has been copied from the LiLo Manual, so none of this is my work.   I plan to try editing it a little for easier reading and then add some hyperlinks for your convenience.
You will find your own copy of the LiLo manual in your Ubuntu file system if you have LiLo installed, Get the Lilo Manual.

All parts of LILO display some messages that can be used to diagnose problems.

Boot loader messages
The boot loader generates three types of messages:
  • progress and error messages while it is loading,
  • messages indicating disk access errors,
  • and error messages in response to invalid command-line input.
Since messages of the latter type are usually self-explanatory, only the two other categories are explained.


LILO start messages
When LILO loads itself, it displays the word "LILO". Each letter is printed before or after performing some specific action. If LILO fails at some point, the letters printed so far can be used to identify the problem. This is described in more detail in the technical overview.

Note that some hex digits may be inserted after the first "L" if a transient disk problem occurs. Unless LILO stops at that point, generating an endless stream of error codes, such hex digits do not indicate a severe problem.

          (<nothing>)  No part of LILO has been loaded. LILO either isn't installed  or the partition on which its boot sector is located isn't active.

L <error> ...   The first stage boot loader has been loaded and started, but it can't load the second stage boot loader. The two-digit error  codes indicate the type of problem. (See also section "Disk error codes".) This condition usually indicates a media failure or a geometry mismatch (e.g. bad disk parameters, see section "Disk geometry").  

LI   The first stage boot loader was able to load the second stage boot loader, but has failed to execute it. This can either be caused by a geometry mismatch or by moving /boot/boot.b without running the map installer.

LIL   The second stage boot loader has been started, but it can't load the descriptor table from the map file. This is typically caused by a media failure or by a geometry mismatch.

LIL?   The second stage boot loader has been loaded at an incorrect address. This is typically caused by a subtle geometry mismatch or by moving /boot/boot.b without running the map installer.

LIL-   The descriptor table is corrupt. This can either be caused by a geometry mismatch or by moving /boot/map without running the map installer.
 
LILO   All parts of LILO have been successfully loaded.




Map installer warnings and errors
Most messages of the map installer (/sbin/lilo) should be self-explanatory.
Some messages that indicate common errors are listed below.
They are grouped into fatal errors and warnings (non-fatal errors).



Fatal errors

Boot sector of <device_name> doesn't have a boot signature 

Boot sector of <device_name> doesn't have a LILO signature
  
The sector from which LILO should be uninstalled doesn't appear to be a LILO boot sector.

Can't put the boot sector on logical partition <number>   
An attempt has been made to put LILO's boot sector on the current root file system partition which is on a logical partition. This usually doesn't have the desired effect, because common MBRs can only boot primary partitions. This check can be bypassed by explicitly specifying     the boot partition with the  -b  option or by setting the configuration variable BOOT.

Checksum error
The descriptor table of the map file has an invalid checksum. Refresh the map file _immediately_ !

Device 0x<number>: Configured as inaccessible.
There is a DISK section entry indicating that the device is inaccessible from the BIOS. You should check carefully that all files LILO tries to access when booting are on the right device.

Device 0x<number>: Got bad geometry <sec>/<hd>/<cyl>   
The device driver for your SCSI controller does not support geometry detection. You have to specify the geometry explicitly (see section "Disk geometry").

Device 0x<number>: Invalid partition table, entry <number>   
The 3D and linear addresses of the first sector of the specified partition don't correspond. This is typically caused by partitioning a disk with a program that doesn't align partitions to tracks and later using PC/MS-DOS or OS/2 on that disk. LILO can attempt to correct the problem, see "General per-image options".

Device 0x<number>: Partition type 0x<number> does not seem suitable for a LILO boot sector
The location where the LILO boot sector should be placed does not seem to be suitable for that. (See also also section "Disk organization").
You should either adjust the partition type to reflect the actual use or put the boot sector on a different partition. This consistency check only yields a warning (i.e. LILO continues) if the option IGNORE-TABLE is set.

<device_name> is not a valid partition device   
The specified device is either not a device at all, a whole disk, or a partition on a different disk than the one in whose section its entry appears.

<device_name> is not a whole disk device
Only the geometry of whole disks (e.g. /dev/hda, /dev/sdb, etc.) can  be redefined when using DISK sections.

DISKTAB and DISK are mutually exclusive   
You cannot use a disktab file and disk geometry definitions in the configuration file at the same time. Maybe /etc/disktab was accidentally used, because that's the default for backward-compatibility. You should delete /etc/disktab after completing the transition to DISK sections.

Duplicate entry in partition table   
A partition table entry appears twice. The partition table has to be fixed with fdisk.

Duplicate geometry definition for <device_name>   
A disk or partition geometry definition entry for the same device appears twice in the configuration file. Note that you mustn't write a partition section for the whole disk - its start sector is always the first sector of the disk.

First sector of <device> doesn't have a valid boot signature   
The first sector of the specified device does not appear to be a valid boot sector. You might have confused the device name.*

*  Because different partition programs may display the partitions in a different order, it is possible that what you think is your first partition isn't /dev/hda1, etc. A good method to verify the content of a partition is to try to mount it.

geo_comp_addr: Cylinder <number> beyond end of media (<number>)   
A file block appears to be located beyond the last cylinder of the disk. This probably indicates an error in the disk geometry specification (see section "Disk geometry") or a file system  corruption.
 
geo_comp_addr: Cylinder number is too big (<number> > 1023)   
Blocks of a file are located beyond the 1024th cylinder of a hard disk.
LILO can't access such files, because the BIOS limits cylinder numbers to the range 0...1023.
Try moving the file to a different place, preferably a partition that is entirely within the first 1024 cylinders of the disk.

Hole found in map file (<location>)   
The map installer is confused about the disk organization. Please report this error.

<item> doesn't have a valid LILO signature   
The specified item has been located, but is not part of LILO.

<item> has an invalid stage code (<number>)   
 The specified item has probably been corrupted. Try re-building LILO.

<item> is version <number>. Expecting version <number>.   
The specified entity is either too old or too new. Make sure all parts  of LILO (map installer, boot loaders and chain loaders) are from the same distribution. **

**  The expected version number may be different from the version number of the LILO package, because file version numbers are only increased when the file formats change.

Kernel <name> is too big   
The kernel image (without the setup code) is bigger than 512 kbytes (or 448 kbytes, if built with  LARGE_EDBA ). LILO would overwrite itself when trying to load such a kernel.
This limitation only applies to old kernels which are loaded below 0x10000 (e.g. "Image" or "zImage"). Try building the kernel with "bzImage".
If this is undesirable for some reason, try removing some unused drivers and compiling the kernel again. This error may also occur if the kernel image is damaged or if it contains trailing "junk", e.g. as the result of copying an entire boot floppy to the hard disk.

LOCK and FALLBACK are mutually exclusive   
Since LOCK and FALLBACK both change the default command line, they can't be reasonably used together.

Map <path> is not a regular file.   
This is probably the result of an attempt to omit writing a map file, e.g. with  -m /dev/null . The  -t  option should be used to accomplish this.

Must specify SECTORS and HEADS together   
It is assumed that disks with a "strange" number of sectors will also have a "strange" number of heads. Therefore, it's all or nothing.

No geometry variables allowed if INACCESSIBLE   
If a device is configured as INACCESSIBLE (see section "Specifying the geometry"), its DISK section must not contain any geometry variables.

No image <image> is defined   
The command line specified either with the  -R  option or with FALLBACK does not contain the name of a valid image. Note that optional images which have not been included in the map file are not considered as valid.
 
Partition entry not found   
The partition from which an other operating system should be booted isn't listed in the specified partition table. This either means that an incorrect partition table has been specified or that you're trying to boot from a logical partition. The latter usually doesn't work. You can bypass this check by omitting the partition table specification (e.g. omitting the variable TABLE).
 
Single-key clash: "<name>" vs. "<name>"   
The specified image labels or aliases conflict because one of them is a single character and has the SINGLE-KEY option set, and the other name begins with that character.

Sorry, don't know how to handle device <number>   
LILO uses files that are located on a device for which there is no easy way to determine the disk geometry. Such devices have to be explicitly described, see section "Disk geometry".
 
This LILO is compiled READONLY and doesn't support ...   
If LILO is not allowed to write to the disk at boot time (see section "Build-time configuration"), options like LOCK and FALLBACK are unavailable.

This LILO is compiled without REWRITE_TABLE and doesn't support ...   
If LILO is not allowed to rewrite partition tables at boot time (see section "Partition table manipulation"), options like ACTIVATE and SET (in a CHANGE section) are unavailable. You may also get this error if LILO is compiled with  READONLY  enabled.

Timestamp in boot sector of <device> differs from date of <file>   
The backup copy of the boot sector does not appear to be an ancestor of the current boot sector. If you are absolutely sure that the boot sector is indeed correct, you can bypass this check by using  -U  instead of  -u .

Trying to map files from unnamed device 0x<number> (NFS ?)   
This is probably the same problem as described below, only with the root file system residing on NFS.

Trying to map files from your RAM disk.
Please check -r option or ROOT environment variable.  Most likely, you or some installation script is trying to invoke LILO in a way that some of the files is has to access reside on the RAM disk. Normally, the  ROOT  environment variable should be set to the mount point of the effective root device if installing LILO with a different root directory. See also sections "Create or update map" and "Normal first-time installation".

VGA mode presetting is not supported by your kernel.   
Your kernel sources appear to be very old ('93 ?). LILO may work on your system if you remove the VGA option.

 write <item>: <error_reason>   
The disk is probably full or mounted read-only.






Warnings
Messages labeled with "Warning" can be turned off with the NOWARN option.

   FIGETBSZ <file_name>: < error_reason>   
     The map installer is unable to determine the block size of a file
    system. It assumes a block size of two sectors (1kB).
 
   Ignoring entry '<variable_name>'   
     The command-line option corresponding to the specified variable is
    set. Therefore, the configuration file entry is ignored.

   Setting DELAY to 20 (2 seconds)   
     Because accidentally booting the wrong kernel or operating system may
    be very inconvenient on systems that are not run from a local display,
    the minimum delay is two seconds if the SERIAL variable is set.

   (temp) <item>: <error_reason>   
     Deleting a temporary file has failed for the specified reason.

   Warning: BIOS drive 0x<number> may not be accessible   
     Because most BIOS versions only support two floppies and two hard
    disks, files located on additional disks may be inaccessible. This
    warning indicates that some kernels or even the whole system may be
    unbootable.

   Warning: COMPACT may conflict with LINEAR on some systems   
     Please see section "Other problems" for a description of this problem.

   Warning: <config_file> should be owned by root   
     In order to prevent users from compromising system integrity, the
    configuration file should be owned by root and write access for all
    other users should be disabled.

   Warning: <config_file> should be readable only for root if using PASSWORD   
     Users should not be allowed to read the configuration file when using
    the PASSWORD option, because then, it contains unencrypted passwords.
 
   Warning: <config_file> should be writable only for root   
     See " Warning: <config_file> should be owned by root ".

   Warning: device 0x<number> exceeds 1024 cylinder limit   
     A disk or partition exceeds the 1024 cylinder limit imposed by the BIOS.
    This may result in a fatal error in the current installation run
    or in later installation runs.
    See " geo_comp_addr: Cylinder number is too big (<number> > 1023) " for details.

   Warning: <device> is not on the first disk   
     The specified partition is probably not on the first disk. LILO's boot
    sector can only be booted from the first disk unless some special boot
    manager is used.

   WARNING: The system is unbootable !   
     One of the last installation steps has failed. This warning is
    typically followed by a fatal error describing the problem.




Disk error codes
If the BIOS signals an error when LILO is trying to load a boot image, the
respective error code is displayed. The following BIOS error codes are
known:

0x00   "Internal error".
This code is generated by the sector read routine of the LILO boot loader whenever an internal inconsistency is detected. This might be caused by corrupt files. Try re-building the map file. Another possible cause for this error are attempts to access  cylinders beyond 1024 while using the LINEAR option. See section "BIOS restrictions" for more details and for how to solve the problem.

0x01   "Illegal command".
This shouldn't happen, but if it does, it may indicate an attempt to access a disk which is not supported by the BIOS.
See also "Warning: BIOS drive 0x<number> may not be accessible" in section "Warnings".

0x02   "Address mark not found".
This usually indicates a media problem.  Try again several times.

0x03   "Write-protected disk".
This should only occur on write operations.

0x04   "Sector not found".
This typically indicates a geometry mismatch.
If you're booting a raw-written disk image, verify whether it was created for disks with the same geometry as the one you're using.
If you're booting from a SCSI disk or a large IDE disk, you should check whether LILO has obtained correct geometry data from the kernel or whether the geometry definition corresponds to the real disk geometry.
(See section "Disk geometry".) Removing COMPACT may help too. So may  adding LBA32 or LINEAR.

0x06   "Change line active".
This should be a transient error. Try booting a second time.

0x07   "Invalid initialization".
The BIOS failed to properly initialize the disk controller. You should control the BIOS setup parameters. A warm boot might help too.

0x08   "DMA overrun".
This shouldn't happen. Try booting again.
 
0x09   "DMA attempt across 64k boundary".
This shouldn't happen, but may inicate a disk geometry mis-match. Try omitting the COMPACT option. You may need to specify the disk geometry yourself.

0x0C   "Invalid media".
This shouldn't happen and might be caused by a media error. Try booting again.

0x10   "CRC error".
A media error has been detected. Try booting several times, running the map installer a second time (to put the map file at some other physical location or to write "good data" over the bad spot), mapping out the bad sectors/tracks and, if all else fails, replacing the media.

0x11   "ECC correction successful".
A read error occurred, but was corrected. LILO does not recognize this condition and aborts the load process anyway. A second load attempt should succeed.

0x20   "Controller error".
This shouldn't happen.

0x40   "Seek failure".
This might be a media problem. Try booting again.

0x80   "Disk timeout".
The disk or the drive isn't ready. Either the media is bad or the disk isn't spinning. If you're booting from a floppy, you might not have closed the drive door. Otherwise, trying to boot again might help.

0xBB   "BIOS error".
This shouldn't happen. Try booting again. If the problem persists, removing the COMPACT option or adding/removing LINEAR or LBA32 might help.

If the error occurred during a write operation, the error code (two hex digits) is prefixed with a "W".
Although write errors don't affect the boot process, they might indicate a severe problem, because they usually imply that LILO has tried to write to an invalid location.
If spurious write errors occur on a system, it might be a good idea to configure LILO to run read-only (see section "Build-time configuration").

Generally, invalid geometry and attempts to use more than two disks without a very modern BIOS may yield misleading error codes. Please check carefully if /sbin/lilo doesn't emit any warnings. Then try using the LINEAR or LBA32 option (see section "Global options").



Other problems

This section contains a collection of less common problems that have been
observed. See also section "Installation of other operating systems" for
general remarks on using LILO with other operating systems. Some of the
problems are obscure and so are the work-arounds.

  - If LILO doesn't go away even if you erase its files, format your Linux
    partition, etc., you've probably installed LILO as your MBR and you've
    forgotten to deinstall it before deleting its files. See section "LILO
    de-installation" for what you can do now.

  - For yet unknown reasons, LILO may fail on some systems with AMI BIOS if
    the "Hard Disk Type 47 RAM area" is set to "0:300" instead of "DOS 1K".

  - Some disk controller BIOSes perform disk geometry/address translations
    that are incompatible with the way the device's geometry is seen from
    Linux, i.e. without going through the BIOS. Particularly, large IDE
    disks and some PCI SCSI controllers appear to have this problem. In
    such cases, either the translated geometry has to be specified in a
    DISK section or the sector address translation can be deferred by using
    the LINEAR option. In a setup where floppies are not normally used for
    booting, the LINEAR approach should be preferred, because this avoids
    the risk of specifying incorrect numbers.

  - OS/2 is said to be bootable from a logical partition with LILO acting
    as the primary boot selector if LILO is installed on the MBR, the OS/2
    BootManager is on an active primary partition and LILO boots
    BootManager. Putting LILO on an extended partition instead is said to
    crash the OS/2 FDISK in this scenario.

     Note that booting LILO from BootManager (so BootManager is the primary
    selector) or booting OS/2 directly from a primary partition (without
    BootManager) should generally work. See also section "Installation of
    other operating systems".

  - Windows NT is reported to be bootable with LILO when LILO acts as the
    MBR and the Windows NT boot loader is on the DOS partition. However,
    NT's disk manager complains about LILO's MBR when trying to edit the
    partition table.

  - Some PC UNIX systems (SCO and Unixware have been reported to exhibit
    this problem) depend on their partition being active. See section
    "Partition table manipulation" for how this can be accomplished.

  - Future Domain TMC-1680 adapters with the BIOS versions 3.4 and 3.5
    assign BIOS device numbers in the wrong order, e.g. on a two-disk
    system, /dev/sda becomes  0x81  and /dev/sdb becomes  0x80 . This can
    be fixed with the following DISK section:
     disk=/dev/sda bios=0x81 disk=/dev/sdb bios=0x80
     Note that this is only valid for a two-disk system. In three-disk
    systems, /dev/sdc would become  0x80 , etc. Also, single-disk systems
    don't have this problem (and the "fix" would break them).

  - Some BIOSes don't properly recognize disks with an unusual partition
    table (e.g. without any partition marked active) and refuse to boot
    from them. This can also affect the second hard disk and the problem
    may only occur if the system is booted in a particular way (e.g. only
    after a cold boot).

  - On some systems, using LINEAR and COMPACT or LBA32 and COMPACT together
    leads to a boot failure. The exact circumstances under which this
    happens are still unknown.

  - If the kernel crashes after booting on a multi-processor system, LILO
    may have overwritten data structures set up by the BIOS. Try the option 
    LARGE_EBDA  in this case.