LILO stands for Linux Loader. It is the Linux boot manager that is either written to the Master Boot Record of your hard drive or to the first sector of your hard drive. It is what loads the Linux kernel when your computer boots up or allows you to choose which operating system to load if you have multiple operating systems on your machine. It also allows you to boot different Linux kernel versions if you choose. Default Configuration During the installation of Linux, you are given the option to install LILO as your boot manager. If you choose to install it, the LILO configuration file is usually in the /etc/lilo.conf (the default for RedHat). However, in some distributions, it can be located in the /etc/lilo/config or /boot/lilo.conf. If you can not find your configuration file, try the command locate lilo or whereis lilo to locate your configuration file. See the locate: Find Files and Directories guide if the locate command does not work. A typical configuration file will look like the following: boot=/dev/hda #which hard drive LILO is installed on map=/boot/map #where the LILO map file is located install=/boot/boot.b #boot sector file for MBR prompt #prompt user with LILO menu when computer starts timeout=50 #time computer waits for user to choose an OS to load #before loading default operating system or kernel image=/boot/vmlinuz-2.2.5-15 #which kernel to boot Linux with label=linux #alias name for above kernel root=/dev/hda3 #which partition contains the Linux kernel or alternate OS Leaving the above default configuration will automatically boot Linux when your machine is started. When your machine boots up, it will pause at a LILO: prompt. If you want to see what other operating systems/kernels LILO is configured to load, you can press TAB to view the stanza list. Each kernel/operating system listed in the LILO configuration file is called a stanza. Using the example above, after 50 seconds, Linux will automatically boot using the installed kernel version indicated by the image stanza. If you do not want to wait that long you can either change the timeout value (in seconds) or press enter at the LILO: prompt to start loading Linux. Custom Configuration LILO can also be configured to load other operating systems because chances are you are dual-booting your machine. For example, if you have a Windows-based Operating System on your machine, you can use LILO to alternately boot between Linux and Windows. For example, if you are running another OS off the first partition of the primary hard drive (/dev/hda1) then you can add the below lines to your /etc/lilo.conf file. Note: You must have root access to edit the LILO configuration file. If you are logged in as a regular user and know the root password, you can type the command su. This will prompt you for a password. Enter the root password correctly and you will have root priviledges until you type exit. Typing exit will take you back to regular user mode. other=/dev/hda1 label=msdos table=/dev/hda This would allow you to type in msdos (or whatever you choose to name your label) at the LILO: prompt during boot-up and whatever OS is on /dev/hda1 will be loaded. Thus, your new LILO configuration file would look like below: boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 image=/boot/vmlinuz-2.2.5-15 label=linux root=/dev/hda3 other=/dev/hda1 label=msdos table=/dev/hda After editing the configuration file to include additional operating systems, the lilo command must be run for your changes to take effect. This is done in RedHat 6.x with the command /sbin/lilo. It should be in a similar directory for other Linux distributions. Then, at the LILO: prompt at boot-up, type the "label" of the OS you wish to boot. In the example above, you can either type linux or msdos, respectively. If you do not remember what your choices are, you can press the tab key at the LILO: prompt to print out your choices. Notice: The lilo command must be run everytime you make any changes to the LILO configuration file! Setting the Default OS for LILO To set the default operating system for LILO to load, first move the stanza for the OS/kernel to the front of the list like below: boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 other=/dev/hda1 label=msdos table=/dev/hda image=/boot/vmlinuz-2.2.5-15 label=linux root=/dev/hda3 Then, run the lilo command to allow your changes to take effect. This can be done in RedHat 6.x by typing the command /sbin/lilo. Notice: The lilo command must be run everytime you make any changes to the LILO configuration file! o Also, I believe you can put a line in the lilo.conf just below the timeout line to the effect of default=linux or what ever OS you prefer In other words................................................. 9. After Your First Boot You should now be looking at the login prompt of a new Linux, just booted from your hard drive. Congratulations! 9.1 Beginning System Administratration Depending on how the installation phase went, you may need to create accounts, change your hostname, or (re)configure X at this stage. There are many more things you could set up and configure, including backup devices, SLIP/PPP links to an Internet Service Provider, etc. A good book on UNIX systems administration should help. (I suggest Essential Systems Administration from O'Reilly and Associates.) You will pick these things up as time goes by. You should read various other Linux HOWTOs, such as the NET-3-HOWTO and Printing-HOWTO, for information on other configuration tasks. 9.2 Custom LILO Configuration LILO is a boot loader, which can be used to select either Linux, MS-DOS, or some other operating system at boot time. Chances are your distribution automatically configured LILO for you during the installation phase (unless you're using OS/2, this is what you should have done). If so, you can skip the rest of this section. If you installed LILO as the primary boot loader, it will handle the first-stage booting process for all operating systems on your drive. This works well if MS-DOS is the only other operating system that you have installed. However, you might be running OS/2, which has its own Boot Manager. In this case, you want OS/2's Boot Manager to be the primary boot loader, and use LILO just to boot Linux (as the secondary boot loader). An important gotcha for people using EIDE systems: due to a BIOS limitation, your boot sectors for any OS have to live on one of the first two physical disks. Otherwise LILO will hang after writing "LI", no matter where you run it from. If you have to configure LILO manually, this will involve editing the file /etc/lilo.conf. Below we present an example of a LILO configuration file, where the Linux root partition is on /dev/hda2, and MS-DOS is installed on /dev/hdb1 (on the second hard drive). # Tell LILO to install itself as the primary boot loader on /dev/hda. boot = /dev/hda # The boot image to install; you probably shouldn't change this install = /boot/boot.b # The stanza for booting Linux. image = /vmlinuz # The kernel is in /vmlinuz label = linux # Give it the name "linux" root = /dev/hda2 # Use /dev/hda2 as the root filesystem vga = ask # Prompt for VGA mode append = "aha152x=0x340,11,7,1" # Add this to the boot options, # for detecting the SCSI controller # The stanza for booting MS-DOS other = /dev/hdb1 # This is the MS-DOS partition label = msdos # Give it the name "msdos" table = /dev/hdb # The partition table for the second drive See also grub_loader