Tips For Linux

>> Getting LILO to boot Windows (by default)

LILO stands for Linux Loader. The contents of the /etc/lilo.conf file (in RedHat Linux 6) decide what LILO does during booting. This article explains one possible setup on your machine, where you could have Linux and Windows 95 together on one computer. The important lines in the lilo.conf file are the location of your Windows and Linux partitions. If you know the partitions on which you have installed the Operating Systems, then configuring LILO is very simple.

Setup :

The setup of my system can be best explained with the table below

Linux device
Type Description
2 GB
Win 95 Fat32 C:\ in Windows (Within Primary Partition)
1 GB
Linux Native Consists of / and /boot (Within Primary Partition)
Linux Swap (Within Primary Partition)
Win 95 Fat32 D:\ in Windows
Logical 1st partition (Within Extended Partition)
Linux Native Consists of /usr
Logical 2nd partition (Within Extended Partition)

Currently when my system boots. The Lilo prompt stays for 5 seconds. On pressing <Tab> I get 2 options named linux & win. If I don't type anything for 5 seconds, then by default (as set in lilo.conf) Windows 95 starts booting.

Procedure :

Edit the /etc/lilo.conf file (using any text editor) as shown below. This is the current configuration on my system. Yours may be different. Make the requisite changes to boot the partition where your Windows installation exists.

boot = /dev/hda
timeout = 50

default = win
vga = normal

image = /boot/vmlinuz-2.2.12-20

label = linux
initrd = /boot/initrd-2.2.12-20.img
root = /dev/hda3

other = /dev/hda1
label = win

Most of the lines are self descriptive. The lines we are concerned with is default=win and the last 2 lines which describe on which partition Windows is installed. 'win' is a name that I have given to my Windows OS. You can give any name but see to it that both the lines (default= and label= ) share the same name. This name would appear when you press the <Tab> key at the LILO prompt.

Note : LILO can also be configured to boot directly into a particular OS without prompting the user. If the user has pressed <Shift> while LILO is displayed on the screen, then only will it prompt the user for a choice. This procedure shall be explained in some other article

Tips For Linux © All Copyrights Reserved