You are on page 1of 8

How Computer Boots up?

Have you ever given it a thought that when you press the power button on your
laptop or PC, what happens behind the logo of Windows XP/Vista/Seven or Linux?
From the pressing of the power button to the appearance of the login screen there
are more than hundred components/peripherals that are initialized and thousand
lines of code is executed during the process of booting. But what is booting? We
will look inside the machine, that actually what all happens. So let us start

What is Booting?
Booting is a process or set of operations that loads and hence starts the operating
system, starting from the point when user switches on the power button.

What is Booting Sequence?


Basically documents related to booting are generally confusing as they are often
related to some specific operating system that is Linux machine or Windows
machine.

But

will

keep

it

as

general

as

possible. General

Booting

sequence comprises of the following steps:

Turn on the Power button.

CPU pins are reset and registers are set to specific value.

CPU jump to address of BIOS (0xFFFF0).

BIOS run POST (Power-On Self Test) and other necessary checks.

BIOS jumps to MBR(Master Boot Record).

Primary Bootloader runs from MBR and jumps to Secondary Bootloader.

Secondary Bootloaders loads Operating System.

These are the tasks that are carried during booting process. Now let us discuss them
in detail.

As soon as we turn the power button, the reset signal is sent and the registers in the
CPU are set to their pre defined value. The first and foremost is the reset vector as

shown in the figure (example is taken of 4GB RAM). It should be noted that RAM
contains the garbage value at this time, and the instructions/data stored at any
memory location is due to the memory map of the chipset. Memory map maps the
location (address) to flash memory containing values or instructions. It is ensured
that the instruction stored at this reset vector location is jump to system BIOS, as
BIOS takes up further process of powering up the system.

BIOS-Basic Input Output System


As we have seen that at power up CPU is reset and its registers are set to the
default value, which is an address pointing or directing to the hardware containing
BIOS. Generally the hardware is EEPROM containing the BIOS. The tasks
performed by BIOS are categorized as follows:

POST- Power on Self Test is the foremost routine which checks and tests the

basic hardware. If it fails then it displays error.

Initialization of the hardware devices by letting them run their individual BIOS( eg.

video card have their own inbuilt BIOS code).

Searching for the Master Boot Record and reading it.

Copying the boot sector code to RAM and then switching the control to it.

Boot Sectors
A sector is a part of the hard disk having length of 512 bytes. A sector is termed as
boot sector because of its location and because this sector is responsible for the
further boot process of the system. This boot sector is generally called Master Boot
Record. The MBR is a 512-byte sector, which is located in the first sector on the disk
(sector 1 of cylinder 0, head 0). As soon as BIOS gets the boot sector, it tends to
copy MBR to RAM and switches the execution authority to it.

In the MBR the first 446 bytes are the primary boot loader, which is also referred

as PBL.

The next sixty-four bytes are the partition table, which has the record for each of

the partitions.

The MBR ends with two bytes that should be 0xAA55. These numbers act as

validation that this sector is the boot sector or Master Boot Record.

Power-On Self Test (POST)


Definition - What does Power-On Self Test
(POST) mean?
A power-on self-test (POST) is a succession of built-in diagnostic tests
performed when turning on a computer. This series of tests determines proper
functioning of the following:

Random access memory (RAM)


Disk drives

Hard drives

Central processing unit (CPU)

All other hardware devices

Techopedia explains Power-On Self Test (POST)


