Bootstrapping. Steve Muckle Dave Eckhardt

Similar documents
CS 410/510. Mark P Jones Portland State University

What You Need to Know for Project Three. Dave Eckhardt Steve Muckle

Introduction. Yolanda Becerra Fontal Juan José Costa Prats

Initial Bootloader. On power-up, when a computer is turned on, the following operations are performed:

Boot Process in details for (X86) Computers

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu

Xosdev Chapter 1 [The Bootloader] by mr. xsism

University of Pennsylvania Zachary Goldberg. CIS c. More Kernel Bits. 10/03/09 Slide 1

1. Restarting a computer which is already running is referred to as

IA32 OS START-UP UEFI FIRMWARE. CS124 Operating Systems Fall , Lecture 6

Project 2 Non- preemptive Kernel. COS 318 Fall 2016

Boot. How OS boots

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

Operating systems fundamentals - B02

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

A+ Guide to Managing and Maintaining Your PC. How Hardware and Software Work Together

ECE 471 Embedded Systems Lecture 12

User. Applications. Operating System. Hardware

Perl Install Module Windows Xp From Cd Boot

BIOS. Chapter The McGraw-Hill Companies, Inc. All rights reserved. Mike Meyers CompTIA A+ Guide to Managing and Troubleshooting PCs

To understand this, let's build a layered model from the bottom up. Layers include: device driver filesystem file

Boot Engineering Extension Record (B.E.E.R.) By Curtis E. Stevens

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

DVD :50 PM Page 1 BIOS

Advanced Operating Systems and Virtualization. Alessandro Pellegrini A.Y. 2017/2018

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture)

Operating Systems. Objective

COS 318: Operating Systems

Technical Reference: BIOS Updates & Settings for POS Terminals

How Hardware and Software Work Together

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

System CMOS/BIOS Configuration PC Diagnostics

Title: Demonstrate the linux installation and administration settings.

The Operating System

The Multiboot2 Specification version 2.0

Cdboot Cannot Boot From Cd Error Code 5 Windows 7

Boot Sequence OBJECTIVES RESOURCES DISCUSSION PROCEDURE LAB PROCEDURE 2

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

SPPEXA TEACHLET: GETTING STARTED WITH L4RE CARSTEN WEINHOLD

Chapter 5 - Input / Output

UEFI Support for Memtest86+ Patricio Chilano Mateo

ECE 598 Advanced Operating Systems Lecture 17

Apple Exam 9L0-402 Support Essentials 10.5 Version: 5.0 [ Total Questions: 100 ]

Advanced Operating Systems

Hard Disk Organization. Vocabulary

Lecture 29. Friday, March 23 CS 470 Operating Systems - Lecture 29 1

Windows History 2009 Windows 7 2

BOOTSTRAP, PC BIOS, AND IA32 MEMORY MODES. CS124 Operating Systems Winter , Lecture 5

Your Own Virtual Playground. CS 1585 :: Doug McGeehan

ECE 598 Advanced Operating Systems Lecture 14

Why You Should Not Use Arch

Instructor. Suleiman Muhammad citp(mcpn,mncs) Institute of Computing and ICT, Ahmadu Bello University, Zaria.

ROM (read-only memory) is a type of memory that stores data even when the main computer power is off.

The kernel is not to be confused with the Basic Input/Output System (BIOS).

Installation of Lubuntu Linux, Koha, DSpace and other software using LibLiveCD

COS 318: Operating Systems. File Systems. Topics. Evolved Data Center Storage Hierarchy. Traditional Data Center Storage Hierarchy

Computer Architecture 2/26/01 Lecture #

Network Drawing. Computer Specs, I ve used. Installing a Network-Based Intrusion Detection

Systems software. Definition. Categories of software. Examples Of Systems Software 11/23/2018

MMX Enhanced. 586 GXM-AV Main Board. Trademarks and / or Registered trademarks are the properties of their respective owners.

JetFlash User s Manual

FreeBSD and the IBM PC BIOS

Macs don t have BIOS and some lower-end PCs use either emulated BIOS or the UEFI method. This project assumes an honest-to-goodness PC.

Manual: Errata 1 P R E L I M I N A R Y. Manual Index: 07. CP605 Manual: 25095

Introduction to Routing and Packet Forwarding

Typical File Extensions File Structure

COS 318: Operating Systems. Overview. Andy Bavier Computer Science Department Princeton University

Download from Powered By JbigDeaL

LPI EXAM LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2. Buy Full Product.

These boots are made for walking. Johan Montelius HT2018

AMIBIOS8 Check Point and Beep Code List

Scheduling. CS 161: Lecture 4 2/9/17

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

TCBs and Address-Space Layouts Universität Karlsruhe, System Architecture Group

Downloaded from various sources on the NET

Definition. A series of detailed instructions that control the operation of a computer system. are developed by computer programmers

MBB100 / DSM800 Update Instructions

DUAL OS INSTALLATION

Installation of Fedora 12 with CD

makes floppy bootable o next comes root directory file information ATTRIB command used to modify name

Ext3/4 file systems. Don Porter CSE 506

Troubleshooting & Repair

User s Manual. Hi-Speed USB 2.0 Flash Disk

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Smart Port Card (SPC) William Eatherton Toshiya Aramaki Edward Spitznagel Guru Parulkar Applied Research Lab Washington University in St.

