Wednesday, November 23, 2011

Booting Process



Boot Sequence
  • To detect all device
  • Configure plug and ply device
  • Identify the first boot loader

1stage boot loader:- When appropriate boot device found the first stage boot loader into RAM then it take less then 512 bytes to excutes and its job is loaded into second stage boot loader


2nd Stage boot loader:-(Grub) In RHEL 3 we have two type of boot loader
1.GRUB
2.LILO
In RHEL 4 we have only one type of boot loader (GRUB)


Functions Of Grub
  1. To identify the partation with appropriate boot file
  2. To load the kernel
  3. To run the initial
  4. Select os (If multiple os)
  5. RAMDISK(init)
  6. To setup the kernel & its asociate module
The grub file exist in /boot/grub/grub.conf and symbolic file is /etc/grub.conf
*Default=1 (Specify by which kernel or os Default started at boot time)
*Timeout=5 (Provide time select os at boot time)
*Hiddenmenu=(Remove this to get os or kernel selection term automatically at boot time)


Grub has 3 interface

  1. Menu Interface:-Press at any key at boot time
  2. Menu edit interface:-To go in menu edit interface
  3. Command mode interface:-
  • Press "e" at selected options
  • press "d" to delet a line
  • insert new line below the cursoer "o"
  • insert new line above the cursoer "shift+o"
  • To boot "b"
First of all go to the command mode interface

To corrept the grub

#dd if =/dev/zero of=/dev/sda bs=1 count=1024

To reinstall

  • Insert a linux DVD
  • Go to the rescue mode
[root@khan~]#fdisk -l
[root@khan~]#chroot /mnt/sysimage
[root@khan~]#grub-install /dev/sda
[root@khan~]#exit

Protect the Grub
[root@khan~]#grub-md5-crypt >> /boot/grub/grub.conf
Kernel:-
  • Device Detetion
  • Driver initialization
  • Mounting not file system in read only mode
  • Load initial process
Kernel full fil 4 managment task:-

  • Process managment
  • Memory managment
  • file system managment
  • I/O managment
INIT:-
  • /etc/rc.d/rc.sysinit
  • /etc/rc.d/rc
  • /etc/rc.d/rc?.d
  • /etc/rc.d/rc.local
* Init its read configration from /etc/inittab
  • Check the initial runlevel
  • system initilazation script
  • runlevel specific directory
Runsystem initialize script
/etc/rc.d/rc.sysinit

  • activate udev & selinux
  • set kernel parameter in /etc/sysctl.conf
  • set the system clock
  • load keymap
  • enable the swap partation
  • set the hostname
  • root file system check & remounting
  • enable disk quota
  • check & mount other file system
  • Activate RAID & LVM partation
/etc/inittab
  • /etc/rc.d/rc?.d(runlevel control)
  • It check is which runlevel your system start
  • system creat a seprate directory for each runlevel
  • /etc/rc.d/rc0.d-------> (runlevel 0)
  • /etc/rc.d/rc1.d-------> (runlevel 1)
  • /etc/rc.d/rc2.d-------> (runlevel 2)
  • /etc/rc.d/rc3.d-------> (runlevel 3)
  • /etc/rc.d/rc4.d-------> (runlevel 4)
  • /etc/rc.d/rc5.d-------> (runlevel 5)
  • /etc/rc.d/rc6.d-------> (runlevel 6)

No comments:

Post a Comment