SlideShare a Scribd company logo
1 of 32
Download to read offline
Linux Booting Procedure
2
How Linux boot?
System startup
4
How computer startup?
 Booting is a bootstrapping process
that starts operating systems when
the user turns on a computer
system
 A boot sequence is the set of
operations the computer performs
when it is switched on that load an
operating system
5
Booting sequence
1. Tern on
2. CPU jump to address of BIOS (0xFFFF0)
3. BIOS runs POST (Power-On Self Test)
4. Find bootale devices
5. Loads and execute boot sector form MBR
6. Load OS
6
BIOS (Basic Input/Output System)
 BIOS refers to the software code run by a computer
when first powered on
 The primary function of BIOS is code program
embedded on a chip that recognises and controls
various devices that make up the computer.
BIOS on board
BIOS on screen
Boot loader
8
MBR (Master Boot Record)
 OS is booted from a hard disk, where the
Master Boot Record (MBR) contains the
primary boot loader
 The MBR is a 512-byte sector, located in
the first sector on the disk (sector 1 of
cylinder 0, head 0)
 After the MBR is loaded into RAM, the
BIOS yields control to it.
9
MBR (Master Boot Record)
10
MBR (Master Boot Record)
 The first 446 bytes are the primary boot
loader, which contains both executable
code and error message text
 The next sixty-four bytes are the partition
table, which contains a record for each of
four partitions
 The MBR ends with two bytes that are
defined as the magic number (0xAA55).
The magic number serves as a validation
check of the MBR
11
Extracting the MBR
 To see the contents of MBR, use this
command:
 # dd if=/dev/hda of=mbr.bin bs=512
count=1
 # od -xa mbr.bin
**The dd command, which needs to be run from
root, reads the first 512 bytes from /dev/hda (the
first Integrated Drive Electronics, or IDE drive)
and writes them to the mbr.bin file.
**The od command prints the binary file in hex and
ASCII formats.
12
Boot loader
 Boot loader could be more aptly called the
kernel loader. The task at this stage is to
load the Linux kernel
 Optional, initial RAM disk
 GRUB and LILO are the most popular Linux
boot loader.
13
Other boot loader (Several OS)
 bootman
 GRUB
 LILO
 NTLDR
 XOSL
 BootX
 loadlin
 Gujin
 Boot Camp
 Syslinux
 GAG
14
GRUB: GRand Unified Bootloader
 GRUB is an operating system independant
boot loader
 A multiboot software packet from GNU
 Flexible command line interface
 File system access
 Support multiple executable format
 Support diskless system
 Download OS from network
 Etc.
15
GRUB boot process
1. The BIOS finds a bootable device (hard disk) and
transfers control to the master boot record
2. The MBR contains GRUB stage 1. Given the small size of
the MBR, Stage 1 just load the next stage of GRUB
3. GRUB Stage 1.5 is located in the first 30 kilobytes of
hard disk immediately following the MBR. Stage 1.5
loads Stage 2.
4. GRUB Stage 2 receives control, and displays to the user
the GRUB boot menu (where the user can manually
specify the boot parameters).
5. GRUB loads the user-selected (or default) kernel into
memory and passes control on to the kernel.
16
Example GRUB config file
17
LILO: LInux LOader
 Not depend on a specific file system
 Can boot from harddisk and floppy
 Up to 16 different images
 Must change LILO when kernel
image file or config file is changed
Kernel
19
Kernel image
 The kernel is the central part in most computer
operating systems because of its task, which is
the management of the system's resources and
the communication between hardware and
software components
 Kernel is always store on memory until computer
is tern off
 Kernel image is not an executable kernel, but a
compress kernel image
 zImage size less than 512 KB
 bzImage size greater than 512 KB
20
Task of kernel
 Process management
 Memory management
 Device management
 System call
21
Major functions flow for Linux kernel
boot
22
Init process
 The first thing the kernel does is to
execute init program
 Init is the root/parent of all processes
executing on Linux
 The first processes that init starts is a
