[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LILO fails



Hi,

> I half-remember having read sometime that the letters in LILO printed at start-up show up after
> certain stages have been completed, but can?t seem to find it again.
> 

I pulled out hunks of the lilo manual for you.  It looks like you need to tweak
/etc/lilo.conf as described below and re-run.  You can boot off the install CD,
mount the already initialized filesystem, then execute a shell and 'chroot
/target'.  Then you can edit /etc/lilo.conf and hopefully get something that
works.

from /usr/share/doc/lilo/Manual.txt.gz :

  . . .

LILO start message
- - - - - - - - -

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.

   . . . 

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

   . . . 

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: 

   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.


   . . .  (scrolling back to section Disk geometry)

Disk geometry
-------------
    
For floppies and most hard disks, LILO can obtain the disk geometry
information from the kernel. Unfortunately, there are some exotic disks or
adapters which may either not supply this information or which may even 
return incorrect information.
    
If no geometry information is available, LILO reports either the error
  geo_query_dev HDIO_GETGEO (dev 0x<number>)  
 or 
  Device 0x<number>: Got bad geometry <sec>/<hd>/<cyl> 
    
If incorrect information is returned, booting may fail in several ways, 
typically with a partial "LILO" banner message. In this document, that is
called a "geometry mismatch".
    
The next step should be to attempt setting the LBA32 or LINEAR 
configuration variable or the  -L  or  -l  command-line option. If this
doesn't help, the entire disk geometry has to be specified explicitly. Note
that LINEAR doesn't always work with floppy disks.
    
Another common use of disk sections is if an (E)IDE and a SCSI drive are
used in the same system and the BIOS is configured to use the SCSI drive as
the first drive. (Normally, the (E)IDE drive would be the first drive and
the SCSI drive would be the second one.) Since LILO doesn't know how the
BIOS is configured, it needs to be told explicitly about this arrangement.
(See the second example below.)


Obtaining the geometry
- - - - - - - - - - -

The disk geometry parameters can be obtained by booting MS-DOS and running
the program DPARAM.COM with the hexadecimal BIOS code of the drive as its
argument, e.g. dparam 0x80 for the first hard disk. It displays the number
of sectors per track, the number of heads per cylinder and the number of
cylinders. All three numbers are one-based.

Alternatively, the geometry may also be determined by reading the
information presented by the "setup" section of the ROM-BIOS or by using
certain disk utilities under operating systems accessing the disk through
the BIOS.


Specifying the geometry
- - - - - - - - - - - -

Disk geometry parameters are specified in the options section of the
configuration file. Each disk parameter section begins with
DISK=<disk_device>, similar to the way how boot images are specified. It is
suggested to group disk parameter sections together, preferably at the
beginning or the end of the options section.

For each disk, the following variables can be specified:

  BIOS=<bios_device_code>  Is the number the BIOS uses to refer to that
    device. Normally, it's  0x80  for the first hard disk and  0x81  for
    the second hard disk. Note that hexadecimal numbers have to begin with
    "0x". If BIOS is omitted, LILO tries to "guess" that number.
  SECTORS=<sectors>  and
  HEADS=<heads>  specify the number of sectors per track and the number of
    heads, i.e. the number of tracks per cylinder. Both parameters have to
    be either specified together or they have to be entirely omitted. If
    omitted, LILO tries to obtain that geometry information from the
    kernel.
  CYLINDERS=<cylinders>  Specifies the number of cylinders. This value is
    only used for sanity checks. If CYLINDERS is omitted, LILO uses the
    information obtained from the kernel if geometry information had to be
    requested in order to determine some other parameter. Otherwise,* it
    just assumes the number of cylinders to be 1024, which is the cylinder
    limit imposed by the BIOS.
  INACCESSIBLE  Marks the device as inaccessible (for the BIOS). This is
    useful if some disks on the system can't be read by the BIOS, although
    LILO "thinks" they can. If one accidentally tries to use files located
    on such disks for booting, the map installer won't notice and the
    system becomes unbootable. The most likely use of INACCESSIBLE is to
    prevent repetition after experiencing such a situation once. No other
    variables may be specified if a device is configured as INACCESSIBLE.

  *  I.e. if the BIOS device code, the number of sectors, the number of
    heads and the partition start are specified. Note that the number of
    cylinders may appear to vary if CYLINDERS is absent and only some of
    the partition starts are specified.

Additionally, partition subsections can be added with
PARTITION=<partition_device>. Each partition section can contain only one
variable:

  START=<partition_offset>  Specifies the zero-based number of the start
    sector of that partition. The whole disk always has a partition offset
    of zero. The partition offset is only necessary when using devices for
    which the kernel does not provide that information, e.g. CD-ROMs.

Examples:

disk = /dev/sda
  bios = 0x80
  sectors = 32
  heads = 64
  cylinders = 632
  partition = /dev/sda1
    start = 2048
  partition = /dev/sda2
    start = 204800
  partition = /dev/sda3
    start = 500000
  partition = /dev/sda4
    start = 900000

disk = /dev/sda
  bios = 0x80
disk = /dev/hda
  bios = 0x81




> My Debian books say nothing on this topic and the other documentation I?ve found seems to concern other things (or am I stupid?).
> 
> Anyone know what docs I should read to solve this problem?
> 

I put the manual here in its entirety, it will be there for the next few months:
http://people.debian.org/~dwhedon/Manual.txt.gz


> Pleez let me know if the information I?ve given so far is insufficient...

/etc/lilo.conf might also shed some clues.

-David



Reply to: