SlideShare a Scribd company logo
6 Stages of Linux Boot Process (Startup Sequence):
Press the power button on your system, and after few
moments you see the Linux login prompt.
Have you ever wondered what happens behind the scenes
from the time you press the power button until the Linux login
prompt appears?
The following are the 6 high level stages of a typical Linux
boot process.
1. BIOS
 BIOS stands for Basic Input/Output System
 Performs some system integrity checks
 Searches, loads, and executes the boot loader program.
 It looks for boot loader in floppy, cd-rom, or hard drive. You
can press a key (typically F12 of F2, but it depends on your
system) during the BIOS startup to change the boot
sequence.
 Once the boot loader program is detected and loaded into
the memory, BIOS gives the control to it.
 So, in simple terms BIOS loads and executes the MBR
boot loader.
2. MBR
 MBR stands for Master Boot Record.
 It is located in the 1st sector of the bootable disk. Typically
/dev/hda, or /dev/sda
 MBR is less than 512 bytes in size. This has three
components 1) primary boot loader info in 1st 446 bytes 2)
partition table info in next 64 bytes 3) mbr validation check
in last 2 bytes.
 It contains information about GRUB (or LILO in old
systems).
 So, in simple terms MBR loads and executes the GRUB
boot loader.
3. GRUB
 GRUB stands for Grand Unified Bootloader.
 If you have multiple kernel images installed on your system,
you can choose which one to be executed.
 GRUB displays a splash screen, waits for few seconds, if
you don’t enter anything, it loads the default kernel image
as specified in the grub configuration file.
 GRUB has the knowledge of the filesystem (the older Linux
loader LILO didn’t understand filesystem).
 Grub configuration file is /boot/grub/grub.conf
(/etc/grub.conf is a link to this). The following is sample
grub.conf of CentOS.
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5PAE)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-194.el5PAE ro
root=LABEL=/
initrd /boot/initrd-2.6.18-194.el5PAE.img
 As you notice from the above info, it contains kernel and
initrd image.
 So, in simple terms GRUB just loads and executes Kernel
and initrd images.
4. Kernel
 Mounts the root file system as specified in the “root=” in
grub.conf
 Kernel executes the /sbin/init program
 Since init was the 1st program to be executed by Linux
Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep
init’ and check the pid.
 initrd stands for Initial RAM Disk.
 initrd is used by kernel as temporary root file system until
kernel is booted and the real root file system is mounted. It
also contains necessary drivers compiled inside, which
helps it to access the hard drive partitions, and other
hardware.
5. Init
 Looks at the /etc/inittab file to decide the Linux run level.
 Following are the available run levels
 0 – halt
 1 – Single user mode
 2 – Multiuser, without NFS
 3 – Full multiuser mode
 4 – unused
 5 – X11
 6 – reboot
 Init identifies the default initlevel from /etc/inittab and uses
that to load all appropriate program.
 Execute ‘grep initdefault /etc/inittab’ on your system to
identify the default run level
 If you want to get into trouble, you can set the default run
level to 0 or 6. Since you know what 0 and 6 means,
probably you might not do that.
 Typically you would set the default run level to either 3 or 5.
6. Runlevel programs
 When the Linux system is booting up, you might see
various services getting started. For example, it might say
“starting sendmail …. OK”. Those are the runlevel
programs, executed from the run level directory as defined
by your run level.
 Depending on your default init level setting, the system will
execute the programs from one of the following directories.
 Run level 0 – /etc/rc.d/rc0.d/
 Run level 1 – /etc/rc.d/rc1.d/
 Run level 2 – /etc/rc.d/rc2.d/
 Run level 3 – /etc/rc.d/rc3.d/
 Run level 4 – /etc/rc.d/rc4.d/
 Run level 5 – /etc/rc.d/rc5.d/
 Run level 6 – /etc/rc.d/rc6.d/
 Please note that there are also symbolic links available for
these directory under /etc directly. So, /etc/rc0.d is linked to
/etc/rc.d/rc0.d.
 Under the /etc/rc.d/rc*.d/ directories, you would see
programs that start with S and K.
 Programs starts with S are used during startup. S for
startup.
 Programs starts with K are used during shutdown. K for kill.
 There are numbers right next to S and K in the program
names. Those are the sequence number in which the
programs should be started or killed.
 For example, S12syslog is to start the syslog deamon,
