www.Tutorialsforu.info

Free Tutorials Cave

  • Increase font size
  • Default font size
  • Decrease font size
Your Ad Here



Linux Loader LILO - Page 2

E-mail Print
Article Index
Linux Loader LILO
Page 2
Page 3
Page 4
All Pages

Configuring LILO




Under Linux, your hard drives are abstracted to device files under the /dev directory. If you have one or more IDE drives, your first hard drive is referred to as /dev/hda, and your second hard drive is /dev/hdb. SCSI drives are referred to as /dev/sda and /dev/sdb. When you installed Linux, you most likely partitioned your hard drive. The first partition on your first drive would be /dev/hda1 or /dev/sda1. Consequently, your second partition would be /dev/hda2

or /dev/sda2, and so on.

Before configuring LILO, you should know which partitions have what operating system on them. You should also know where you want to install LILO. In almost all cases, you will want to put LILO on the MBR. You shouldn’t do this, however, if you run OS/2. OS/2’s boot loader should go on the MBR, and LILO should then be installed on the superblock of the root partition.

Before installing LILO, you should know where your Linux partition is, and if you have other operating systems, you must know where they are located. For example, your Linux partition might be at /dev/hda1, and your Windows 95 partition might be at /dev/hda2. If Linux is the only operating system on your computer or if you have Windows 95 or Windows NT, you will want to install LILO as the MBR of the drive. If you have OS/2 also, you will want to install LILO on the root partition of your hard drive and use OS/2’s boot loader on the MBR.

LILO is normally installed after you have partitioned your hard drives and after you have installed either Linux or other operating systems. Armed with your information, you are now ready to edit LILO’s configuration file, /etc/lilo.conf.

Editing lilo.conf

Editing lilo.conf is easy. Make sure that you’re logged in as root, and load the file into your favorite editor, making sure to save your changes and to save the file as ASCII text. You’ll edit lilo.conf for a number of reasons:

s You are testing a new kernel and want to be able to boot the same Linux partition with more than one kernel.

s You want to add password protection to a partition.

s You have a hardware setup that requires you to specify special options, such as booting a remote filesystem.

s Your kernel is called something other than /vmlinuz or is in a nonstandard place, such as /etc.

Listing 3.1 shows a sample lilo.conf file.

Listing 3.1. A sample lilo.conf.

# Start LILO global section

Boot = /dev/hda

Prompt

Vga = normal

Ramdisk = 0

# End LILO global section

image = /vmlinuz

root = /dev/hda3

label = linux

read-only # Non-UMSDOS filesystems should be mounted read-only for checking

other = /dev/hda1

label = dos

table = /dev/hda

You can add the parameters listed in Table 3.1 to your /etc/lilo.conf file. They could also be given at the boot prompt, but it is much simpler for them to reside in your /etc/lilo.conf file. Note that only 13 of LILO’s 23 different options are listed here. See LILO’s documentation for details.

Table 3.1. /etc/lilo.conf configuration parameters.

Parameter Description

Tells the kernel the name of the device that contains the

boot=<boot_device>

boot sector. If boot is omitted, the boot sector is read

from the device that is currently mounted as root.

Generates linear sector addresses instead of sector/head/

linear

cylinder addresses, which can be troublesome, especially

when used with the compact option. See LILO’s

documentation for details.

Installs the specified file as the new boot sector. If

install=<boot_sector>

install is omitted, /etc/lilo/boot.b is used as the

default.

You can use this to display the file’s text and customize

message=<message_file>

the boot prompt, with a maximum message of up to

65,535 bytes. Rerun /sbin/lilo if you change this file.

Turns on progress reporting. Higher numbers give more

verbose=<level>

3

verbose output, and the numbers can range from 1 to 5.

This also has a -v and -q option; see LILO’s documenta-

tion for details.

LILO

Copies the original boot sector to <backup_file> (which backup=<backup_file>

can also be a device, such as /dev/null) instead of to

/etc/lilo/boot.<number>.

Similar to backup, this option will overwrite the current

force-backup<backup_file>

backup copy, but backup is ignored if force-backup is

used.

Requires you to type a boot prompt entry.

prompt

Sets a time-out (in tenths of a second) for keyboard

timeout=<tsecs>

input, which is handy if you want to boot right away or

wait for longer than the default five seconds. Tip: To

make LILO wait indefinitely for your keystrokes, use a

value of 0.

Allows input from the designated serial line and the PC’s

serial=<parameters>

keyboard to LILO. A break on the serial line mimics a

Shift key press from the console. For security, password-

protect all your boot images when using this option. The

parameter string has the syntax <port>,<bps><parity>

<bits>, as in /dev/ttyS1,8N1. The components <bps>,

Table 3.1. continued

Parameter Description

and <bits> can be omitted. If one of these

<parity>,

components is omitted, all the following components

have to be omitted as well. Additionally, the comma has

to be omitted if only the port number is specified. See

LILO’s documentation for details.

Ignore corrupt partition tables.

ignore-table

Use this to password protect your boot images.

password=<password>

This keyword is placed after a definition for a partition.

unsafe

The keyword tells LILO not to attempt to read the

MBR or that disk’s partition table entry. You can declare

all the partitions in your system as a log of all existing

partitions and then place the unsafe keyword entry to

prevent LILO from reading it.

After making your changes to lilo.conf, make sure to run /sbin/lilo. You should also always run /sbin/lilo after installing a new kernel.


 

Subscribe By Email

Enter your email address:

Delivered by FeedBurner

Translate

Donate

Development & maintainance needs time & money.
With your donation you can help us to keep this project alive
Donate:
  Monthly Monthly
Currency
Amount