Nothing Special   »   [go: up one dir, main page]

Booting Process3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 37

The booting process

Brian kathabasya
What is booting
 Booting: The process of starting a computer(electronic device).
 When we start our Computer then there is an operation which is performed
automatically by the Computer which is also called Booting.
 In the Booting, System will check all the hardware’s and Software’s those
installed or Attached with the System and this will also load all the Files those are
needed for running a system.
 In the Booting Process all the Files that are Stored into the ROM Chip will also be
Loaded for Running the System.
 In the Booting Process the System will read all the information from the Files that
are Stored into the ROM Chip and the ROM chip will read all the instructions that
are Stored into these Files.
 After the Booting of the System this will automatically display all
the information on the System.
 The Instructions necessary to Start the System will be read at the Time of
Booting.
Types booting
 Cold Booting:
 when the System Starts from the Starting or from initial State.
 In the Cold Booting the System will be Started from its beginning State
means first of all, the user will press the Power Button , then this will read all
the instructions from the ROM and the Operating System will be Automatically
loaded into the System.
 Warm Booting:
 The worm Booting is that in which System Automatically Starts when we are
Running the System, For Example due to Light Fluctuation the system will
Automatically Restarts So that in this Chances Damaging of system are More.
 and the System will not be started from its initial State So that some files may
not be Damaged if they are not Properly Stored into the System.
Bios and Booting Process
 BIOS is the main part of Booting process of a Computer.
 BIOS means Basic Input Output System.
 When We start our computer and the starting screen comes in front
of us.
 The process between this is called booting process of the Computer.
 Most of the people are not interested to know about booting process.
 They just start the computer and do their work.
 .
What is BIOS
 When we push the power of PC, there are absolutely no instructions
in memory for the PC to execute.
 In fact, when the PC is first powered on, it is almost like it is being
turned on for the very first time ever.
 The importance of the PC’s BIOS (Basic Input/output System) is that it
performs all of the functions the PC needs to get started.
 It contains that first instruction the computer needs to get started,
programming that checks that computer’s hardware is attached and
ready, and other routines to help the computer get up and running.
Cont.
 A PC’s BIOS (Basic Input/output System) includes the
programming to perform three vital and useful functions for
the PC:
 (1) It boots the computer.
 (2) It validates the PC’s configuration.
 (3) It provides an interface between the hardware of the PC and its
software.
Step by step booting process
(1)When you turn on the PC’s power switch, the internal
power supply initializes itself.
The power supply does not provide power to the rest of
the PC As soon as the power supply is able to supply
reliable power to the motherboard, it transmits a “good
power” signal to the motherboard’s chip set , which sends
a system reset command to the processor.

At this point, from all outward appearances, the PC looks


as if it is still powered off.
Step by step booting process cont.

 2) The system reset command sent by the motherboard’s chip set


causes the CPU to read its first instruction from what is called the
jump address .
 The jump address is always located in a fixed preset location,
typically address FFFF0h in system memory.
 The jump address contains the physical address of the BIOS’ boot
program on the ROM BIOS chip
 (3) The CPU executes the first instruction, which copies the BIOS
programs into system memory and starts the BIOS running
Step by step booting process cont.
 (4) The BIOS next performs the POST (Power-On Self-Test) process .
 The POST verifies and tests the hardware configuration stored in the
BIOS configuration information.
 Should the POST detect any problems, it sounds beep codes, one or
more beeps through the system speaker to indicate the nature of the
problem or indicate an error message and the boot process stops.
 5) If the POST finds no problems, the boot process continues.
 At this point, the system BIOS (the one booting the PC) looks for the
video adapter’s BIOS and starts it.
 Virtually all peripheral devices on the PC have their own BIOS.
 This is the first time, aside from the noises of the disk drives and a
single beep indicating all is well, that you will know the PC is booting.
 Information about the video card is displayed on the monitor’s screen.
Step by step booting process cont.
 (6) The display of the video adapter’s information is followed by
information about the system BIOS itself.
 This usually includes information on the manufacturer and version of
the BIOS program.
 (7) Any device BIOS routines are started. The video card’s BIOS starts
first to turn on the display, then information about the system BIOS
and the other BIOSs is displayed as they are started.
 (8) Next, the BIOS begins a series of tests on the system, including
the amount of memory detected on the system.
 This test is usually displayed on the screen as a run-up counter
showing the amount of memory detected and tested.
 Because the BIOS now has use of the monitor, it displays error
messages for any problems detected instead of the beep codes that it
had to use prior to the display being available.
Step by step booting process cont.

 (9) With the device BIOS loaded, the system BIOS checks if the
