SlideShare a Scribd company logo
1 of 13
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.
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

More Related Content

What's hot

U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
Kernel Module Programming
Kernel Module ProgrammingKernel Module Programming
Kernel Module ProgrammingSaurabh Bangad
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Process Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux KernelProcess Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux KernelHaifeng Li
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New HardwareRuggedBoardGroup
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoCMacpaul Lin
 
linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)shimosawa
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programmingVandana Salve
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device DriversNEEVEE Technologies
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driverVandana Salve
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKBshimosawa
 

What's hot (20)

U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Kernel Module Programming
Kernel Module ProgrammingKernel Module Programming
Kernel Module Programming
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Process Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux KernelProcess Scheduler and Balancer in Linux Kernel
Process Scheduler and Balancer in Linux Kernel
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
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
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programming
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device Drivers
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKB
 

Similar to 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 to 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
 

Recently uploaded

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

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.
  • 9.
  • 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.