View and vote on the article here: Introduction to LILO
Introduction to LILO| Category | | | Summary | | | Body | Introduction: LILO and the Boot Sector
LILO (from "LInux LOader") is a piece of software allowing you to boot a choice of several operating systems by using the Boot-Sector, which is the first sector on either a hard disk, CD-ROM or floppy-disk. The first sector contains the "Master Boot Record" (MBR), which determines the active partition(s) as well as containing information to boot the operating system(s).
This guide will give you a basic understanding of the LILO boot manager, which can be used to boot multiple Linux kernels, as well as "dual-booting" Windows.
Configuration: The /etc/lilo.conf file
To write the required information to the boot-sector (described above), LILO must know which kernel images and on which partition to boot. This information is supplied by a config-file under the /etc directory tree called lilo.conf. The file contains blocks of statements that describe individual boot options. When LILO starts at bootup, it will present you with a list of options, each referring to an individual OS and/or kernel image. You can then choose one of them, and LILO will boot the kernel image or hand its control over to the Windows bootloader (NTLDR).
Example Configuration
The example given here is what we will be working with for the rest of the article, where i will explain all the options that are available.
/etc/lilo.conf
boot = /dev/hda
map = /boot/System.map
prompt
default = linux.2.4
timeout=60 # this line would produce a 1 minute delay
image = /boot/bzImage.2.4
root = /dev/hda5
label = linux.2.4
# read-only # read-only for checking
other = /dev/hda1
label = windoze
password = 123abc # require the user to enter a password when attempting to boot this label
EOF
Main Configuration
The first thing to do in your lilo.conf file is to tell LILO which drive to install the MBR to, plus give it some additional information (system.map). In most cases this will be:
boot = /dev/hda
map = /boot/System.map
However, there are some options we can add to customize the bootloader a bit. To choose a boot-option on startup, add:
prompt
To define a default boot option, add:
default = linux.2.4
To add a timeout (in seconds), use:
timeout=<time in seconds>
Booting a kernel image
To boot a Linux kernel, you simply supply LILO with its name and the partition it is on. To refer to it while booting you may also want to label it with a name, such as:
image = /boot/bzImage.2.4 (change "/boot/bzImage.2.4" to the location of your kernel image)
root = /dev/hda5 (change "/dev/hda5" to the partition that contains the kernel image)
label = linux.2.4 (choose any descriptive label you want)
# read-only # read-only for checking
Booting a Windows Installation
To boot from a partition with Windows, do the following, changing "/dev/hda1" to the name of your Windows partition.
other = /dev/hda1
label = windows
[code]
[b]Password Protection[/b]
To specify a password, add the following to any section of the code that defines a boot option:
[code]
password = mypassword
Installation
To finish the installation of the Linux-Loader, spawn a root-shell and type: LILO
Resources
Since this is just another introduction to the LILO, you might learn more at these sources within the Linux install you are using:
- "man LILO" // in a shell
- "man lilo.conf" // in a shell
- /etc/lilo.conf // The lilo.conf that came with your distribution
Online:
|
|
This article was imported from the CyberArmy University site. (original author: noimnot)
There are no replies to this post yet.
|