System Booting Process overview

44 %
56 %
Information about System Booting Process overview

Published on March 19, 2014

Author: rampalliraj



This PPT shares some information on what is booting process and different stages in it. Importance of BIOS and BootROM. Steps involved for loading kernel into RAM. What is the importance of init RAM disk (initrd), when 1st user space application is started and who will create init process.

Booting Process By Raj Kumar Rampelli

What is Booting Process ?  Sequence of operations for initialization of hardware blocks including the memory controller, the processor and I/O peripherals etc.

Booting process in x86 based devicePower on device Start executing code in BIOS (H/W initialization), stored in EEPROM flash memory (Boot Flash) and Load Boot Vector Machine start to execute at fixed location 0xFFFFFFF0 (Boot Vector)  Loading Boot Vector BIOS loads Bootloader (ex: GRUB) to select & load OS from multiple OSes installed on hard disks Bootloader loads OS image (boot.img) into RAM by using Boot sector (of size 512MB) on disk (Master Boot Record in windows terminology)

Booting process in ARM based devicePower on Device BootROM start execution, do H/W Initialization and Load Boot Vector Machine start to execute at fixed location 0x0 (RESET) BootROM reads bootable device info from fuse register to load Bootloader. BootROM loads Bootloader Bootloader loads Kernel

Booting Stages….!!  BIOS/BootROM stored in flash memory on mother-board  BIOS/BootROM Tasks:  Power-On Self Test (POST)  H/W Initialization  Initialization of  SDRAM: Read BCT (Board Configuration Table) file, initialize and configure SDRAM  Cache memory  Memory controller  Clocks  Loading Boot Vector  Loading Bootloader  BootROM/BIOS reads BCT file and loads Bootloader into SDRAM  Perform all these operations in AVP (Audio Video Processor) mode only  Bootloader Tasks  1st stage Bootloader  2nd stage Bootloader

Bootloader Tasks (1st stage Bootloader)  Runs in AVP (Audio Video Processor)  Read BCT file and Initializes SDRAM  Check Battery level  If its value is meeting the target battery level then continue booting process  Else charge the device  Read BCT for 2nd stage Bootloader location  Load 2nd stage Bootloader into SDRAM  Initialize clock sources and enable clocks to required peripherals  Enable UART  Initialize CPU and transfer control to 2nd stage Bootloader  Power up CPU  Enable CPU clock  Take CPU out of the reset

Bootloader Tasks (2nd stage Bootloader)  Run in CPU mode  CPU tasks  Initialize & enable Cache memory  Configure General Interrupt Controller  Enable Timer & enable MMU  Initialize Page tables  Power on display  Provide booting options to select  Fastboot  Continue booting  Read GPT (General Partition Table) for kernel location  Load initrd (initial RAM Disk) into RAM and mounted  Serves as temporary root file system in RAM and allows kernel to boot without having to mount any phisical disks.  After kernel is booted, this file system in unmounted and real root file system is mounted.  Load compressed Kernel image (zImage) into memory  Prepare Kernel command line data to pass it to kernel  Disable MMU and cache, now jump to kernel

The Kernel  Bootloader loads compressed kernel image (zImage) into memory  A Routine (at Head of Kernel Image) uncompresses the Kernel and places into high memory start () •When zImage is invoked, the control begins at start() function located at arch/<arm/i386>/boot/head.S and do basic h/w setup Startup_32() •Located in arch/<arm/i386>/boot/compressed/head.S •Startup_32() setup environment ex: stack decompress _kernel() •Located in arch/<arm/i386>/boot/compressed/misc.c •Kernel is decompressed through this call startup_32() •Located in arch/<arm/i386>/kernel/head.S •Page tables are initialized, memory paging in enabled start_kernel () •Located in init/main.c, which takes us to the non-architecture specific linux kernel •Setup Interrupts, Memory configuration, load initial RAM disk Kernel_thread () •Start the init() process, which is the first user space process. Idle task is started and scheduler takes the control when cpu_idle() called.

Start init process  Kernel starts 1st user application /sbin/init  1st program which compiled with std. C library  Creates init process (id=1) (parent of all process)  Start system services  Init process reads /etc/inittab and creates startup processes.  /etc/inittab contains the settings for change the process behavior and their run-levels  Run level: S/W configuration of the system that allows only selected group of processes to exist  Init runs the system in any of the below run level at a time  0 – Halt, 1 – Single user mode  2 – Multi user mode, without NFS  3 – Full multi user mode, 4 – unused, 5 – x11, 6 – Reboot  inittab instructs the init process which run level system should run at and describes the processes to be run ar each run level

References  Inside the Linux boot process: rary/l-linuxboot/  Basic Boot Terminology 2089/basic-boot-terms?rq=1

THANK YOU  Have a look at My PPTs: My Tech Blog:

Add a comment

Related presentations

Related pages

System Booting Process overview - Education

This PPT shares some information on what is booting process and different stages in it. Importance of BIOS and BootROM. Steps involved for loading kernel ...
Read more

Overview of the Booting Processes (System Administration ...

Overview of the Booting Processes. The following information is provided for your reference. It is a brief overview of the network booting processes to ...
Read more

Booting - Ubuntu Wiki

give a general overview over the booting process (from BIOS to kernel booted and root mounted) ... There are 4 phases to starting up the system: BIOS ;
Read more

Linux startup process - Wikipedia, the free encyclopedia

Linux startup process is the multi-stage initialization process performed during booting a Linux installation. It is in many ways similar to the BSD and ...
Read more

Embedded System: An overview of Linux Boot Process for ...

An overview of Linux Boot Process for Embedded Systems This Text provides an insight in to the ... Booting process for an Emebedded Systems (a) ...
Read more

Booting - Wikipedia, the free encyclopedia

The booting process can be "hard", ... a boot loader might load the operating system, configure itself as a mere process within that system, ...
Read more

The Booting Process of the PC - The Computer Technology ...

The Booting Process of the PC Version 1.00 January 23, 2002. The process begins when the power supply is switched on: The power supply performs a self-test:
Read more

Windows 8 Boot Process Overview | Online Video Training

Windows 8 Installation and Management Windows 8 Boot Process Overview. Instructor: Steve Fullmer Duration: 6 Hours Video Style: Classroom. In This Video:
Read more