   Lilo mini-Howto
  Cameron Spitzer (cls@truffula.sj.ca.us), Alessandro Rubini
  (rubini@linux.it).
  v2.1, 9  1998

          
  LILO.         "
     LILO".       
              .
           .    
    Lilo      ,  
         /usr/doc/lilo*
  ______________________________________________________________________

  Table of Contents


  1. 

  2.     

     2.1       Lilo;
     2.2      IDE   ;
     2.3         ;
     2.4      Lilo;

  3.   

  4.  

  5.   Lilo   BIOS      Root partition

  6.          BIOS

  7.      (Rescue Floppy)

  8.    



  ______________________________________________________________________

  [1m1.  [0m

             
   Lilo (    /usr/doc/lilo )  
  ,    Linux   
          
  /etc/lilo.conf.         ,
         
  :


    To        ``To Linux
       ''.

           Lilo   
       /dev/hdc      /dev/hda.  
            Linux  
                                   .

             Linux 
       root partition      BIOS.

      -     
             ,      
      BIOS   DOS (     ).

            
      (        
         ).



        Cameron Spitzer,
  cls@truffula.sj.ca.us,      .   
         Linux, '   
          .



  [1m2.      [0m

    Lilo   ,     data sectors
        bios.  pathname 
   /etc/lilo.conf  resolved     
  (   [4mlilo[24m).       
        sectors   
  .   ,        partition
        BIOS. ,  
    loader (..,     [4mlilo[24m) 
      .    
         image,   
   Lilo).


  [1m2.1.        Lilo;[0m

    boot =   /etc/lilo.conf   Lilo  
      primary boot loader. ,  
     master boot sector (/dev/hda)   root partition
   Linux   (   /dev/hda1  
  /dev/hda2).

           ,
        Lilo  root partition. 
    ,     partition  "bootable"
  (   "a"  [4mfdisk[24m    "b"  [4mcfdisk[24m.
        master boot sector,     
    Linux   Lilo  .


  [1m2.2.       IDE   ;[0m

       LBA  LARGE  BIOS ( 
    Linux).        
       PC.      
     1024 ,     
    partition       root  (
        ).

            ,  
        BIOS,    
     .      Lilo   
   LBA  LARGE  .

            
      Linux,     
  ,     BIOS    
  .           Linux
          .  
      ,      
   BIOS.


  [1m2.3.          ;[0m

     Lilo prompt,      <Tab> 
         .   Lilo  
     interactive,     <Alt> 
  <Shift>     ``LILO'' .

        Linux,   
            
  .        ,
            .  
   ,      :


    root=:       Linux   mount 
     root   partition     
     lilo.conf.   ,     partition 
          Linux ,  
               root
     partition .

    init=:   1.3.4      Linux 
         -   
         /sbin/init.    
         ,    
         init=/bin/sh (   shell
     prompt      mount   :
       ``/sbin/mount -w -n -o remount /; mount -a'', 
        ``/sbin/umount -a''   
       ).

     :        
        [4minit[24m      run-level
     ( default   3).     [4minit[0m
     ,  /etc/inittab   /etc/rc.d    .


  [1m2.4.       Lilo;[0m

    Lilo     boot sector,    
    /boot/boot.[4mxxyy[24m,  [4mxxyy[24m    
     ,   .   
           partition 
    ``ls -l /dev/[4mdevice[24m''.  ,   sector
   /dev/hda ( 3,  0)    /boot/boot.0300,
    Lilo  /dev/fd0   /boot/boot.0200 
     /dev/sdb3 ( 8,  19)  
  /boot/boot.0813.    Lilo      
    .       
       Lilo ( , 
     ).

        Lilo ( , 
         Linux),  
         boot sector.   Lilo
     /dev/hda,   ``dd if=/boot/boot.0300
  of=/dev/hda bs=446 count=1'' (  ``cat /boot/boot.0300 >
  /dev/hda'',     ,     
    partition table ,       
   ).           
    ``fdisk /mbr''    DOS:   
    Linux   disk      
  .     Lilo,     [4mfdisk[0m
   Linux    , Linux partition  ( [4mfdisk[24m 
  DOS     non-dos partitions).

      Lilo  root partition  (..,
  /dev/hda2),         
    Lilo.     [4mfdisk[24m  Linux  
    Linux partitions   partition table.  , 
     DOS partition  bootable.


  [1m3.    [0m

      Lilo   
     :


  boot = /dev/hda   # or your root partition
  delay = 0         # or specify a delay in tenth of a second
  vga = 0           # optional. Use "vga=1" to get 80x50

  image = /boot/vmlinux  # your zImage file
    root = /dev/hda1     # your root partition
    label = Linux        # or any fancy name
    read-only            # mount root read-only

  other = /dev/hda4   # your dos partition, if any
    table = /dev/hda  # the current partition table
    label = dos       # or any non-fancy name



    ,  ,   ``image'' 
  ``other''.        kernel images
  [4mlilo.conf[24m,        
  .


  [1m4.    hdc      hda[0m

   Lilo     map  image     
       BIOS      . 
  ,        Linux  
       hdc (master   
  controller)      standalong   primary IDE
  controller   .    
     partition,       [4mchroot[24m 
   virtual      hdc   
     .

    [4mlilo.conf[24m       Lilo 
  :


  # This file must be used from a system running from /dev/hdc
  boot = /dev/hdc   # overwrite MBR of hdc
  disk = /dev/hdc   # tell how hdc will look like:
     bios = 0x80    #  the bios will see it as first drive
  delay = 0
  vga = 0

  image = /boot/vmlinux  # root partition is /dev/hdc1
    root = /dev/hda1         # hdc1 at boot will be hda1
    label = Linux
    read-only


           Lilo  
  [1m /dev/hdc1[22m.     Lilo    boot sector
  (/dev/hdc)       vmlinux  
  /boot/boot.b          ,
  ..,    hdc.

       /mnt/etc/lilo.conf.hdc  
   Lilo   ``cd /mnt; chroot . sbin/lilo -C
  /etc/lilo.conf.hdc''   /dev/hdc1   mount   
  /mnt.


  [1m5.    Lilo   BIOS      Root[0m
  [1mpartition[0m

     IDE,    SCSI.  BIOS     
  SCSI  .   Linux Loader,  Lilo,   
  BIOS         BIOS   . 
   AMI BIOS       "A:"   "C:".  root
       partition  SCSI .

        ,   
  (map file),   chain loader   Linux partition   IDE.
             root
  parition .

    parition   IDE   (/dev/hda2,  Linux
  parition       )  mounted
   /u2.     /etc/lilo.conf  .





































  #  Install LILO on the Master Boot Record
  #  on the first IDE.
  #
  boot = /dev/hda
  #  /sbin/lilo (the installer) copies the LILO boot record
  #  from the following file to the MBR location.
  install = /u2/etc/lilo/boot.b
  #
  #  I wrote a verbose boot menu.  LILO finds it here.
  message = /u2/etc/lilo/message
  #  The installer will build the following file. It tells
  #  the boot-loader where the blocks of the kernels are.
  map = /u2/etc/lilo/map
  compact
  prompt
  #  Wait 10 seconds, then boot the 1.2.1 kernel by default.
  timeout = 100
  #  The kernel is stored where BIOS can see it by doing this:
  #      cp -p /usr/src/linux/arch/i386/boot/zImage /u2/z1.2.1
  image = /u2/z1.2.1
          label = 1.2.1
  #  LILO tells the kernel to mount the first SCSI partition
  #  as root.  BIOS does not have to be able to see it.
          root = /dev/sda1
  #  This partition will be checked and remounted by /etc/rc.d/rc.S
          read-only
  #  I kept an old Slackware kernel lying around in case I built a
  #  kernel that doesn't work.  I actually needed this once.
  image = /u2/z1.0.9
          label = 1.0.9
          root = /dev/sda1
          read-only
  #  My DR-DOS 6 partition.
  other = /dev/hda1
          loader=/u2/etc/lilo/chain.b
          label = dos
          alias = m




  [1m6.          [0m
  [1mBIOS[0m

         IDE   1GB. 
  BIOS   ''    504 MB  IDE.  ( MB 
  2**10 bytes,   10**6 bytes).     MS-DOS partition 
  350 MB /dev/hda1   Linux root    partition 120 MB
  /dev/hda2.

   MS-DOS          
   .   Novell DOS 7    .  
  ,  IBM      "OnTrack"     
  .             
   "OnTrack Disk Manager."    MSDOS,   
    .

  '      partition table   fdisk  Linux.
   MSDOS-6.2       /dev/hda1.  
    ``    MS-DOS    .  
       MS-DOS    
          .''
   ,    .

   !    fdisk  Linux    partition 1
    table.    MS-DOS 6.2     
     partition 1      
         .   MS-DOS 6.2  
    Master Boot Record  ,    
  .

      Slackware    (  
     Slackware "setup")    
  Linux    LILO     MBR  MS-DOS.
  .     /etc/lilo.conf  :


  boot = /dev/hda
  map = /lilo-map
  delay = 100
  ramdisk = 0             # Turns off ramdisk in Slackware kernel
  timeout = 100
  prompt
  disk = /dev/hda         # BIOS only sees first 500 MB.
     bios = 0x80          # specifies the first IDE.
     sectors = 63         # get the numbers from your drive's docs.
     heads = 16
     cylinders = 2100
  image = /vmlinuz
    append = "hd=2100,16,63"
    root = /dev/hda2
    label = linux
    read-only
    vga = extended
  other = /dev/hda1
    label = msdos
    table = /dev/hda
    loader = /boot/chain.b



      ,    partition 
    zImage, boot.b, map, chain.b    
       msdos,     
         "stacker" 
  "doublespace".       DOS partition  /dev/hda1
   500 MB.

  ,    "OnTrack"      
  partition table        bytes  
    ,     ,     
  ""    Linux  IDE     
  .         
    Slackware.  ,  IBM   
   "OnTrack".       OnTrack.  
     Linux      BIOS. 
     !


  [1m7.       (Rescue Floppy)[0m

   ,   Windows-95     .
     LILO MBR ,    Linux partitions 
  .          , 
        LILO  ,    
      IDE.

    LILO    :




    fdformat /dev/fd0H1440      #  lay tracks on virgin diskette
    mkfs -t minix /dev/fd0 1440 #  make file system of type minix
    mount /dev/fd0 /mnt         #  mount in the standard tmp mount point
    cp -p /boot/chain.b /mnt    #  copy the chain loader over
    lilo -C /etc/lilo.flop      #  install LILO and the map on the diskette.
    umount /mnt



      [1m    mounted   [0m
  [1minstaller [22m     Lilo    map  
  .

      /etc/lilo.flop.      :


  #  Makes a floppy that can boot kernels from HD.
  boot = /dev/fd0
  map = /mnt/lilo-map
  delay = 100
  ramdisk = 0
  timeout = 100
  prompt
  disk = /dev/hda     # 1 GB IDE, BIOS only sees first 500 MB.
     bios=0x80
     sectors = 63
     heads = 16
     cylinders = 2100
  image = /vmlinuz
    append = "hd=2100,16,63"
    root = /dev/hda2
    label = linux
    read-only
    vga = extended
  other = /dev/hda1
    label = msdos
    table = /dev/hda
    loader = /mnt/chain.b



  ,  MS-DOS 6.2     ,  
        .    SCSI controller
    ,     msdos    
    Linux mkdosfs,   Windows-95    "D:".  
    MSDOS       D:.    
     LILO.      lilo.conf 
   2.


  other = /dev/sda1
    label = d6.2
    table = /dev/sda
    loader = /boot/any_d.b


     ,  MSDOS-6.2     
   C:    Windows-95   D:.


  [1m8.     [0m

   , , ,    
     HOWTO,  email    :
  voulariba@hellug.gr     : evris@hellug.gr 
   : ep@rocketmail.com


































