devices listed in the CMOS configuration data (“Complementary
Metal-Oxide Semiconductor (CMOS)” are present and functioning,
including their speeds, access modes, and other parameters.
 In this sequence, the serial and parallel ports are assigned to their
identities.
 As each device is passed, a message is displayed that it was found,
configured, and tested.
Step by step booting process cont.

 10) If the BIOS supports Plug and Play (PnP) technology, any PnP
devices detected are configured.
 Information on each PnP device is displayed on the screen, although
it typically goes by much too fast to read.
 (11) At the end of the test and configuration sequence, the BIOS
should display a summary data screen that details the PC as the BIOS
sees it and indicating that the system is verified and ready for use.
Step by step booting process cont.

 (12) To start the operating system running, the BIOS must first find it.
Included in the CMOS data is a parameter that indicates the disk
drives (floppy, hard, or CD-ROM) and the order in which they should
be accessed to find the operating system.
 In most cases, the boot sequence parameters will be set to look for
the operating system on first the floppy disk drive, then the hard disk
drive, and perhaps, if all else fails, the CD-ROM drive.
Step by step booting process cont.

 (13) This sequence can be changed to reflect the sequence desired.


 If the first boot device is the hard disk, the BIOS looks for the master
boot record (MBR) to use to start the operating system.
 If the boot disk is a floppy disk, the BIOS looks at the first sector of
the disk for the OS boot program.
 If the boot program is not found on the first device listed, then the
next device is searched and so on until the boot program is found.
 If no boot device is found, the boot sequence stops and an error
message (“No boot device available”) is displayed.
Linux booting
 Booting a computer is the very first step to use the system. No matter which
operating system you chose to run your system, you need to know how to boot the
system.
 In Linux, the necessary steps for booting a computer is a very straightforward process.
 If you use a personal computer (PC), you might find the CPU power switch. On the
other hand, if you are using a notebook or a laptop, you would find the power button
right above the keyboard.
 Nowadays, some notebook manufacturing companies are often placing the power
button along with the keyboard to make the system compact.
 However, a Linux system’s booting procedure is an effortless and uncomplicated task,
but knowing tiny detailed information about the Linux boot process might help you if
you fall into any troubles while booting the system.
Linux booting process

 The booting process involves the following processes


 BIOS Integrity check (POST)
 Loading of the Boot loader (GRUB2)
 Kernel initialization
 Starting systemd, the parent of all processes
Booting process
 When you press the power button, an electrical signal passes through
your system’s motherboard and awakens the entire hardware system.
 As we all know, the Linux kernel works in a very different method
than the traditional booting system. In Linux, the boot process
includes a few steps.
 Linux’s boot process activates the kernel user mode that activates
the BIOS, MBR, boot menu, GRUB, and the login page.
 To cover the entire method of the Linux booting process, we will also
discuss the power supply, hardware setup, hardware virtualization,
storage system, RAM, complementary MOS (CMOS) battery, and all
the other booting related topics.
 GNU Network object Model Environment (GNOME) is a free and open-
source desktop environment and graphical user interface that runs on
top of the UNIX-based operating system
1. Power Supply: The Ignition Switch of
AOfPC
 course, the power supply is the vital hardware part that powers your
entire Linux system. If you are a notebook user, apparently, you don’t
need to worry about the power supply unit (PSU). Laptop and notebooks
come with a certain arrangement of the power supply unit. You need to
plug in the battery to power your system.
 On the other hand, if you are a desktop user, you have to select the right
power supply unit for your Linux system.
 Sometimes a power supply with a low strength can be the reason for an
unsuccessful booting.
 It has been seen that the hefty GPU and other extended USB accessories
consume more power than a regular system. If you want to avoid the risk
of an unsuccessful booting, you must use a good PSU.
 When you press the power button, the electric signal activates the entire
system of your computer.
 As previously, I have recommended getting a robust power supply; I must
mention that a high-power GPU and CPU require more power at the
booting stage, and Linux consumes a little bit extra more power than the
Windows system.
2. BIOS: The Firmware of the
Computer
The BIOS stands for the basic input-output system.
 It is the most crucial segment of a computer that allows the user to
communicate with the hardware.
 BIOS is also known as the computer’s firmware that can initialize the
booting process of your Linux system.
 When you press the power button, it powers up the BIOS, and then
the BIOS starts looking for a boot device to run the operating system.
 If all the process of powering the BIOS and finding the booting device
goes right, the computer generates a single beep sound that reffed as
the system is ready to load the OS.
 This whole process is called the Power On Self Test (POST).
 You can use the function keys (F1-F12) at the BIOS mode to set the
boot priority, configuration the hardware, and enter the system
recovery.
 Inside the BIOS menu, you will find the BIOS version, BIOS
vendor, type of your processor, and other detailed pieces of
information about your system.
 The BIOS menu or the configuration settings may vary from vendor to
vendor. But the basic BIOS settings will be the same.
 If by any accident you cant load the BIOS option, there is a chance
