SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
Bootloaders
What ?
How ?
Why ?
What is a bootloader ?
●

●

A boot loader is a computer program that loads
the main operating system or run time
environment for the computer after completion
of the self-tests.
Will be covering the loading and working of a
bootloader with respect to the physical memory
implementation of the x86 based systems.
Booting
●

The term boot is short for bootstrap or bootstrap load and derives
from the phrase to 'pull oneself up by one's bootstraps'. The usage
calls attention to the requirement that, if most software is loaded onto
a computer by other software already running on the computer, some
mechanism must exist to load the initial software onto the computer.
●

Two major sections
–

Lower memory (< 1MB)

–

High memory

●

First 640 KB backed by RAM

●

Reserved memory for BIOS

●

Real Mode
–
–

Can only access lower memory

–
●

16 bit instructions
BIOS interrupts are available

Protected mode
–

32 bit instructions

–

Can access high memory

–

BIOS interrupts are not available
Boot Sequence
●

Turn on the Power button.

●

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

●

CPU jumps to address of BIOS (0xF0000), the reset vector.

●

●

●

●

BIOS run POST (Power-On Self Test) and other necessary
checks.
BIOS jumps to MBR (Master Boot Record) of the boot disk.
Primary Bootloader runs from MBR and jumps to Secondary
Bootloader.
Secondary Bootloaders loads Operating System.
When in BIOS
●

A firmware interface

●

Initialize and test the system hardware components (POST)

●

Provides interface to access hardware (with interrupts)

●

●

●

●

Stored on a non-volatile ROM/flash memory chip on the
motherboard
Table of interrupt vectors resides in the beginning that contain
the segmented addresses of the interrupt handlers. The number
of interrupt is essentially an index into this table.
Checks each device to see if it's bootable
Loads the first sector (boot sector) from the disk to memory
address 0x007C00
Boot Sector
●

●

A Master Boot Record (MBR) is the first sector of a data storage
device that has been partitioned. The MBR sector may contain code
to locate the active partition and invoke its Volume Boot Record.
A Volume Boot Record (VBR) is the first sector of a data storage
device that has not been partitioned, or the first sector of an individual
partition on a data storage device that has been partitioned. It may
contain code to load and invoke an operating system installed on that
device or within that partition.

●

First 446 bytes are the primary boot loader

●

Next sixty-four bytes are the partition table

●

Ends with two bytes that should be 0x55AA. These numbers act as
validation that this sector is the boot sector or Master Boot Record.
Basics of boot-loader
First stage
●

Resides in the boot sector of disk

●

Loaded by the BIOS.

●

Should be covered in 446 bytes due to size constraints in the boot
sector.

●

Load segment registers (%DS, %ES, %FS, %GS, %SS).

●

Set the stack pointer.

●

Reset disk controller.

●

Reads the 2nd stage bootloader and loads it into memory.

●

Jump to it.
Second Stage
●

●

●

●

●

●

Query the BIOS for the size of lower and upper memory( INT 12h
BIOS interrupt).
Loads the kernel from the boot disk into memory, prepare the system
for executing the kernel, and jump to the kernel entry point.
Switch into protected mode and load the kernel into high (> 1 MB)
memory.
BIOS services used to read sectors from the boot disk are available
only in real mode and real mode cannot access high memory.
Repeatedly switch back and forth between real mode and protected
mode while reading the kernel from the floppy disk.
Small kernel can be preloaded entirely into low memory before
transitioning into protected mode.
Starting up … finally!!
●

●

●

●

●

●

●

Kernel needs startup arguments while loading, but this cannot be
done at runtime.
Solution: Configuration files (grub.cfg,initramfs)
The bootloader loads the kernel as well as the temporary filesystem
before the actual file system is loaded.
Initramfs(initial ram file system) : successor of initrd. Solves the
chicken-egg problem.
An archive of the initial file system that gets loaded into memory. The
Linux kernel mounts it as root file system and starts the init process
from it.
initramfs needs to contain all of the device drivers and tools needed
to mount the real root filesystem.
After all these, /sbin/init, /etc/init, /bin/init, and /bin/sh are called in the
order; the first user process is init and they read etc/events.d or
etc/inittab. Hence the system starts.
Basics of boot-loader