script /etc/rc.d/rc.sysinit
 Based on the appropriate run-level,
scripts are executed to start various
processes to run the system and make it
functional
23
The Linux Init Processes
 The init process is identified by process id "1“
 Init is responsible for starting system processes
as defined in the /etc/inittab file
 Init typically will start multiple instances of
"getty" which waits for console logins which
spawn one's user shell process
 Upon shutdown, init controls the sequence and
processes for shutdown
24
System processes
Process ID Description
0 The Scheduler
1 The init process
2 kflushd
3 kupdate
4 kpiod
5 kswapd
6 mdrecoveryd
25
Inittab file
 The inittab file describes which processes
are started at bootup and during normal
operation
 /etc/init.d/boot
 /etc/init.d/rc
 The computer will be booted to the
runlevel as defined by the initdefault
directive in the /etc/inittab file
 id:5:initdefault:
26
Runlevels
 A runlevel is a software
configuration of the system which
allows only a selected group of
processes to exist
 The processes spawned by init for
each of these runlevels are defined
in the /etc/inittab file
 Init can be in one of eight runlevels:
0-6
27
Runlevels
Runlevel Scripts Directory
(Red Hat/Fedora
Core)
State
0 /etc/rc.d/rc0.d/ shutdown/halt system
1 /etc/rc.d/rc1.d/ Single user mode
2 /etc/rc.d/rc2.d/ Multiuser with no network services exported
3 /etc/rc.d/rc3.d/ Default text/console only start. Full multiuser
4 /etc/rc.d/rc4.d/ Reserved for local use. Also X-windows (Slackware/BSD)
5 /etc/rc.d/rc5.d/ XDM X-windows GUI mode (Redhat/System V)
6 /etc/rc.d/rc6.d/ Reboot
s or S Single user/Maintenance mode (Slackware)
M Multiuser mode (Slackware)
28
rc#.d files
 rc#.d files are the scripts for a
given run level that run during boot
and shutdown
 The scripts are found in the
directory /etc/rc.d/rc#.d/ where the
symbol # represents the run level
29
init.d
 Deamon is a background process
 init.d is a directory that admin can
start/stop individual demons by
changing on it
 /etc/rc.d/init.d/ (Red Hat/Fedora )
 /etc/init.d/ (S.u.s.e.)
 /etc/init.d/ (Debian)
30
Start/stop deamon
 Admin can issuing the command
and either the start, stop, status,
restart or reload option
 i.e. to stop the web server:
 cd /etc/rc.d/init.d/
 (or /etc/init.d/ for S.u.s.e. and Debian)
 httpd stop
31
References
 http://en.wikipedia.org/
 http://www-
128.ibm.com/developerworks/linux/library/l-
linuxboot/
 http://yolinux.com/TUTORIALS/LinuxTutorialInitProc
ess.html
 http://www.pycs.net/lateral/stories/23.html
 http://www.secguru.com/files/linux_file_structure
 http://www.comptechdoc.org/os/linux/commands/linu
x_crfilest.html
Linux booting procedure

More Related Content

What's hot

Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedAdrian Huang
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
 
linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Tutorial: Cross-compiling Linux Kernels on x86_64
Tutorial: Cross-compiling Linux Kernels on x86_64Tutorial: Cross-compiling Linux Kernels on x86_64
Tutorial: Cross-compiling Linux Kernels on x86_64Samsung Open Source Group
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot) Omkar Rane
 
Linux Instrumentation
Linux InstrumentationLinux Instrumentation
Linux InstrumentationDarkStarSword
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New HardwareRuggedBoardGroup
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Joblinuxlab_conf
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overviewRajKumar Rampelli
 

What's hot (20)

Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
linux device driver
linux device driverlinux device driver
linux device driver
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Tutorial: Cross-compiling Linux Kernels on x86_64
Tutorial: Cross-compiling Linux Kernels on x86_64Tutorial: Cross-compiling Linux Kernels on x86_64
Tutorial: Cross-compiling Linux Kernels on x86_64
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
Linux Instrumentation
Linux InstrumentationLinux Instrumentation
Linux Instrumentation
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
What is Bootloader???
What is Bootloader???What is Bootloader???
What is Bootloader???
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Toolchain
ToolchainToolchain
Toolchain
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overview
 