In many cases, with IBM-compatible or PC computers, the POST is run by a
computer's basic input/output system (BIOS). The initial tests, which are
executed by the read-only memory (ROM) BIOS startup program, include
reading configuration information stored in the complementary metal-oxidesemiconductor (CMOS) chip, dual inline package (DIP) switches and jumpers.
This information is then compared to hardware devices, such as the CPU,
hard drive, disc drives and video card. Then, ROM BIOS assigns system
resources as needed. These set up the environment required by the operating
system (OS). After completion of these tests, POST generally alerts the OS
with one or more beeps, depending on the system.
The BIOS issues an error message if hardware is not working properly or if it
is not identified. The error message consists of text on the display screen or a
series of coded beep sounds. Because POST is initiated prior to activating the
video card, a display screen message is not typical. There are a variety of
beep codes that are properly descriptive for troubleshooting the error. A beep
code may indicate a parity error, base memory read/write (R/W) error, memory
refresh timer error, display memory error, motherboard timer not functioning,
cache memory failed or numerous other errors.
Sometimes, an error stops the boot process until the error is corrected, and a
device with an error is not allowed to run, ensuring safety. An error message
can be basic. For example, error 161 means the system board has a dead
battery. Sometimes a POST error can be drastic, such as when the
motherboard does not detect a RAM component.

Bootstrap
Definition - What does Bootstrap mean?
A bootstrap is the process of starting up a computer. It also refers to the
program that initializes the operating system (OS) during start-up.
The term bootstrap or bootstrapping originated in the early 1950s. It referred
to a bootstrap load button that was used to initiate a hardwired bootstrap
program, or smaller program that executed a larger program such as the OS.

The term was said to be derived from the expression pulling yourself up by
your own bootstraps; starting small and loading programs one at a time while
each program is laced or connected to the next program to be executed in
sequence.

Techopedia explains Bootstrap


Bootstrap is the process of loading a set of instructions when a computer is
first turned on or booted. During the start-up process, diagnostic tests are
performed, such as the power-on self-test (POST), that set or check
configurations for devices and implement routine testing for the connection of
peripherals, hardware and external memory devices. The bootloader or
bootstrap program is then loaded to initialize the OS.
Typical programs that load the OS are:

GNU grand unified bootloader (GRUB): A multiboot specification that


allows the user to choose one of several OSs

NT loader (NTLDR): A bootloader for Microsofts Windows NT OS that


usually runs from the hard drive

Linux loader (LILO): A bootloader for Linux that generally runs from a
hard drive or floppy disc
Network interface controller (NIC): Uses a bootloader that supports
booting from a network interface such as Etherboot or pre-boot
execution environment (PXE)

Prior to bootstrap a computer is said to start with a blank main memory and an
intact magnetic core memory or kernel. The bootstrap allows the sequence of
programs to load in order to initiate the OS. The OS is the main program that
manages all programs that run on a computer and performs tasks such as
controlling peripheral devices like a disc drive, managing directories and files,
transmitting output signals to a monitor and identifying input signals from a
keyboard.
Bootstrap can also refer to as preparing early programming environments

incrementally to create more complex and user-friendly programming


environments. For example, at one time the programming environment might
have consisted of an assembler program and a simple text editor. Over time,
gradual improvements have led to today's sophisticated object-oriented
programming languages and graphical integrated development environments
(IDEs).

/////
In most modern computers, when the computer activates the hard
disk drive, it finds the first piece of the operating system: the bootstrap
loader.
The bootstrap loader is a small program that has a single function: It
loads the operating system into memory and allows it to begin operation.
In the most basic form, the bootstrap loader sets up the small driver
programs that interface with and control the various hardware
subsystems of the computer. It sets up the divisions of memory that hold
the operating system, user information and applications. It establishes
the data structures that will hold the myriad signals, flags and
semaphores that are used to communicate within and between the
subsystems and applications of the computer. Then it turns control of the
computer over to the operating system.

Definition - What does Boot Loader mean?


A boot loader is a type of program that loads and starts the boot time tasks
and processes of an operating system or the computer system. It enables
loading the operating system within the computer memory when a computer is
started or booted up.
A boot loader is also known as a boot manager.

Techopedia explains Boot Loader


A boot loader primarily manages and executes the boot sequence of a
computer system. A boot loader program is typically started after the computer
or the BIOS have finished performing the initial power and hardware device
checks and tests. It fetches the OS kernel from the hard disk or any specified
boot device within the boot sequence, into the main memory. A boot loader is
associated with only a single operating system. An operating system can also

have multiple boot loader programs classified as primary and secondary boot
loaders, where a secondary boot loader might be larger and more capable
than the primary boot loader.

You might also like