Linux 5 Booting
Process:
1.When the computer starts the power good signal is
generated and the system performs POST(power on self test).
2.Here the processor looks at the end of the system
memory for BIOS and program and runs it.
3.The BIOS program is the read-only permanent
memory and is available for use .It controls first step of boot process.
4.BIOS tests the system and peripherals and then
looks for drive(floppy,CD-ROM) and the hard drive as bootable media.Also BIOS
settings controls the order of drives used for booting.
5.Now whenever the system boots you require to
install a Boot Loader.It is the 1st s/w program that runs when a
computer starts and loads and transfers control to the OS kernel s/w.
6.The task of BL is to display the list of OS in case
of systems where there is more than one OS installed.So that the user can
select the OS from which to boot.
7.There are 2 varieties of BL:
a)GRUB(Grant
unified BL) which contains mechanisms for loading unsupported OS by loading
another BL like DOS or windows.
b)LILO(Linux
Loader) This does not depend on specific file system and can boot Linux Kernel
images from HD and can even boot other OS.
8.While installing Linux we get the option as
Advanced BL configuration:
This is used to determine where you want the BL to
be installed.There are 2 ways:
1.MBR-This is loaded by the computer’s BIOS and
this is where the BL can take control of the boot process and if it is
installed in MBR the BL either GRUB/LILO will display the boot prompt and then
we can select the OS you have configured the BL to boot.
2.1st sector of boot partition-this is
used if another BL is on your system. Other BL takes control 1st and
then you configure BL to start GRUB which then boots linux.
9.When Linux is installed in HD the BIOS program
looks for MBR that starts at 1st sector of HD and passes control to
it.
10.MBR contains instructions to load the
BL(GRUB,LILO) & then the BL takes control of the booting process.BL uses
settings in MBR to display the boot options and allows the user to choose the
OS to start with.
11.If LILO is booting linux,then it loads kernel
images into memory located in /boot directory and then kernel passes control to
init.
12.When kernel is loaded in memory it becomes
operational but the user can’t provide any meaningful i/p to the system.This
issue is resolved by init that brings various services which allows the system
to perform its role.
INIT
- It is the parent or 1st process that starts automatically.
- Functions of init:
a)
/etc/rc.d/rc.sysinit script -> it enables and
checks the file system and takes care of everything that your system needs.
System requires clock so on them rc.sysinit uses /etc/sysconfig/clock file to
initialize clock. Also on rc.sysinit you can also run rc.serial if there are
serial ports processes that needs to be initialized.
b)
/etc/inittab -> this script is used to setup
default runlevel.
Runlevel 0 - > shutdown
Runlevel 1 -> single user
mode
Runlevel 2 -> muti-user mode
without NFS n/wing
Runlevel 3 -> multi-user
mode with NFS n/wing
Runlevel 4 -> reserved
Runlevel 5 -> Graphical
mode[default runlevel for linux]
Runlevel 6 -> Reboot
c) /etc/rc.d/init.d script ->
This is used to start & stop various services
like web server.dns et....
No comments:
Post a Comment