BOOT LOADER

GRUB Loader

This is the new boot loader which used in Linux Operating System.

[root@localhost root]# grub-install /dev/had

Installation finished. No error reported.

This is the contents of the device map /boot/grub/device.map.

Check if this is correct or not. If any of the lines is incorrect,

fix it and re-run the script `grub-install'.

# this device map was generated by anaconda

(fd0) /dev/fd0

(hd0) /dev/hda

ð To install the GRUB loader we use the above command. This command takes information from /etc/grub.conf file. While we change some thing in this file we need also to execute this command to get the affect of the change.

In this file, we can add password for single user mode or multiple uses mode.

[root@localhost root]# vi /etc/grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,7)

# kernel /vmlinuz-version ro root=/dev/hda10

# initrd /initrd-version.img

#boot=/dev/hda

default=1

timeout=3

splashimage=(hd0,7)/grub/splash.xpm.gz

title Linux Fedora Core II

root (hd0,7)

kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.5-1.358.img

title Microsoft Windows XP

rootnoverify (hd0,0)

chainloader +1

Some important lines are described below,

default=0

ð Which OS will first start by default?

timeout=10

ð By default, it will take 10 sec.

splasimage=(hd0,1)/grub/splash.xpm.gz

ð It will load the GRUB screen.

password=linux123

ð This password will need when some one want to go to single user mode.

title RedHat Linux ( 2.4.20 - 8 )

ð Title of operation system (OS).

root ( hd0, 1)

ð Where the root directory is stored?

password=linux123

ð This second password after the title of OS will be needed when some one want to go to normal user mode.

LILO – LInux LOader

[root@localhost root]# lilo

ð To install LILO we have to execute this command.

[root@localhost root]# vi /etc/lilo.conf.anaconda

ð This is the sample file of LILO. The main configuration file of LILO is "/etc/lilo.conf".

[root@localhost root]# vi /etc/lilo.conf

prompt

timeout=50

default=linux

boot=/dev/hda

map=/boot/map

install=/boot/boot.b

linear

password=linux123

image=/boot/vmlinuz-2.6.5-1.358

label=linux

initrd=/boot/initrd-2.6.5-1.358.img

read-only

append="rhgb quiet root=LABEL=/"

other=/dev/hda1

optional

label=Other

Some important lines are described below,

timeout=50

ð By default, it will take 5 sec because the value is in term of mille-second.

password=linux123

ð This password will work for single user mode and normal user mode. If you type restricted the password will work for only single user mode.

Ctrl+x

ð For going to single user mode through LILO we must press (Ctrl+x) the above key at the system boot time and type the following command,

linux single

ð It will open the single user mode.

MKBOOT DISK

[root@localhost root]# uname -r

2.4.20-8

ð This is the version number of the linux.

[root@localhost root]# mkbootdisk <>

Example,

[root@localhost root]# mkbootdisk 2.4.20-8

ð We can create a bootdisk by using command. Bootdisk and bootable disk both are not same. Bootdisk are used to boot only Redhat linux. But bootable disk are used to boot for installing RedHat linux.

When bootdisk will start, it show the login screen and type the login name and password.

Note : To create a bootdisk, take a new floppy disk or you can use the "fdformat" command.

[root@localhost root]# fdformat /dev/fd0