Linux Internals - Interview essentials 4.0
Linux Internals - Interview essentials 4.0Linux Internals - Interview essentials 4.0
Linux Internals - Interview essentials 4.0
 

Viewers also liked

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
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogicAleem Shariff
 
Linux : Booting and runlevels
Linux : Booting and runlevelsLinux : Booting and runlevels
Linux : Booting and runlevelsJohn Ombagi
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting processSiddharth Jain
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloadingArpita Gupta
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!sourav verma
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting ProcessGaurav Sharma
 
CLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemCLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemPaulWay
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System AdministrationSreenatha Reddy K R
 

Viewers also liked (18)

Booting Process
Booting ProcessBooting Process
Booting Process
 
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
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Linux introduction Class 02
Linux introduction Class 02Linux introduction Class 02
Linux introduction Class 02
 
Linux booting process
Linux booting processLinux booting process
Linux booting process
 
Linux : Booting and runlevels
Linux : Booting and runlevelsLinux : Booting and runlevels
Linux : Booting and runlevels
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
Ch 2
Ch 2Ch 2
Ch 2
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting process
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
 
CLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemCLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init system
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
 
Grub
GrubGrub
Grub
 

Similar to Linux booting procedure

Similar to Linux booting procedure (20)

Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
linux boot process ,kernal and file system
linux boot process ,kernal and file systemlinux boot process ,kernal and file system
linux boot process ,kernal and file system
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Linux startup
Linux startupLinux startup
Linux startup
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in Linux
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Linux booting sequence
Linux booting sequenceLinux booting sequence
Linux booting sequence
 
Linux admin course
Linux admin courseLinux admin course
Linux admin course
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
 
Linux basics
Linux basics Linux basics
Linux basics
 
Linux basics
Linux basics Linux basics
Linux basics
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
Ch04
Ch04Ch04
Ch04
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
 
Linux Boot Process
Linux Boot ProcessLinux Boot Process
Linux Boot Process
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 

More from Dhaval Kaneria

Objective-C for iOS Application Development
Objective-C for iOS Application DevelopmentObjective-C for iOS Application Development
Objective-C for iOS Application DevelopmentDhaval Kaneria
 
Gpu with cuda architecture
Gpu with cuda architectureGpu with cuda architecture
Gpu with cuda architectureDhaval Kaneria
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1
Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1
Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1Dhaval Kaneria
 
8 bit single cycle processor
8 bit single cycle processor8 bit single cycle processor
8 bit single cycle processorDhaval Kaneria
 
Paper on Optimized AES Algorithm Core Using FeedBack Architecture
Paper on Optimized AES Algorithm Core Using  FeedBack Architecture Paper on Optimized AES Algorithm Core Using  FeedBack Architecture
Paper on Optimized AES Algorithm Core Using FeedBack Architecture Dhaval Kaneria
 
PAPER ON MEMS TECHNOLOGY
PAPER ON MEMS TECHNOLOGYPAPER ON MEMS TECHNOLOGY
PAPER ON MEMS TECHNOLOGYDhaval Kaneria
 
VIdeo Compression using sum of Absolute Difference
VIdeo Compression using sum of Absolute DifferenceVIdeo Compression using sum of Absolute Difference
VIdeo Compression using sum of Absolute DifferenceDhaval Kaneria
 

More from Dhaval Kaneria (20)

Swine flu
Swine flu Swine flu
Swine flu
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Objective-C for iOS Application Development
Objective-C for iOS Application DevelopmentObjective-C for iOS Application Development
Objective-C for iOS Application Development
 
Gpu with cuda architecture
Gpu with cuda architectureGpu with cuda architecture
Gpu with cuda architecture
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
HDMI
HDMIHDMI
HDMI
 
Hdmi
HdmiHdmi
Hdmi
 
