Working on a computer is really easy that we find even children handling them expertly. However, several things start to happen when you power on a computer before it can present the nice user-friendly graphical user interface (GUI) screen that we call the desktop. It goes through a booting process which is termed as “boot-up” that comes from the word “bootstrap”.
The boot process happens every time you turn on the computer. It is a quick process. When you press the power button, it will take a few minutes to load the complete operating system.
When you power on the computer, every component is in its random unpredictable state. The BIOS program has various important functions, which start with the power on self-test (POST) to ensure all the components present on the motherboard are functioning properly. POST specifies any malfunction in the form of audible beeps. You have to refer to the Beep Codes of the motherboard to decode them. If the computer passes the test for the video card, it displays the manufacturer’s logo on its screen.
After this, BIOS initializes the various hardware devices. This allows them to function without conflicts. In the next stage, the BIOS loads the Operating System. The search sequence follows an order predefined by the manufacturer in the BIOS settings. If the BIOS does not find a suitable operating system, an error message appears on the monitor. Otherwise, it reads the master boot record (MBR) to know where the operating system is located.
Master Boot Record
In most scenarios, the operating system resides in the hard disk. The first partition of the hard disk is the master boot record (MBR), and its structure is separate from the operating system. It has two main programs one bootstrap loader, and a partition table. The partition table is actually an inventory of entire partitions within the hard disk and their file system types. The bootstrap loader has the code to initiate the loading process of the operating system. Booting an operating system using GRUB is a two-stage process.
Stage one of the GRUB is a small program and its solely work is to initiate stage two, which contains the main program coding for loading the Windows Kernel and the file system into the RAM. The Kernel is the core component of the operating system, remains in the RAM throughout the session, and controls all aspects of the system through its drivers and modules. The last step of the kernel boot sequence is the init, which regulates the initial run-level of the system. It searches for the file /etc/inittab to see if there is an entry for initdefault. Unless otherwise instructed, it brings the computer to the graphical user interface (GUI) for the user to interact.
Some of the run levels are:
Level 0 –> System Halt
Level 1 –> Single user mode
Level 3 –> Full multiuser mode with network
Level 5 –> Full multiuser mode with network and X display manager
Level 6 –> Reboot
The next step of init is to begin numerous daemons networking and other services. X server daemon manages visuals, keyboard, and mouse.
Hope now you have an idea about how your computer exactly work when you power it on.
Please write comments if you have any suggestion or want to share more information about the topic discussed above.