that your BIOS has crashed.
 In that case, you need to download the BIOS file and flash it on your
computer. Otherwise, you won’t be able to enter the boot process of
your Linux system.
3. MBR: Master Boot Record on
Linux
If you’re thinking about switching from Windows to Linux, there is a chance that you
have already heard the term MBR vs. GPT.
 Master boot record or in the shot MBR is well known among Linux enthusiasts
because it is maintainable from the BIOS system. Basically, the MBR partition holds
the boot records and the booting related files.
 In the Linux system’s boot process, the MBR partition also stores the data about all
the other storage drives and how they will be acting on your Linux system. If you
mess up with the MBR partition, your Linux system is in trouble.
 It only requires 4096 Bits of storage to store the GRUB and Linux booting files inside
the MBR partition.
 Though the MBR partition is found in Linux distributions, the GPT partitioning
scheme replaces the MBR table in the modern era.
 Actually, using the GPT scheme is safer than using the MBR scheme for multiple
booting.
 GUID Partition Table (GPT) is a mechanism for partitioning disk on a physical hard
disk, using Globally Unique Identifiers (GUID)
 GPT is a part of the EFI standard that defines the layout of the partition table on a
hard drive. GPT is designed as an improvement to the MBR partitioning system,
GPT and MBR
 Set up a new disk on Windows 10 or 8.1 and you’ll be asked whether you want to
use MBR (Master Boot Record) or GPT (GUID Partition Table).
 Today we’re explaining the difference between GPT and MBR and helping you
choose the right one for your PC or Mac.
 Though GPT brings with it many advantages, MBR is still the most compatible and
is still necessary in some cases.
 This isn’t a Windows-only standard, by the way—Mac OS X, Linux, and other
operating systems can also use GPT.
 A partition structure defines how information is structured on the partition, where
partitions begin and end, and also the code that is used during startup if a
partition is bootable.
 If you’ve ever partitioned and formatted a disk—or set up a Mac to dual boot
Windows—you’ve likely had to deal with MBR and GPT.
 GPT is the new standard and is gradually replacing MBR
What Do GPT and MBR Do?

 You have to partition a disk drive before you can use it.
 MBR (Master Boot Record) and GPT (GUID Partition Table) are two
different ways of storing the partitioning information on a drive.
 This information includes where partitions start and begin, so your
operating system knows which sectors belong to each partition and
which partition is bootable.
 This is why you have to choose MBR or GPT before creating partitions
on a drive.
 MBR does have its limitations. For starters, MBR only works with disks
up to 2 TB in size. MBR also only supports up to four primary
partitions—if you want more, you have to make one of your primary
partitions an “extended partition” and create logical partitions inside
it. This is a silly little hack and shouldn’t be necessary.
GPT advantages
 GPT stands for GUID Partition Table.
 It’s a new standard that’s gradually replacing MBR.
 It’s associated with UEFI, which replaces the clunky old BIOS with something more modern.
 GPT, in turn, replaces the clunky old MBR partitioning system with something more
modern.
 It’s called GUID Partition Table because every partition on your drive has a “globally
unique identifier,” or GUID—a random string so long that every GPT partition on earth likely
has its own unique identifier.
 GPT doesn’t suffer from MBR’s limits. GPT-based drives can be much larger, with size limits
dependent on the operating system and its file systems.
 GPT also allows for a nearly unlimited number of partitions.
 Again, the limit here will be your operating system—Windows allows up to 128 partitions
on a GPT drive, and you don’t have to create an extended partition to make them work.
 On an MBR disk, the partitioning and boot data is stored in one place.
 If this data is overwritten or corrupted, you’re in trouble. In contrast, GPT stores multiple
copies of this data across the disk, so it’s much more robust and can recover if the data is
UEFI
 Unified Extensible Firmware Interface (UEFI) is a specification for a
software program that connects a computer's firmware to its
operating system (OS). UEFI is expected to eventually replace BIOS.
 It ensures that a special start-up program (referred to as a
bootloader) can be loaded in the memory and then execute additional
operational routines. Usually, this process ends with the login screen.
 The user then enters the required information (user name and
password) at which point the computer can be used for specific tasks
(e.g. word processing, etc.).
UEFI Vs. BIOS

 1 UEFI enables users to handle drives that are larger than 2 TB, while the old legacy
BIOS couldn't handle large storage drives.
 2. UEFI supports more than 4 primary partitions with a GUID Partition Table.
 3. Computers who use UEFI firmware have faster booting process than the BIOS.
Various optimizations and enhancement in the UEFI can help your system boot more
quickly than it could before.
 4. UEFI supports secure startup, which means that the validity of the operating
system can be checked to ensure that no malware tampers with the startup process.
 5. UEFI supports networking function in the UEFI firmware itself, which helps remote