Más contenido relacionado

La actualidad más candente

linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device DriversNEEVEE Technologies
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBshimosawa
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
 
Kernel. Operating System
Kernel. Operating SystemKernel. Operating System
Kernel. Operating Systempratikkadam78
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and PropertiesSaadi Rahman
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linuxWingston
 

La actualidad más candente (20)

U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Embedded Operating System - Linux
Embedded Operating System - LinuxEmbedded Operating System - Linux
Embedded Operating System - Linux
 
Linux Internals - Part III
Linux Internals - Part IIILinux Internals - Part III
Linux Internals - Part III
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device Drivers
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Memory management
Memory managementMemory management
Memory management
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Kernel. Operating System
Kernel. Operating SystemKernel. Operating System
Kernel. Operating System
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
Linux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platformLinux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platform
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linux
 

Similar a Basics of boot-loader

IRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-UpIRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-UpIRJET Journal
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting ProcessMike Wang
 
3996234.ppt
3996234.ppt3996234.ppt
3996234.pptKdpKumar
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessHardeep Bhurji
 
Booting how boot to the system and details
Booting how boot to the system and detailsBooting how boot to the system and details
Booting how boot to the system and detailsMadniFareed1
 
Linux boot process
Linux boot processLinux boot process
Linux boot processbrusnigin
 
BIOS__Power-On-Self-Test.pptx
BIOS__Power-On-Self-Test.pptxBIOS__Power-On-Self-Test.pptx
BIOS__Power-On-Self-Test.pptxSamiWhoo
 
Funciones del bios y codigos post ingles
Funciones del bios y codigos post inglesFunciones del bios y codigos post ingles
Funciones del bios y codigos post inglesJose Antonio Torres P
 
1 study of motherboard
1 study of motherboard1 study of motherboard
1 study of motherboardAnkit Dubey
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloadingArpita Gupta
 
1.0 introduction to personal computer
1.0  introduction to personal computer1.0  introduction to personal computer
1.0 introduction to personal computerGagandeep Singh
 

Similar a Basics of boot-loader (20)

Boot process
Boot processBoot process
Boot process
 
File000124
File000124File000124
File000124
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
BOOTING.ppt
BOOTING.pptBOOTING.ppt
BOOTING.ppt
 
IRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-UpIRJET- Orchestration of Operating System Start-Up
IRJET- Orchestration of Operating System Start-Up
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
 
3996234.ppt
3996234.ppt3996234.ppt
3996234.ppt
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting Process
 
Booting how boot to the system and details
Booting how boot to the system and detailsBooting how boot to the system and details
Booting how boot to the system and details
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Booting & shut down,
Booting & shut down,Booting & shut down,
Booting & shut down,
 
Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
 
BIOS__Power-On-Self-Test.pptx
BIOS__Power-On-Self-Test.pptxBIOS__Power-On-Self-Test.pptx
BIOS__Power-On-Self-Test.pptx
 
Funciones del bios y codigos post ingles
Funciones del bios y codigos post inglesFunciones del bios y codigos post ingles
Funciones del bios y codigos post ingles
 
Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
 
Unit 4 booting & shut down
Unit 4 booting & shut downUnit 4 booting & shut down
Unit 4 booting & shut down
 
1 study of motherboard
1 study of motherboard1 study of motherboard
1 study of motherboard
 
Booting
BootingBooting
Booting
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
1.0 introduction to personal computer
1.0  introduction to personal computer1.0  introduction to personal computer
1.0 introduction to personal computer
 

Último

Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 

Último (20)

Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 

