Jonathan's Contribution

Linux Configuration

Gateway's Lilo and Boot Configuration


[Home] [Up] [Prev] [Next]

This whole section is done logged in as root.

Configuring Lilo

References:
  • /usr/doc/lilo*/README
  • BootPrompt-HOWTO,  Ch 10,
  • Ethernet-HOWTO,  Ch 10,
  • LILO mini HowTo,
  • Net-HOWTO,  Ch 6.3
  •  
    Before configuring lilo, lets move some files around.  In moving the files around, we want to ensure that the latest System.map is accessable from /boot, and that the latest and previous bzImage boot images are available in the /boot directory.  Recall that the boot images must be located in the first 1024 hard disk cylinders (even if linear is specified in lilo [1]).
     
    If this is the first time the kernel is being built:
    mv/boot/System.map /boot/System.map.orig
    ln -s /usr/src/linux/System.map /boot/System.map
    cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage
    cp /boot/bzImage /boot/bzImage.orig
     
    If the kernel (any previous version) has been built on this box using this approach.
    mv /boot/bzImage /boot/bzImage.orig
    cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage
     
    I use the following /etc/lilo.conf , which suits the above file locations.
     
    >>>>>>>>>>>>>>/etc/lilo.conf
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    vga=ext         # 50 line mode
    prompt          # Display boot prompt
    single-key      # single key menu options
    timeout=50      # wait 5 seconds before auto running the default kernel
    default=l       # the default image label
    image=/boot/bzImage
            append="ether=12,0x240,eth0 ether=11,0x300,eth1"
            label=l
            root=/dev/hda3
            read-only
    image=/boot/bzImage.orig
            append="ether=12,0x240,eth0 ether=11,0x300,eth1"
            label=o
            root=/dev/hda3
            read-only
    image=/boot/vmlinuz-2.2.15-2.5.0
            label=f
            read-only
            root=/dev/hda3
    <<<<<<<<<<<<<</etc/lilo.conf
    Notes:
    • As the ethercard module(s) are compiled statically into the kernel (not installable modules), we need to tell the kernel that there is more than one ethernet card in the box.  The autoprobing stops after finding the first card.
    • The last entry is for the original kernel that was installed with the first time install of Linux.


    Once lilo.conf is saved, lilo is run to commit the lilo configuration.  On running lilo, the following output should be observed.
     

    ---------------------
    Added l *
    Added o
    Added f
    ---------------------

    Configuring the Appropriate Daemons

    Before we reboot for the first time, lets first ensure the appropriate daemons are configured to run.  One could do this manually, but there are two very good tools for this purpose, I recommend trying both. They are:
    • chkconfig  (text based command line for all run levels)
    • ntsysv (ncurses text screen based only for current run level)


    For this configuration, the following daemons are necessary:

    • keytable
    • crond
    • syslog
    • netfs
    • network
    • random
    • atd
    • named
    • gpm
    • inet
    • linuxconf    (optional)
    • lpd         (optional - recommended if you want to print from this box, locally or remotely)
    • nfs          (optional if you want nfs access from this firewall box)
    • nfslock   (optional nfs file locking capability)
    • identd
    • portmap
    • smb          (optional if you want this windows file and printer sharing from this firewall box)
    • sendmail
    • autofs
    • hylafax  (see hylafax installation)
    • xntpd

    •  
    Do not enable:
    • xfs - we do not want this as a web server
    • anacron
    • apmd - we do not want to advance power manage a firewall
    • arpwatch - clogs the network with unnecessary traffic
    • ipchains - we create our own rc.firewall
    • irda - no need for IR serial comms
    • pcmcia - we do not have any pcmcia slot cards
    • kudzu - we do not want auto probing of hardware
     
    The output of chkconfig --list for gateway provides the following: It is only the level 3 column that is of interest to us here.
    ---------------------------------------
    keytable        0:off   1:off   2:on    3:on    4:on    5:on    6:off
    crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
    syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off
    netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
    network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
    random          0:off   1:on    2:on    3:on    4:on    5:on    6:off
    xfs             0:off   1:off   2:on    3:off   4:on    5:on    6:off
    anacron         0:off   1:off   2:off   3:off   4:off   5:off   6:off
    apmd            0:off   1:off   2:on    3:off   4:on    5:on    6:off
    arpwatch        0:off   1:off   2:off   3:off   4:off   5:off   6:off
    atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
    named           0:off   1:off   2:off   3:on    4:off   5:off   6:off
    gpm             0:off   1:off   2:on    3:on    4:on    5:on    6:off
    inet            0:off   1:off   2:off   3:on    4:on    5:on    6:off
    ipchains        0:off   1:off   2:off   3:off   4:off   5:off   6:off
    irda            0:off   1:off   2:off   3:off   4:off   5:off   6:off
    pcmcia          0:off   1:off   2:on    3:off   4:on    5:on    6:off
    kudzu           0:off   1:off   2:off   3:off   4:on    5:on    6:off
    linuxconf       0:off   1:off   2:on    3:on    4:on    5:on    6:off
    lpd             0:off   1:off   2:on    3:on    4:on    5:on    6:off
    nfs             0:off   1:off   2:off   3:on    4:off   5:off   6:off
    nfslock         0:off   1:off   2:off   3:on    4:off   5:off   6:off
    identd          0:off   1:off   2:off   3:on    4:on    5:on    6:off
    portmap         0:off   1:off   2:off   3:on    4:on    5:on    6:off
    rstatd          0:off   1:off   2:off   3:off   4:off   5:off   6:off
    rusersd         0:off   1:off   2:off   3:off   4:off   5:off   6:off
    rwalld          0:off   1:off   2:off   3:off   4:off   5:off   6:off
    rwhod           0:off   1:off   2:off   3:off   4:off   5:off   6:off
    smb             0:off   1:off   2:off   3:on    4:off   5:off   6:off
    sendmail        0:off   1:off   2:on    3:on    4:on    5:on    6:off
    snmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
    ypbind          0:off   1:off   2:off   3:off   4:off   5:off   6:off
    autofs          0:off   1:off   2:off   3:on    4:on    5:on    6:off
    network.orig    0:off   1:off   2:off   3:off   4:off   5:off   6:off
    hylafax         0:off   1:on    2:on    3:on    4:on    5:on    6:off
    xntpd           0:off   1:off   2:off   3:on    4:off   5:off   6:off
    -----------------------------------------------
     
    As we are only interested in starting Linux in level 3 (text screen). So we need to confirm that this is the case in  /etc/inittab. Look in this file for the string "initdefault", and ensure that it only occurs once in a line that looks exactly like:
     
    id:3:initdefault:
     
    If there is a 5 in the place of the 3, change it to 3.  Read the RedHat Reference Guide section on "The Boot Process, Init, and Shutdown" to find out what is going on here.

    Booting for the first time

    Before booting for the first time make sure you have your bootdisk, the boot install image disk, the rescue image disk, and you are familiar with chapter 7 of the Kernel-HOWTO.  Chances are you won't need them, but if you do need them, you will really need them.  Ensure there is nothing in the CD ROM and Floppy disk drives, and reboot by executing the following command.
     
    shutdown now
     
    Good Luck :-)


    [1]    Linear in /etc/lilo.conf may appear to work when lilo is run, but boot images located beyond 1024 cylinders seldom behave properly - Don't risk it!

    [Home] [Up] [Prev] [Next]

    Last modified: Tue Feb 8 22:00:00 PST 2000
    Copyright © Jonathan Marks, 1999, 2000. All rights reserved.
    http:/jon.novatek.co.nz/linux/config/gateway-boot.html.