which has the sequence number of 12. S80sendmail is to
start the sendmail daemon, which has the sequence
number of 80. So, syslog program will be started before
sendmail.

More Related Content

What's hot

Linux boot process
Linux boot processLinux boot process
Linux boot process
Archana Chandrasekharan
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
sourav verma
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
Dhaval Kaneria
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
Anando Kumar Paul
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems Introduction
Sherif Mousa
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
Gaurav Sharma
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)
skalaivanibutp
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
LinuxConcept
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
Vandana Salve
 
Linux kernel
Linux kernelLinux kernel
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisBuland Singh
 
Format, Partition, Install OS
Format, Partition, Install OSFormat, Partition, Install OS
Format, Partition, Install OS
Sef Cambaliza
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoCMacpaul Lin
 
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
Adrian Huang
 
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
Adrian Huang
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
iamumr
 
Linux file system
Linux file systemLinux file system
Linux file system
Md. Tanvir Hossain
 

What's hot (20)

Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems Introduction
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
 
Format, Partition, Install OS
Format, Partition, Install OSFormat, Partition, Install OS
Format, Partition, Install OS
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
RPM (LINUX)
RPM (LINUX)RPM (LINUX)
RPM (LINUX)
 
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
qemu + gdb + sample_code: Run sample code in QEMU OS and observe Linux Kernel...
 
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
qemu + gdb: The efficient way to understand/debug Linux kernel code/data stru...
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
 
Linux file system
Linux file systemLinux file system
Linux file system
 

Viewers also liked

Iptables presentation
Iptables presentationIptables presentation
Iptables presentation
Emin Abdul Azeez
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network services
Uc Man
 
Packet Filtering Using Iptables
Packet Filtering Using IptablesPacket Filtering Using Iptables
Packet Filtering Using IptablesAhmed Mekkawy
 
Iptables in linux
Iptables in linuxIptables in linux
Iptables in linux
Mandeep Singh
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
Mazenetsolution
 
Linux process management
Linux process managementLinux process management
Linux process managementRaghu nath
 

Viewers also liked (8)

Iptables presentation
Iptables presentationIptables presentation
Iptables presentation
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network services
 
Packet Filtering Using Iptables
Packet Filtering Using IptablesPacket Filtering Using Iptables
Packet Filtering Using Iptables
 
Iptables in linux
Iptables in linuxIptables in linux
Iptables in linux
 
Iptables
IptablesIptables
Iptables
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
Linux process management
Linux process managementLinux process management
Linux process management
 
Processes
ProcessesProcesses
Processes
 

Similar to 6 stages of linux boot process

6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
sagarpdalvi
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in Linux
Siddhesh Palkar
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloadingArpita Gupta
 
Linux startup
Linux startupLinux startup
Linux startup
Amin Hashemi
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
Chandrashekar B S
 
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
Hardeep Bhurji
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
MohamedSaied877003
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
Bud Siddhisena
 
Linux basics
Linux basics Linux basics
Linux basics
suniljosekerala
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
Information Technology
 
Linux basics
Linux basics Linux basics
Linux basics
suniljosekerala
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
Sreenatha Reddy K R
 
OS_lab_file.pdf
OS_lab_file.pdfOS_lab_file.pdf
OS_lab_file.pdf
KarthickS942388
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
Acácio Oliveira
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
brusnigin
 
Hardware
HardwareHardware
Hardware
karan saini
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
Mike Wang
 

Similar to 6 stages of linux boot process (20)

6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in Linux
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
Linux startup
Linux startupLinux startup
Linux startup
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Linux boot process
Linux boot processLinux boot process
Linux boot 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
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
 
Linux basics
Linux basics Linux basics
Linux basics
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Linux basics
Linux basics Linux basics
Linux basics
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Ch04
Ch04Ch04
Ch04
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
OS_lab_file.pdf
OS_lab_file.pdfOS_lab_file.pdf
OS_lab_file.pdf
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Hardware
HardwareHardware
Hardware
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
 

More from Teja Bheemanapally (20)

Teradata
TeradataTeradata
Teradata
 
Teradata
TeradataTeradata
Teradata
 
Linux or unix interview questions
Linux or unix interview questionsLinux or unix interview questions
Linux or unix interview questions
 