Basics of boot-loader

  • 3. What is a bootloader ? ● ● A boot loader is a computer program that loads the main operating system or run time environment for the computer after completion of the self-tests. Will be covering the loading and working of a bootloader with respect to the physical memory implementation of the x86 based systems.
  • 4. Booting ● The term boot is short for bootstrap or bootstrap load and derives from the phrase to 'pull oneself up by one's bootstraps'. The usage calls attention to the requirement that, if most software is loaded onto a computer by other software already running on the computer, some mechanism must exist to load the initial software onto the computer.
  • 5. ● Two major sections – Lower memory (< 1MB) – High memory ● First 640 KB backed by RAM ● Reserved memory for BIOS ● Real Mode – – Can only access lower memory – ● 16 bit instructions BIOS interrupts are available Protected mode – 32 bit instructions – Can access high memory – BIOS interrupts are not available
  • 6. Boot Sequence ● Turn on the Power button. ● CPU pins are reset and registers are set to specific value. ● CPU jumps to address of BIOS (0xF0000), the reset vector. ● ● ● ● BIOS run POST (Power-On Self Test) and other necessary checks. BIOS jumps to MBR (Master Boot Record) of the boot disk. Primary Bootloader runs from MBR and jumps to Secondary Bootloader. Secondary Bootloaders loads Operating System.
  • 7. When in BIOS ● A firmware interface ● Initialize and test the system hardware components (POST) ● Provides interface to access hardware (with interrupts) ● ● ● ● Stored on a non-volatile ROM/flash memory chip on the motherboard Table of interrupt vectors resides in the beginning that contain the segmented addresses of the interrupt handlers. The number of interrupt is essentially an index into this table. Checks each device to see if it's bootable Loads the first sector (boot sector) from the disk to memory address 0x007C00
  • 8. Boot Sector ● ● A Master Boot Record (MBR) is the first sector of a data storage device that has been partitioned. The MBR sector may contain code to locate the active partition and invoke its Volume Boot Record. A Volume Boot Record (VBR) is the first sector of a data storage device that has not been partitioned, or the first sector of an individual partition on a data storage device that has been partitioned. It may contain code to load and invoke an operating system installed on that device or within that partition. ● First 446 bytes are the primary boot loader ● Next sixty-four bytes are the partition table ● Ends with two bytes that should be 0x55AA. These numbers act as validation that this sector is the boot sector or Master Boot Record.
  • 10. First stage ● Resides in the boot sector of disk ● Loaded by the BIOS. ● Should be covered in 446 bytes due to size constraints in the boot sector. ● Load segment registers (%DS, %ES, %FS, %GS, %SS). ● Set the stack pointer. ● Reset disk controller. ● Reads the 2nd stage bootloader and loads it into memory. ● Jump to it.
  • 11. Second Stage ● ● ● ● ● ● Query the BIOS for the size of lower and upper memory( INT 12h BIOS interrupt). Loads the kernel from the boot disk into memory, prepare the system for executing the kernel, and jump to the kernel entry point. Switch into protected mode and load the kernel into high (> 1 MB) memory. BIOS services used to read sectors from the boot disk are available only in real mode and real mode cannot access high memory. Repeatedly switch back and forth between real mode and protected mode while reading the kernel from the floppy disk. Small kernel can be preloaded entirely into low memory before transitioning into protected mode.
  • 12. Starting up … finally!! ● ● ● ● ● ● ● Kernel needs startup arguments while loading, but this cannot be done at runtime. Solution: Configuration files (grub.cfg,initramfs) The bootloader loads the kernel as well as the temporary filesystem before the actual file system is loaded. Initramfs(initial ram file system) : successor of initrd. Solves the chicken-egg problem. An archive of the initial file system that gets loaded into memory. The Linux kernel mounts it as root file system and starts the init process from it. initramfs needs to contain all of the device drivers and tools needed to mount the real root filesystem. After all these, /sbin/init, /etc/init, /bin/init, and /bin/sh are called in the order; the first user process is init and they read etc/events.d or etc/inittab. Hence the system starts.