Skip to main content

Linux boot process

Hello,


Thanks for visiting RvKmR.blogspot.in

You may be curious about what happens in background when you press an power button of an Linux PC/server. Well in this post I am going to explain about how Linux systems boots. I gone thorough lot of tutorials and came with below boot steps.
Before going to process you must to be aware of ROM, RAM, CPU etc.
 OK, let's start !!!
  • As soon as power button pressed system performs system integrity check, we call it as POST and load and execute boot loader to RAM. The module for performing POST and loading boot loader in RAM is available in ROM and which wont be lost when you power off the systems so that we call it as Read only memory.
  • Then the cpu/processor comes in picture. processor having registers, some of them are AX, BX, CX, ISP etc. each of them having there own purpose. For now we are interested in ISP only, which is an instruction pointer in RAM. It means it holds address of instruction to run next. Loaded module contains instruction to talk to HDD to load boot loader, partition table and other information.
  • Then the boot loader or grub gets loaded from first sector of HDD to RAM. Now ISP set to execute boot loader. Boot loader is sophisticated, it knows about partition table and file system so it can deal with directory structure.
  • Boot loader is of about 512 bytes in size which contains primary boot loader info of 446 bytes, partition table info of 64 bytes and MBR validation check info of 2 bytes in size. 
  •  As grub is loaded now cpu starts executing grubs and reads configuration file of grub which is at /boot/grub/grub.cfg
  • This configuration file contains information / menu list of OS. and which OS is where on HDD.
  • Now grub displays list of available/configured OS on console. User can select OS to be started or it will boot default OS configured.
  • After selecting OS , grub load and execute kernel in initrd. initrd is temporary root file system as specified in grub.cfg
  • Then kernel execute init program located in /sbin/init. init process decides runlevel to be booted with and loads respective modules.
  • Program starts with 'S' are used while startup of system for respective runlevel and program starts with 'K' are used while shutdown.
   After that we are notified to log in to system and start doing fun.



Comments

Post a Comment

Popular posts from this blog

Wheel Users in Linux

Hello, Thanks for visiting RvKmR.blogspot.in In this blog post, I am explaining about Wheel users in Linux. Red Hat release that I am working on is as below.  [ravi@localhost vagrant]$ cat /etc/redhat-release CentOS release 6.9 (Final) An Linux system can have many users like System users, normal users, and admin (root) user. Its common sens that we have is not to share root user credentials with other user, but here is case that we wish to run administrative command by normal user. In that case we need to aware about wheel users group. Let's first understand what is wheel user in Linux and why we needed it. Wheel is one of Linux user group that allow members of that group to run administrative commands those need root access of system, Wheel user facilitate to do that with sudo (superuser do ) privileges. Lets do it on terminal : Add an user and set password [root@localhost vagrant]# useradd ravi [root@localhost vagrant]# passwd rav

IT Infrastructure Monitoring

Hello, Thanks for visiting RvKmR.blogspot.in IT Infrastructure monitoring its not just words, it means a lot in the information technology world. I expect an IT professional knows what it means. In a simple word, I can say Compute, Application, and network, etc. OK, let's start why we need IT infrastructure monitoring. Monitoring IT infrastructure allows us to take preemptive action to be undertaken towards a potential problem before they affect your business. OR at least reduce time to restore your infrastructure as soon as an incident occurs. Further monitoring of IT infrastructure is divided into two categories Agent-based and agentless. An agent is a software or script installed on machines that to be monitored so that it will send information to monitoring systems. Having an agent inside the machine uses system resources, which in turn raises maintenance cost. Whereas the agentless tool is little or no impact on monitored machines as an agent is not installed on

Understanding Linux Cluster

Hello Thanks for visiting RvKmR's blogs. So, What means of clusters and why we need them. Cluster is set of servers or say computers working together to achieve single goal or a task. Now you may have idea why we need cluster.  Types of Cluster: High Availability Cluster / HA Cluster  HA Cluster again grouped in two types. Active-Active Cluster Active-Passive Cluster In Active-Active Cluster Service is running on all nodes in cluster. That means all nodes serving independently. In Active-Passive Cluster Service is running on one of node from cluster and other nodes in passive state. If primary node fails then only other node in cluster will start service.   Storage Cluster In this cluster type, all members provides a single cluster file system that can be accessed by different servers. These file system can be used to read-write data simultaneously. EX: GFS2  OK, Then what is High Availability. This type of cluster provides high availability of serv