Presentation is loading. Please wait.

Presentation is loading. Please wait.

OS Boot Sequence and File System

Similar presentations


Presentation on theme: "OS Boot Sequence and File System"— Presentation transcript:

1 OS Boot Sequence and File System
CS 314 Operating Systems OS Boot Sequence and File System (implication to “Boot Sector Viruses”) Department of Computer Science Southern Illinois University Edwardsville Fall, 2019 Dr. Hiroshi Fujinoki OS-Boot/000

2 CS 314 Operating Systems OS-Boot/000

3 (Disk I/O Subroutines)
CS 314 Operating Systems OS Boot Sequence Step 1: Boot ROM I/O Device (e.g., HDD) Mother Board Processor Are you there? Are you there? Are you there? BIOS Codes (Disk I/O Subroutines) Boot ROM POST Device polling OS-Boot/001

4 CS 314 Operating Systems OS Boot Sequence Step 1: Boot ROM OS-Boot/002

5 CS 314 Operating Systems OS Boot Sequence Step 1: Boot ROM OS-Boot/003

6 CS 314 Operating Systems OS Boot Sequence Step 2: Load & Execute MBR
Mother Board Memory Processor Bootable Device BIOS Codes (Disk I/O Subroutines) Boot ROM Track MBR (Master Boot Record) The very first physical sector of this physical drive (disk #0, surface #0, truck #0, sector #0) Drive spindle hole Sector

7 CS 314 Operating Systems OS Boot Sequence Step 2: Load & Execute MBR
Scan the partition table Program Code Area Find which partition has OS Jump to the OS (OS boot sector) (Boot Strap Loader) Partition Information Partition table The type of partition (OS bootable?) Where in this drive this partition starts Partition Information Where in this drive this partition starts The type of partition (OS bootable?) OS-Boot/005

8 Source: https://www.computerhope.com/fdiskhlp.htm

9 CS 314 Operating Systems OS-Boot/006

10 CS 314 Operating Systems OS Boot Sequence Step 2: Load & Execute MBR

11 CS 314 Operating Systems OS Boot Sequence Step 3: Load & Execute OS Boot Loader Mother Board Memory Processor Bootable Device BIOS Codes (Disk I/O Subroutines) Boot ROM Track OS Boot Sector MBR (Master Boot Record) The very first physical sector of this physical drive OS-Boot/008

12 CS 314 Operating Systems OS Boot Sequence Step 3: Load & Execute OS Boot Loader OS-Boot/010

13 CS 314 Operating Systems File System Implementation
Disk (Disk Platter)  Structure of a file system Physical Drive Capacity OS-Boot/011

14 Jump to the first bootable partition
CS 314 Operating Systems File System Implementation  Structure of a file system Physical Drive Capacity MBR Code Partition Table Partition #1 Partition #N    “BOOT-strap Loader” Logical Drive Logical Drive Size of a partition The first sector for a partition The last sector for a partition Type of file system used for this partition Jump to the first bootable partition Information if a partition is “bootable” OS-Boot/012

15 IPL: Initial Program Loader
CS 314 Operating Systems File System Implementation IPL: Initial Program Loader (“Boot Strap”)  Structure of a file system Physical Drive Capacity Partition Table MBR Partition #1    Partition #N Logical Drive Boot Block Super Block Free Space Management File Allocation Information The Root Directory Other files & directories Logical Drive Read (load) drive parameters Load OS kernel files & execute them OS-Boot/013

16 CS 314 Operating Systems OS Boot Sequence Step 3: Load & Execute OS Boot Loader XXXX 0000 Initial Program Loader (IPL) “JUMP XXXX” instruction File system type IPL Parameters Size of the root directory Number of sectors available Other information - Cluster size OS Loader Load OS to memory Initialize OS Start the OS (IPL Codes) OS-Boot/009

17 (= start loading OS system files & drives)
CS 314 Operating Systems System Boot Sequence  You turn on power  CPU jumps to the beginning of BIOS ROM  CPU executes POST and initializes hardware - Memory access latency, initialize video card, etc.  CPU executes BIOS routine to load MBR  CPU jumps to the routine in MBR  MBR contains a routine (“Boot Strap Loader”) to check the partition table - Find out which logical drive is the system boot drive Load the boot block (“Boot Strap”) of the boot drive and CPU jumps to it - The boot block contains a routine to start OS (= start loading OS system files & drives) OS-Boot/014

18 CS 314 Operating Systems    File System Implementation
 Structure of a file system Power-On Physical Drive Capacity Partition Table MBR Partition #1    Partition #N Logical Drive Boot Block Super Block Free Space Management File Allocation Information The Root Directory Other files & directories Logical Drive OS-Boot/015

19 (Disk I/O Subroutines)
CS 314 Operating Systems Boot-Sector Viruses & Its Significance Mother Board Memory Processor Bootable Device BIOS Codes (Disk I/O Subroutines) Boot ROM Track Boot-Sector Viruses Applications OS Loader MBR OS (& drivers) Boot Strap OS Disk I/O library Drive spindle hole BIOS Sector

20 Modify virus-detection program
CS 314 Operating Systems Boot-Sector Viruses & Its Significance 0000 Initial Program Loader (IPL) “JUMP YYYY” instruction “JUMP XXXX” instruction File system type Initial Program Loader Parameters Size of the root directory Number of sectors available Other information - Cluster size XXXX Load OS to memory Initialize OS Start the OS Initial Program Loader Codes YYYY Virus Code Disable firewall “JUMP XXXX” instruction Modify virus-detection program Modify OS system calls OS-Boot/017

21 CS 314 Operating Systems Boot-Sector Viruses & Its Significance
OS-Boot/018

22 CS 314 Operating Systems Tools for troubleshooting booting sequence (for MBR) (those that let you to fix problems in MBR) OS-Boot/019

23 CS 314 Operating Systems Tools for troubleshooting booting sequence (for IPL) (those that let you to fix problems in IPL) OS-Boot/020

24 CS 314 Operating Systems Tools for troubleshooting booting sequence (file systems) (those that let you to fix problems in “file systems”) OS-Boot/021

25 CS 314 Operating Systems Tools for troubleshooting booting sequence (BIOS) OS-Boot/022

26

27 CS 314 Operating Systems OS-Boot/000


Download ppt "OS Boot Sequence and File System"

Similar presentations


Ads by Google