Linux notes
Linux notesLinux notes
Linux notes
 
Linux crontab
Linux crontabLinux crontab
Linux crontab
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux01122011
Linux01122011Linux01122011
Linux01122011
 
Kernel (computing)
Kernel (computing)Kernel (computing)
Kernel (computing)
 
Installing red hat enterprise linux1
Installing red hat enterprise linux1Installing red hat enterprise linux1
Installing red hat enterprise linux1
 
Linux basic commands tutorial
Linux basic commands tutorialLinux basic commands tutorial
Linux basic commands tutorial
 
In a monolithic kerne1
In a monolithic kerne1In a monolithic kerne1
In a monolithic kerne1
 
Common linuxcommandspocketguide07
Common linuxcommandspocketguide07Common linuxcommandspocketguide07
Common linuxcommandspocketguide07
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
Basic commands
Basic commandsBasic commands
Basic commands
 
File system hierarchy standard
File system hierarchy standardFile system hierarchy standard
File system hierarchy standard
 
40 basic linux command
40 basic linux command40 basic linux command
40 basic linux command
 
15 practical grep command examples in linux
15 practical grep command examples in linux15 practical grep command examples in linux
15 practical grep command examples in linux
 
25 most frequently used linux ip tables rules examples
25 most frequently used linux ip tables rules examples25 most frequently used linux ip tables rules examples
25 most frequently used linux ip tables rules examples
 
Shell intro
Shell introShell intro
Shell intro
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 

Recently uploaded

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 

Recently uploaded (20)

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

6 stages of linux boot process

  • 1. 6 Stages of Linux Boot Process (Startup Sequence): Press the power button on your system, and after few moments you see the Linux login prompt. Have you ever wondered what happens behind the scenes from the time you press the power button until the Linux login prompt appears? The following are the 6 high level stages of a typical Linux boot process. 1. BIOS  BIOS stands for Basic Input/Output System  Performs some system integrity checks  Searches, loads, and executes the boot loader program.
  • 2.  It looks for boot loader in floppy, cd-rom, or hard drive. You can press a key (typically F12 of F2, but it depends on your system) during the BIOS startup to change the boot sequence.  Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it.  So, in simple terms BIOS loads and executes the MBR boot loader. 2. MBR  MBR stands for Master Boot Record.  It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda  MBR is less than 512 bytes in size. This has three components 1) primary boot loader info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes.  It contains information about GRUB (or LILO in old systems).  So, in simple terms MBR loads and executes the GRUB boot loader. 3. GRUB  GRUB stands for Grand Unified Bootloader.  If you have multiple kernel images installed on your system, you can choose which one to be executed.  GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file.  GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem).
  • 3.  Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is sample grub.conf of CentOS. #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-194.el5PAE) root (hd0,0) kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/ initrd /boot/initrd-2.6.18-194.el5PAE.img  As you notice from the above info, it contains kernel and initrd image.  So, in simple terms GRUB just loads and executes Kernel and initrd images. 4. Kernel  Mounts the root file system as specified in the “root=” in grub.conf  Kernel executes the /sbin/init program
  • 4.  Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.  initrd stands for Initial RAM Disk.  initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware. 5. Init  Looks at the /etc/inittab file to decide the Linux run level.  Following are the available run levels  0 – halt  1 – Single user mode  2 – Multiuser, without NFS  3 – Full multiuser mode  4 – unused  5 – X11  6 – reboot  Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.  Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level  If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6 means, probably you might not do that.  Typically you would set the default run level to either 3 or 5. 6. Runlevel programs
  • 5.  When the Linux system is booting up, you might see various services getting started. For example, it might say “starting sendmail …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.  Depending on your default init level setting, the system will execute the programs from one of the following directories.  Run level 0 – /etc/rc.d/rc0.d/  Run level 1 – /etc/rc.d/rc1.d/  Run level 2 – /etc/rc.d/rc2.d/  Run level 3 – /etc/rc.d/rc3.d/  Run level 4 – /etc/rc.d/rc4.d/  Run level 5 – /etc/rc.d/rc5.d/  Run level 6 – /etc/rc.d/rc6.d/  Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/rc0.d.  Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K.  Programs starts with S are used during startup. S for startup.  Programs starts with K are used during shutdown. K for kill.  There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed.  For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog program will be started before sendmail.