BUILDING AND BOOTING AN OPERATING SYSTEM
When a computer or any other computing device is in a powerless state, its
operating system remains stored in secondary storage like a hard disk or SSD.
But, when the computer is started, the operating system must be present in
the main memory or RAM of the system.
What is Booting?
When a computer system is started, there is a mechanism in the system that
loads the operating system from the secondary storage into the main
memory, or RAM, of the system. This is called the booting process of the
system.
Types of Booting
There are two types of booting depending on the number of operating
systems installed on the machine/computer, i.e.
1. Cold or Hard Booting
A state in which a computer is switched on from being switched off is referred
to as cold booting. Powering on a computer that has been turned off
completely is usually called a cold boot. In this procedure, the system
undergoes a complete power-on self-test (POST) that initializes hardware
devices and loads operating systems from a storage medium into random-
access memory (RAM).
2. Soft or Warm Booting
Soft boot or restart method Warm Booting, also called soft boots or restarts,
reboots a computer system without shutting it down entirely. This technique
is usually started by an operating system restart command or by pressing an
appropriate key combination. Warm reboots do skip some of the hardware
initialization processes that are done on cold booting since the hardware
components have been on power and have been initialized earlier. In operation
of a computer system, both cold boot and warm boot processes are absolutely
necessary, where the cold boot yields total system initialization whereas the
warm boot allows a quicker restart choice that does not really involve the
entire start up sequence.
What is Power on Self Test (POST) Booting?
Power on Self Test booting is a part of the booting cycle in a computer system.
The POST is the very first diagnostic routine that the installed hardware
components undergo every time you power up your computer to assure the
presence and functionality of the devices. The POST tests the status of many
hardware components, including the CPU, memory, storage devices, and
other peripherals. It watches for problems that may prevent booting. In case
of a malfunction, the POST usually displays some error message or beeps in
a pattern that indicates where the problem lies. If it succeeds, the computer
starts loading the operating system and other necessary software for normal
running.
What is Master Boot Record (MBR)?
A piece that is very important in the boot process of a computer is called the
Master Boot Record (MBR). This thing is located at the very beginning on the
hard disk, and it has critical details for starting up. It is composed by division
tables among other parts for different types of partitions used on disks with
their respective filesystems being identified here too. During system startup
sequence or POST (Power On Self Test), firmware like BIOS (Basic Input
Output System) /UEFI (Unified Extensible Firmware Interface) tries looking
for MBR from storage device used during boot up process (boot device) before
running its contents. The bootloader is loaded by this code, and subsequently,
the operating system is loaded by the bootloader. MBR is an essential cog in
booting procedure wherein it starts off steps that culminate in the system
booting appropriately.
Process of Booting
After an operating system is generated, it must be available for use by the
hardware. But how does the hardware know where the kernel is or how to
load that kernel? The procedure of starting a computer by loading the kernel
is known as booting the system. Hence, it needs a special program, stored in
the ROM to do this job known as the Bootstrap loader. Example: BIOS (boot
input-output system). A modern PC BIOS (Basic Input/Output System)
supports booting from various devices. Typically, the BIOS will allow the user
to configure a boot order. If the boot order is set to:
• CD Drive
• Hard Disk Drive
• Network
Then the BIOS will try to boot from the CD drive first, and if that fails, it will
try to boot from the hard disk drive, and if that fails then it will try to boot
from the network, and if that fails, it won’t boot at all. Booting is a startup
sequence that starts the operating system of a computer when it is turned on.
A boot sequence is the initial set of operations that the computer performs
when it is switched on. Every computer has a boot sequence.
The Bootstrap loader locates the kernel, loads it into main memory, and
starts its execution. In some systems, a simple bootstrap loader fetches a
more complex boot program from disk, which in turn loads the kernel.
What is Dual Booting?
When two operating systems are installed on a computer system, it is called
dual booting. In fact, multiple operating systems can be installed on such a
system. But how does the system know which operating system to boot? A
boot loader that understands multiple file systems and multiple operating
systems can occupy the boot space. Once loaded, it can boot one of the
operating systems available on the disk. The disk can have multiple
partitions, each containing a different type of operating system. When a
computer system turns on, a boot manager program displays a menu,
allowing the user to choose the operating system to use.
Comparison Between Booting and Dual Booting
Dual Booting
Parameter Booting
The process of installing and
The process of starting running multiple operating
up a computer systems on a single computer
Definition
Loads the operating Allows users to choose
system into memory and between different operating
Purpose initializes the computer systems at startup
Dual Booting
Parameter Booting
Multiple operating systems
Only one operating are installed on different
system is installed and partitions or drives
runs on the computer
Single OS
The computer is The computer is configured
configured to boot with a boot loader to choose
directly into the between different operating
installed operating systems
Configuration system
Relatively simpler, as Requires additional setup and
there is only one configuration to manage
operating system to multiple operating systems
Setup
Complexity configure
Utilizes the full Resources are divided among
resources of the the installed operating
Resource computer for a single systems, potentially affecting
Utilization operating system performance
In conclusion, when a computer is turned on, the process of loading
the operating system into main memory is known as booting. Dual booting,
on the other hand, is a more sophisticated form of booting that involves
installing two operating systems on a single computer. The user then selects
an operating system to run from the boot manager menu.
Boot Manager and BootLoader in Operating Systems
The Boot Loader and Boot Manager are one of the most important concepts of
operating systems that on their own define how and which operating system(s)
is(are) going to be loaded. In this article, we are going to briefly have a look at
what a Bootloader and Boot Manager is.
Boot Manager:
A Boot Manager is a software program that is responsible for the management
of the booting process of the computer. It is primarily responsible for selecting
the Operating System to be loaded from multiple available options. Further,
it also loads the Bootloader to perform the actual loading of the Operating
System. Boot Manager is the program that manages the available "bootable"
Operating Systems. In a multi-boot system, Boot Manager is the program that
runs at the very first in the booting process. It allows us to select the operating
system to be loaded from the available systems on the machine. If you have
ever installed more than one operating system on your machine you may be
getting grip on this topic. The task of the Boot Manager is to ask users which
Operating System they want to load into the machine or choose the default if
not selected specifically. You may also recollect that timer which when runs
out of time, automatically selects the default Operating System. Once the "to-
be-loaded" Operating System is selected, Boot Manager loads the Boot Loader
and passes control to it. A Boot Manager does not load Operating System
directly on its own. This is done by Boot Loader.
Some examples of Boot Managers are:
1. The BIOS boot manager
2. UEFI (Unified Extensible Firmware Interface) boot manager
3. GRub(GRand Unified Bootloader) It is both Boot Loader and Boot
Manager and is popularly used for Linux - based systems.
Boot Loader:
Boot Loader is a software program that is responsible for "actually loading"
the operating system once the Boot Manager has finished its work. And by
loading Operating System we mean "loading the kernel of the Operating
System". The Boot Loader is typically a part of the Operating System itself.
Till the point Boot Loader starts loading the OS, there is nothing in the Main
Memory of the machine.
Following are a series of tasks that a typical Boot Loader is expected to
perform:
1. Loading and parsing the Boot Configuration File.
2. Loading and initializing the OS's kernel into the main memory.
3. Loading and initializing the other system components and system
drivers.
4. Finally, finish up the system environment setup and transfer the
control to the kernel.
Some examples of Boot Loaders are :
1. LILO (Linux Loader): Most popular Boot Loader for Linux - Based
Machines
2. Windows Boot Loader: Specific up to Windows Machines
3. GRub (Boot Loader part): It is a sub-part of GRub Boot Manager.
Possibilities of a combination of Boot Loader and Boot Manager may vary from
System to System and according to requirements. The specific combination
that will be used will also depend on the hardware configuration and
availability of other system components.
*******************************************************************************