Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Monday 28 August 2017

Control Linux Boot Processing



 Order of the Boot Process
n  BIOS initialization
n    Peripherals detected, boot device selected , first sector read of d 
n  Boot loader configuration [ GRUB initialization ]
n  Stage 1 :        small, resides in MBR or boot sector contains information about only Stage 2 and loads the stage 2
n  Stage 2:         This is the core image of GRUB reads the file
n  Grub.conf [ /boot/grub/grub.conf ] symbolic link [ /etc/grub.conf ]
n  Kernel Loading
n  Init Process [ /sbin/init ]
l  Starting init also loads [ /etc/inittab ] file into memory
n  rc loading [ /etc/rc.d/rc ]
n  rc.sysinit loading for interactive startup [ /etc/rc.d/rc.sysinit ]
n  System reads the file [ /etc/fstab ] to mount system partitions
n  rc reads /etc/inittab file to load default or selected run level and Enter to selected run level
n  rc.local for user defined scripts [ /etc/rc.d/rc.local ]
n  Loads the X server [ If Run Level 5 is selected ]
l  prefdm script loads [ /etc/X11/prefdm ]
l  prefdm reads the file /etc/sysconfig/desktop file to load display mangers such as kdm,gdm,xdm
l  Then system reads file [ /etc/X11/xorg.conf ] this specifies the hardware components resources
l  Monitor
l  Keyboard
l  Mouse
l  Display Adaptor
GRUB and grub.conf
n  GRUB – GRand  Unified Bootloader Grub is more powerful and we can edit the Grub
l  Command-line interface available at boot prompt
l  Boot form ext2/ext3, ReiserFS, FAT file systems
l  Supports MD5 password protection
n  /boot/grub/grub.conf
n  Configuration file provides the information about kernel  location and other parameters  to load operating system
n  Chain-loading is used for loading other operating system.

Set the password on grub
# grub-md5-crypt
           Password       redhat
Retype password     redhat
It will show the encrypted form of password copy that line and paste in following file........
#vim  /boot/grub/grub.conf
At the line on below hiddenmenu
hiddenmenu
Password    --md5   (paste the line which is copied)
Save the file
Now your grub is password protected
Kernel Initialization:-
n  Device detection.
n  Device drive initialization.
n  Mount root file system read only.
n  Load Initial Process.
Run Levels
n  Run Levels are different modes to run linux with different configuration. Init defines 0 to 6 run levels
n  Defines in file [ /etc/inittab ]
n  Following chard details the run levels that linux defines by default:
n  Runlevel                               Effect
n  0                                              Halt
n  1,s,emergency        Single user modes ( Only root user can be                                                                 logged on. Used to perform Maintenance )
n  2                                              Multi-user, without NFS networking
n  3                                              Full multi-user mode. ( Includes networking )
n  4                                              User definable, but duplicate of run level 3 
n  5                                              X11 ( Includes networking )
n  6                                              Reboot
Note :- If there is no run level defined then system will attempt to boot to run level 9 which is undefined.

Chaining the root password
Boot system into a single user   mode   for change the root password
Reboot   the system   and   press   "a" on  Grub  main menu and  type  "s"   with one space
# setenforce  0
# passwd
 # setenforce 1
 # reboot
  Or #  init  5


No comments:

Post a Comment