Guideline for the installation of C-MOR Video Surveillance Virtual Machine on VMware ESX Server

How to Dual-Boot OS X and Ubuntu

If you don't care about how it works but you just would like that it works read here. Other wise jump to the next chapter.

MP8011A. Gang Programming System

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

1) How many gigabytes make a terabyte? A) 10 B) 100 C) 1000 D) 1024 E) 512

Software. CPU implements "machine code" instructions. --Each machine code instruction is extremely simple. --To run, expanded to about 10 machine code

The Host Environment. Module 2.1. Copyright 2006 EMC Corporation. Do not Copy - All Rights Reserved. The Host Environment - 1

Chapter 2 Operating-System Structures

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Computer Forensics: Investigating Data and Image Files, 2nd Edition. Chapter 3 Forensic Investigations Using EnCase

File Systems. Information Server 1. Content. Motivation. Motivation. File Systems. File Systems. Files

Operating Systems. Operating Systems Professor Sina Meraji U of T

Xinu on Intel Galileo User Manual

Manually Install Windows Updates Xp From Usb

Transcription:

Bootstrapping Steve Muckle Dave Eckhardt

Synchronization Project 3 checkpoint 1 Bboard post, web page Paging, COW optional No linked lists - not what I said (I think) Homework 1: Monday 17:00 Exam: Tuesday evening (19:00) Known conflicts will receive e-mail from me Monday: Review Carnegie Mellon University 2

Motivation What happens when you turn on your PC? How do we get to main() in kernel.c? Carnegie Mellon University 3

Overview Requirements of Booting Ground Zero The BIOS The Boot Loader Our projects: Multiboot, OSKit Carnegie Mellon University 4

Requirements of Booting Initialize machine to a known state Make sure basic hardware works Load a real operating system Run the real operating system Carnegie Mellon University 5

Ground Zero You turn on the machine Execution begins in real mode at a specific memory address Real mode: only 1mb of memory is addressable Start address is in an area mapped to BIOS (r/o) What s the BIOS? Carnegie Mellon University 6

Basic Input/Output System (BIOS) Code stored in mostly-read-only memory Flash, previously EEPROM Configures hardware details RAM refresh rate or bus speed Password protection Boot-device order Loads OS, acts as mini-os Scary things (power management) Carnegie Mellon University 7

BIOS POST Power On Self Test (POST) Scan for critical resources RAM Test it (only a little!) Graphics card Keyboard Missing something? Beep Carnegie Mellon University 8

BIOS Boot-Device Search Consult settings for selected order A: C: G: (maybe PXE) Load the first sector from a boot device - could be a floppy, hard disk, CDROM - without a BIOS, we d be in a bit of a jam If the last two bytes are AA55, we re set Otherwise look somewhere else No Operating System Present Carnegie Mellon University 9

BIOS Boot-Sector Launch Sector is copied to 0x7C00 Execution is transferred to 0x7C00 If it s a hard disk or CDROM, there s an extra step or two (end result is the same) Now we re executing the bootloader the first software to execute on the PC Carnegie Mellon University 10

Bootloader We re now executing a bootloader Some bootloaders exist to load one OS Others give you a choice of which to load We use grub http://www.gnu.org/software/grub/ Carnegie Mellon University 11

Bootloader's Job Mission: load operating system But where? May need to understand a file system Directories, inodes, symbolic links! May need to understand multiple file systems Single disk may contain more than one Layout defined by partition label...and extended partition label Recall: Boot loader is 510 bytes of code! Carnegie Mellon University 12

Multi-Stage Boot Loader GRUB is larger than one sector Sector loaded in by the BIOS just...loads the rest of the boot loader GRUB then presents boot menu OS load challenge BIOS runs in real mode only 1 meg of RAM! OS may be larger than 1 meg Carnegie Mellon University 13

Brain-switching Switch back and forth between real and protected mode Real mode: BIOS works, can operate disk Protected mode: can access lots of memory Switching code is tricky Somewhat like OS process context switch Done: jump to the kernel s entry point - How do we know the kernel s entrypoint? Carnegie Mellon University 14

Multiboot Specification Many OSes require their own bootloader Multiboot standard Kernel specifies entry point &c The multiboot header must be located in the first 8192 bytes This is the mysterious multiboot.o 0x1badb002 flags checksum Header_addr load_addr load_end_addr bss_end_addr entry_addr Carnegie Mellon University 15

410 Pebbles (from Oskit) Entry point is asm function in multiboot.o This calls the first C function, multiboot_main Carnegie Mellon University 16

OSkit multiboot_main calls: - base_cpu_setup: init GDT, IDT, and TSS - base_multiboot_init_mem: init LMM - base_multiboot_init_cmdline parse cmdline passed to kernel by bootloader - main (yes, your main in kernel.c!) - exit, if main ever returns press a key to reboot Carnegie Mellon University 17

Other Universes OpenFirmware Sun & Mac hardware Goal: share devices across processor families Solution: FORTH boot-loader code in each device Big Iron (mainframes) Boot loader may be a separate machine Run thorough diagnostics on main machine Debugger support for crashes Carnegie Mellon University 18

Summary It's a long, strange trip Power on: maybe no RAM, maybe no CPU!! Maybe beep, maybe draw a sad face Locate OS Load N stages Tell kernel about the machine and the boot params Provide support to kernel once it's running Carnegie Mellon University 19