open source hardware
open source hardwareopen source hardware
open source hardware
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1
Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1
Manage Xilinx ISE 14.5 licence for Windows 8 and 8.1
 
VERILOG CODE
VERILOG CODEVERILOG CODE
VERILOG CODE
 
8 bit single cycle processor
8 bit single cycle processor8 bit single cycle processor
8 bit single cycle processor
 
Paper on Optimized AES Algorithm Core Using FeedBack Architecture
Paper on Optimized AES Algorithm Core Using  FeedBack Architecture Paper on Optimized AES Algorithm Core Using  FeedBack Architecture
Paper on Optimized AES Algorithm Core Using FeedBack Architecture
 
PAPER ON MEMS TECHNOLOGY
PAPER ON MEMS TECHNOLOGYPAPER ON MEMS TECHNOLOGY
PAPER ON MEMS TECHNOLOGY
 
VIdeo Compression using sum of Absolute Difference
VIdeo Compression using sum of Absolute DifferenceVIdeo Compression using sum of Absolute Difference
VIdeo Compression using sum of Absolute Difference
 
Mems technology
Mems technologyMems technology
Mems technology
 
Network security
Network securityNetwork security
Network security
 
Token bus standard
Token bus standardToken bus standard
Token bus standard
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Linux booting procedure

  • 4. 4 How computer startup?  Booting is a bootstrapping process that starts operating systems when the user turns on a computer system  A boot sequence is the set of operations the computer performs when it is switched on that load an operating system
  • 5. 5 Booting sequence 1. Tern on 2. CPU jump to address of BIOS (0xFFFF0) 3. BIOS runs POST (Power-On Self Test) 4. Find bootale devices 5. Loads and execute boot sector form MBR 6. Load OS
  • 6. 6 BIOS (Basic Input/Output System)  BIOS refers to the software code run by a computer when first powered on  The primary function of BIOS is code program embedded on a chip that recognises and controls various devices that make up the computer. BIOS on board BIOS on screen
  • 8. 8 MBR (Master Boot Record)  OS is booted from a hard disk, where the Master Boot Record (MBR) contains the primary boot loader  The MBR is a 512-byte sector, located in the first sector on the disk (sector 1 of cylinder 0, head 0)  After the MBR is loaded into RAM, the BIOS yields control to it.
  • 10. 10 MBR (Master Boot Record)  The first 446 bytes are the primary boot loader, which contains both executable code and error message text  The next sixty-four bytes are the partition table, which contains a record for each of four partitions  The MBR ends with two bytes that are defined as the magic number (0xAA55). The magic number serves as a validation check of the MBR
  • 11. 11 Extracting the MBR  To see the contents of MBR, use this command:  # dd if=/dev/hda of=mbr.bin bs=512 count=1  # od -xa mbr.bin **The dd command, which needs to be run from root, reads the first 512 bytes from /dev/hda (the first Integrated Drive Electronics, or IDE drive) and writes them to the mbr.bin file. **The od command prints the binary file in hex and ASCII formats.
  • 12. 12 Boot loader  Boot loader could be more aptly called the kernel loader. The task at this stage is to load the Linux kernel  Optional, initial RAM disk  GRUB and LILO are the most popular Linux boot loader.
  • 13. 13 Other boot loader (Several OS)  bootman  GRUB  LILO  NTLDR  XOSL  BootX  loadlin  Gujin  Boot Camp  Syslinux  GAG
  • 14. 14 GRUB: GRand Unified Bootloader  GRUB is an operating system independant boot loader  A multiboot software packet from GNU  Flexible command line interface  File system access  Support multiple executable format  Support diskless system  Download OS from network  Etc.
  • 15. 15 GRUB boot process 1. The BIOS finds a bootable device (hard disk) and transfers control to the master boot record 2. The MBR contains GRUB stage 1. Given the small size of the MBR, Stage 1 just load the next stage of GRUB 3. GRUB Stage 1.5 is located in the first 30 kilobytes of hard disk immediately following the MBR. Stage 1.5 loads Stage 2. 4. GRUB Stage 2 receives control, and displays to the user the GRUB boot menu (where the user can manually specify the boot parameters). 5. GRUB loads the user-selected (or default) kernel into memory and passes control on to the kernel.
  • 17. 17 LILO: LInux LOader  Not depend on a specific file system  Can boot from harddisk and floppy  Up to 16 different images  Must change LILO when kernel image file or config file is changed
  • 19. 19 Kernel image  The kernel is the central part in most computer operating systems because of its task, which is the management of the system's resources and the communication between hardware and software components  Kernel is always store on memory until computer is tern off  Kernel image is not an executable kernel, but a compress kernel image  zImage size less than 512 KB  bzImage size greater than 512 KB
  • 20. 20 Task of kernel  Process management  Memory management  Device management  System call
  • 21. 21 Major functions flow for Linux kernel boot
  • 22. 22 Init process  The first thing the kernel does is to execute init program  Init is the root/parent of all processes executing on Linux  The first processes that init starts is a script /etc/rc.d/rc.sysinit  Based on the appropriate run-level, scripts are executed to start various processes to run the system and make it functional
  • 23. 23 The Linux Init Processes  The init process is identified by process id "1“  Init is responsible for starting system processes as defined in the /etc/inittab file  Init typically will start multiple instances of "getty" which waits for console logins which spawn one's user shell process  Upon shutdown, init controls the sequence and processes for shutdown
  • 24. 24 System processes Process ID Description 0 The Scheduler 1 The init process 2 kflushd 3 kupdate 4 kpiod 5 kswapd 6 mdrecoveryd
  • 25. 25 Inittab file  The inittab file describes which processes are started at bootup and during normal operation  /etc/init.d/boot  /etc/init.d/rc  The computer will be booted to the runlevel as defined by the initdefault directive in the /etc/inittab file  id:5:initdefault:
  • 26. 26 Runlevels  A runlevel is a software configuration of the system which allows only a selected group of processes to exist  The processes spawned by init for each of these runlevels are defined in the /etc/inittab file  Init can be in one of eight runlevels: 0-6
  • 27. 27 Runlevels Runlevel Scripts Directory (Red Hat/Fedora Core) State 0 /etc/rc.d/rc0.d/ shutdown/halt system 1 /etc/rc.d/rc1.d/ Single user mode 2 /etc/rc.d/rc2.d/ Multiuser with no network services exported 3 /etc/rc.d/rc3.d/ Default text/console only start. Full multiuser 4 /etc/rc.d/rc4.d/ Reserved for local use. Also X-windows (Slackware/BSD) 5 /etc/rc.d/rc5.d/ XDM X-windows GUI mode (Redhat/System V) 6 /etc/rc.d/rc6.d/ Reboot s or S Single user/Maintenance mode (Slackware) M Multiuser mode (Slackware)
  • 28. 28 rc#.d files  rc#.d files are the scripts for a given run level that run during boot and shutdown  The scripts are found in the directory /etc/rc.d/rc#.d/ where the symbol # represents the run level
  • 29. 29 init.d  Deamon is a background process  init.d is a directory that admin can start/stop individual demons by changing on it  /etc/rc.d/init.d/ (Red Hat/Fedora )  /etc/init.d/ (S.u.s.e.)  /etc/init.d/ (Debian)
  • 30. 30 Start/stop deamon  Admin can issuing the command and either the start, stop, status, restart or reload option  i.e. to stop the web server:  cd /etc/rc.d/init.d/  (or /etc/init.d/ for S.u.s.e. and Debian)  httpd stop
  • 31. 31 References  http://en.wikipedia.org/  http://www- 128.ibm.com/developerworks/linux/library/l- linuxboot/  http://yolinux.com/TUTORIALS/LinuxTutorialInitProc ess.html  http://www.pycs.net/lateral/stories/23.html  http://www.secguru.com/files/linux_file_structure  http://www.comptechdoc.org/os/linux/commands/linu x_crfilest.html