Boot Proceess Of Linux
When we turn on the system it run a programe called Basic
input output system. After the BIOS load it perform some diagnostics on the
hardware, Check the installed components to be sure they are functioning and
check the system RAM, The BIOS tries to find out a system drive from which it
can load the boot programe to begin the boot process of starting the operating
system. Usually the first sector of the drive has an area called the Master
Boot Record (MBR), Which hold the programe used to begin the actual loading of
OS. As soon as the BIOS find the MBR it gives up control of the boot process
and load boot loader in to memory. Usually Grand Unified Boot Loader (GRUB)
2. Boot Loader
Phase
Linux has two step processes to begin loading the operating
system. These two steps are typically referred to as stage1 and stage2. In stage one a programe in MBR is used to
find the second stage program that will begin the process of loading the
operating system into memory, GRUB uses a configuration file called
/boot/grub/grub.conf to provide information to the secound stage loader
3. Kernel
Phase
After the stage2 passes successfully. It load kernel into
memory. And kernel will uncompressed the initrd
in RAM . mount it as ram disk and
then run linuxrc in the The
Ramdisk. After that kernel detect all hardware and configure
it properly. And mount the root file system. After the kernel has configured
all the system devices and mount the root file system drives, kernel main
functions at boot time
a) Device
detection
b) Device
Driver initializations
c) Mount
root filesystem read only
d) Load initial process
it run the /sbin/init
command.
4. The /sbin/init
Phase
/sbin/init programe is the first system process that runs
after the kernel has configured the system devices and mounted the system. It
just likes a project mamager of the system because it manages the remaining
step of booting the system and it is the parent of all process. init have its configuration
file /etc/inittab. And it consists of many scripts. After reading the
/etc/inittab file, init turns over control to the rc.sysinit programe which
reads the /etc/rc.d/init.d/functions file to determine the procedure to use to
set the default system path, start and stop programe, sysinit also check
a) set
kernel parameter in /etc/sysctl.conf
b) set
system clock
c) load
keymap
d) Enable
swap partiotion
e) Set
hostname
f) Add
raid devices
g) Enable
disk quota
h) Check
and mount other filesystem
The next script to
run is /etc/rc.d/rc, which is responsible for starting and stoping services
when the runlevel changes and determine the new runlevel. /etc/rc.d directory
are additional directory rc0.d, rc1.d, rc2.d, rc3.d. The number in the
directory name correspond to the runlevel, Each of these directory contain
scripts that are used to stop and start services for the runlevel,All the
scripts in the rc5.d directory are symbolic link to the actual scripts that are
located in the /etc/rc.d/init.d/ directory
After that init run the gettys specified in the /etc/initab
file, These provide six terminal you can use tologin on your server, The last
thing the init programe does it run the /etc/rc.d/rc.loacl scripts
If you are facing any issue please post or comment on
http://linuxtipsandsolution.blogspot.in/
If you are facing any issue please post or comment on
http://linuxtipsandsolution.blogspot.in/
No comments:
Post a Comment