troubleshooting and UEFI configuration.
 6. UEFI has a simpler graphical user interface and also has much richer setup menus
than legacy BIOS.
4. Boot Menu: Select the Device to Load the
OS
 In Linux, the boot menu is a drop-down menu where you
can select your operating system. If you have had multiple
Linux distributions or other operating systems installed
inside your machine, you can add them to the boot menu.
As Linux is a kernel-based operating system, the latest
installed OS will be shown at the top of the boot menu.
 In the picture below, you can see that I have installed
Ubuntu, Fedora, Manjaro, and Windows operating system
on my machine.
 As all of the operating systems are installed in the EFI
(Extensible Firmware Interface) mode, I can choose
whichever Linux operating system I want to boot.
 You can change the order of the boot menu from the boot
menu under the BIOS settings.
5. GRUB and initrd: Load the OS on the
Boot Process
 The Initial RAM Disk (intrd) is designed to be used
as a temporary file system for a Linux system to
find the mounted EFI boot files.
 You might have remembered that you have to
assign a disk partition to store the bootloader files
when you make a clean installing of a Linux
distribution. Otherwise, you would not be able to
load the operating system.
 In most Linux distributions, the bootloader files
are stored inside the /boot/efi directory.
 An alternative boot loader, called GRUB (GRand
Unified Bootloader), is used with Red Hat Linux.
LILO is the most popular boot loader among
computer users that employ Linux as the main, or
only, operating system.
 In Linux, there two primary types of bootloader
are available to load the operating system. They
are known as the LILO and GRUB. The LILO stands
for Linux Loader, and the GRUB stands for GNU
GRUB.
 The LILO bootloader was seen in the earlier
versions of Linux distributions. On the other hand,
the GRUB bootloader is modern and can load
multiple bootloaders.
 When the bootloader part is done, you have to
face a login stage to enter the Linux system. In
Linux, two types of display managers are mostly
used.
 They are the GNOME Display Manager (GDM) and
the LightDM. On Ubuntu and other Debian
distributions, the GDM is pre-installed inside the
system. However, you can change and customize
the display manager anytime you want.
6. Linux Kernel: Interact with the Core of your
Computer

 Linux is a kernel based operating system; The kernel is often referred to


as the heart of an operating system.
 However, in the boot process of Linux, the kernel plays a significant role. It
makes the interaction between the core components and the OS.
 When the bootloader loads the OS, the kernel loads the system on the
initial RAM. The kernel is located inside the /boot directory.
 Once the booting is done, the kernel handles all the operational works of
an operating system.
 If you are using an older version of PC and an outdated version of Linux
distributions, you may face some hardware issues that can be the reason
to fail the Linux boot process.
 However, you can upgrade the kernel of your Linux system to overcome
those issues.
7. Runlevel State: Know the Boot Process
Status of Your Compute
 The Runlevel state of a Linux system is defined as when your Linux system has
finished the booting process and is ready to be used. Or more simply, that
immediate state of a computer where the power options, user-mode option, and
the entire environment can be operated is known as the runlevel state.
 In the Linux boot process, the runlevel state plays an important role in warming
up the system. In this state, the kernel warm-ups, the CPU start functioning, and
the desktop environment loads the applications.
 In the Linux boot process, the runlevel state is represented with an alphabetic
and a numeric token. If you look at the picture given below, you can see that my
Linux computer’s current runlevel status is N 5; that means my computer has
already finished the booting process, and my system has more than one user.
8. CMOS: Records the Data of the Linux
Boot Process
 Complementary Metal Oxide Semiconductor or, in short, the CMOS chip
is an important chip that is attached to the motherboard of your
computer.
 The CMOS chip stores the boot sequence and loads the boot directories.
It also retains the time settings and the security settings of the BIOS.
 In modern motherboards, the CMOS chip is integrated with the printed
circuit board. The CMOS can stay alive even after you power off your
computer.
 The CMOS is powered by a small battery named the CMOS battery.
 If you remove the CMOS battery after shutting down your system, all
the BIOS settings, boot process settings will be lost, and the BIOS will be
restored in the default factory setting mode.
9. Virtualization: Enable Virtualization
Technology on a Virtual Machine

 The hardware virtualization is a setting that


you can find inside the BIOS framework.
 Typically, you do not need to enable the
virtualization technology to boot a regular
Linux OS on your machine.
 But, if you are using a VMware or a virtual
machine to boot the Linux system, you
probably need to enable the hardware
virtualization feature to accelerate your
virtual machine’s efficiency.
Main responsibilities of BIOS during POST
are listed below:

 Verify CPU registers.


 Verify the integrity of the BIOS code itself.
 Verify some basic components like DMA, timer, interrupt controller.
 Find, size, and verify system main memory.
 Initialize BIOS
 Identify, organize, and select which devices are available for booting.
Q&A

You might also like