SlideShare a Scribd company logo
LINUX BOOT
PROCESS
CODE4VN.COM
TEXT
BOOT SEQUENCE
TEXT
BIOS (BASIC INPUT/OUTPUT SYSTEM)
▸Built-in firmware used to perform:
▸Initialize and test the system hardware components
▸Load a boot loader or an operating system from a mass
memory device (ex HDD).
▸The first software they run when powered on.
TEXT
TEXT
MASTER BOOT RECORD
▸512 bytes in size and contains machine code instructions for
booting the machine, the disk signature, and the partition table
for the disk.
▸Created when the disk is partitioned.
▸Scans the partition table for the active partition.
▸Finds the starting sector of the active partition.
▸Loads a copy of the boot sector from the active partition into
memory.
▸Transfers control to the executable code in the boot sector.
TEXT
GRUB: GNU GRAND UNIFIED BOOT LOADER
▸A program which enables the user to select which installed operating system or kernel to load at system
boot time. It also allows the user to pass arguments to the kernel.
▸GRUB loads itself into memory in the following stages:
▸The Stage 1 or primary boot loader is read into memory by the BIOS from the MBR[1]. The primary boot
loader exists on less than 512 bytes of disk space within the MBR and is capable of loading either the
Stage 1.5 or Stage 2 boot loader.
▸The Stage 1.5 boot loader is read into memory by the Stage 1 boot loader, if necessary. Some hardware
requires an intermediate step to get to the Stage 2 boot loader. This is sometimes true when the /boot/
partition is above the 1024 cylinder head of the hard drive or when using LBA mode. The Stage 1.5 boot
loader is found either on the /boot/ partition or on a small part of the MBR and the /boot/ partition.
▸The Stage 2 or secondary boot loader is read into memory. The secondary boot loader displays the
GRUB menu and command environment. This interface allows selection of the kernel or operating
system to boot, pass arguments to the kernel, or look at system parameters.
▸The secondary boot loader reads the operating system or kernel and initrd into memory. Once GRUB
determines which operating system to start, it loads it into memory and transfers control of the machine
to that operating system.
TEXT
Code4vn - Linux day - linux boot process
TEXT
KERNEL
▸Initializes and configures the computer's memory, various
hardware attached to the system ie: all processors, I/O
subsystems, and storage devices.
▸Looks for the compressed initrd image in a predetermined
location in memory, decompresses it, mounts it, and loads all
necessary drivers.
▸Initializes virtual devices related to the file system, such as LVM
or software RAID.
▸Unmounting the initrd disk image and freeing up all the memory
the disk image once occupied.
TEXT
KERNEL
▸Creates a root device, mounts the root partition read-only,
and frees any unused memory.
▸At this point, the kernel is loaded into memory and
operational.
▸Kernel executes the /sbin/init program.
TEXT
KERNEL SPACE VS USER SPACE
▸Kernel space is strictly reserved for running a privileged operating system
kernel, kernel extensions, and most device drivers.
▸In contrast, user space is the memory area where application software and
some drivers execute.
▸Each user space process normally runs in its own virtual memory space,
and, unless explicitly allowed, cannot access the memory of other processes.
▸Depending on the privileges, processes can request the kernel to map part
of another process's memory space to its own, as is the case for debuggers.
▸Programs can also request shared memory regions with other processes,
although other techniques are also available to allow inter-process
communication.
TEXT
THE /SBIN/INIT PROGRAM (SYS V OR UPSTART)
▸Coordinates the rest of the boot process and configures the
environment for the user.
▸Becomes the parent or grandparent of all of the processes
that start up automatically on the system.
▸Runs the /etc/rc.d/rc.sysinit script, which sets the
environment path, starts swap, checks the file systems, and
executes all other steps required for system initialization.
▸Runs the /etc/inittab script, which describes how the system
should be set up in each SysV init runlevel
TEXT
THE /SBIN/INIT PROGRAM (SYS V OR UPSTART)
▸Sets the source function library, /etc/rc.d/init.d/functions, for
the system, which configures how to start, kill, and
determine the PID of a program.
▸Starts all of the background processes by looking in the
appropriate rc directory for the runlevel specified as default
in /etc/inittab (Redhat) or /etc/init/rc-sysinit.conf (Ubuntu).
▸Ex: When booting to runlevel 5, the init program looks in the
/etc/rc5.d/ directory to determine which processes to start
and stop.
TEXT
TEXT
SYS V - RUNLEVELS
▸The following runlevels are defined by default for Red Hat Enterprise
Linux:
▸0 — Halt
▸1 — Single-user text mode
▸2 — Not used (user-definable)
▸3 — Full multi-user text mode
▸4 — Not used (user-definable)
▸5 — Full multi-user graphical mode (with an X-based login screen)
▸6 — Reboot
TEXT
LINUX DAEMON
▸A daemon is a type of program on Unix-like operating
systems that runs unobtrusively in the background, rather
than under the direct control of a user, waiting to be
activated by the occurance of a specific event or condition
TEXT
/SBIN/GETTY
▸Forks an /sbin/getty process for each virtual console (login
prompt) allocated to the runlevel.
▸The /sbin/getty process opens communication pathways to
tty devices, sets their modes, prints the login prompt,
accepts the user's username and password and initiates the
login process.
TEXT
GETTY - LOGIN PROCESS
▸Step 1: Init creates the getty process
▸Step 2: getty process initiates login command
▸Step 3: login command try to check user credentials
▸Step 4: getty creates user shell process
▸Step 5: getty read shell property files
▸Step 6: getty provides you with PS1 prompt
TEXT
/ETC/PASSWD AND /ETC/SHADOW (STEP 3)
TEXT
/ETC/GROUP
▸Group name: It is the name of group.
▸Password: Generally password is not used, hence it is empty/blank. It can store
encrypted password. This is useful to implement privileged groups.
▸Group ID (GID): Each user must be assigned a group ID. You can see this number in
your /etc/passwd file.
▸Group List: It is a list of user names of users who are members of the group. The
user names, must be separated by commas.
TEXT
GETTY DETAIL
▸Step4: Gathers all the properties and before the start of user
shell it read /etc/motd file and display its content as banner
message to user.
▸Step5: Process reads /etc/profile file for shell related settings
and for importing any alias or some sort of variables which
we have to set for user shell.
▸Step6: Once it completes reading /etc/profile file, it will read
user home directory content and change user shell properties
according to .bashrc, .bash_profile if his default shell is bash.
The getty process get shell details from /etc/passwd file.
TEXT
/USR/SBIN/NOLOGIN AND /BIN/FALSE
▸When /usr/sbin/nologin is set as the shell, if user with that
shell logs in, they'll get a polite message saying 'This
account is currently not available.'. This message can be
changed with the file /etc/nologin.txt.
▸/bin/false is just a binary that immediately exits, returning
false, when its called, so when someone who has false as
shell logs in, they're immediately logged out when false
exits.
TEXT
THANK YOU!
Ad

More Related Content

What's hot (20)

Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
Rishabh5121993
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
Gaurav Sharma
 
Linux booting process
Linux booting processLinux booting process
Linux booting process
Prashant Hegde
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
Archana Chandrasekharan
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
Hari Shankar
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
Anando Kumar Paul
 
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
 
Booting & shut down,
Booting & shut down,Booting & shut down,
Booting & shut down,
Bhushan Pawar -Java Trainer
 
Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
Dom Cimafranca
 
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
 
Windows 10 Operating System
Windows 10 Operating SystemWindows 10 Operating System
Windows 10 Operating System
awaisajaz
 
Booting Process OS
Booting Process OSBooting Process OS
Booting Process OS
anilinvns
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overview
RajKumar Rampelli
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
Mike Wang
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
Arpita Gupta
 
Boot process
Boot processBoot process
Boot process
Salman Memon
 
Boot process -test
Boot process -testBoot process -test
Boot process -test
Hari Shankar
 
Linux : Booting and runlevels
Linux : Booting and runlevelsLinux : Booting and runlevels
Linux : Booting and runlevels
John Ombagi
 
Ch 2
Ch 2Ch 2
Ch 2
Kashish Handa
 
5. boot process
5. boot process5. boot process
5. boot process
Marian Marinov
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
Gaurav Sharma
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
Hari Shankar
 
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
 
Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
Dom Cimafranca
 
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
 
Windows 10 Operating System
Windows 10 Operating SystemWindows 10 Operating System
Windows 10 Operating System
awaisajaz
 
Booting Process OS
Booting Process OSBooting Process OS
Booting Process OS
anilinvns
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overview
RajKumar Rampelli
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
Mike Wang
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
Arpita Gupta
 
Boot process -test
Boot process -testBoot process -test
Boot process -test
Hari Shankar
 
Linux : Booting and runlevels
Linux : Booting and runlevelsLinux : Booting and runlevels
Linux : Booting and runlevels
John Ombagi
 

Viewers also liked (20)

Rhel6 vs rhel7
Rhel6 vs rhel7Rhel6 vs rhel7
Rhel6 vs rhel7
Ratna Likhita
 
My Emacs Configs
My Emacs ConfigsMy Emacs Configs
My Emacs Configs
Qin Jian
 
Emacs - COSCUP 2012
Emacs - COSCUP 2012Emacs - COSCUP 2012
Emacs - COSCUP 2012
Kan-Ru Chen
 
Emacs入门
Emacs入门Emacs入门
Emacs入门
yinhm .
 
Emacs intro
Emacs introEmacs intro
Emacs intro
Khon
 
Emacs, a performant IDE for Perl
Emacs, a performant IDE for PerlEmacs, a performant IDE for Perl
Emacs, a performant IDE for Perl
Laurent Dami
 
Learn Linux: Emacs
Learn Linux: EmacsLearn Linux: Emacs
Learn Linux: Emacs
Alexandro Colorado
 
Emacs tutorial
Emacs tutorialEmacs tutorial
Emacs tutorial
Lingfei Kong
 
Emacs presentation
Emacs presentationEmacs presentation
Emacs presentation
Lingfei Kong
 
Emacs Modes I can't work without
Emacs Modes I can't work withoutEmacs Modes I can't work without
Emacs Modes I can't work without
Hitesh Sharma
 
London open stack meet up - nov 2015
London open stack meet up - nov 2015London open stack meet up - nov 2015
London open stack meet up - nov 2015
Darryl Weaver
 
Enterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_bootingEnterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_booting
suk kim
 
Kickstart, Puppet, Docker
Kickstart, Puppet, DockerKickstart, Puppet, Docker
Kickstart, Puppet, Docker
Hirokazu Tokuno
 
Pdf c1t tlawaxb
Pdf c1t tlawaxbPdf c1t tlawaxb
Pdf c1t tlawaxb
Susant Sahani
 
How Emacs changed my life
How Emacs changed my lifeHow Emacs changed my life
How Emacs changed my life
yukihiro_matz
 
(IDEユーザのための) ClojureのEmacs開発環境について
(IDEユーザのための) ClojureのEmacs開発環境について(IDEユーザのための) ClojureのEmacs開発環境について
(IDEユーザのための) ClojureのEmacs開発環境について
Kazuhiro Hara
 
How To Manage Services on RHEL 7 or CentOS 7
How To Manage Services on RHEL 7 or CentOS 7How To Manage Services on RHEL 7 or CentOS 7
How To Manage Services on RHEL 7 or CentOS 7
VCP Muthukrishna
 
How to Manage journalctl Logging System on RHEL 7
How to Manage journalctl Logging System on RHEL 7How to Manage journalctl Logging System on RHEL 7
How to Manage journalctl Logging System on RHEL 7
VCP Muthukrishna
 
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
VCP Muthukrishna
 
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
VCP Muthukrishna
 
My Emacs Configs
My Emacs ConfigsMy Emacs Configs
My Emacs Configs
Qin Jian
 
Emacs - COSCUP 2012
Emacs - COSCUP 2012Emacs - COSCUP 2012
Emacs - COSCUP 2012
Kan-Ru Chen
 
Emacs入门
Emacs入门Emacs入门
Emacs入门
yinhm .
 
Emacs intro
Emacs introEmacs intro
Emacs intro
Khon
 
Emacs, a performant IDE for Perl
Emacs, a performant IDE for PerlEmacs, a performant IDE for Perl
Emacs, a performant IDE for Perl
Laurent Dami
 
Emacs presentation
Emacs presentationEmacs presentation
Emacs presentation
Lingfei Kong
 
Emacs Modes I can't work without
Emacs Modes I can't work withoutEmacs Modes I can't work without
Emacs Modes I can't work without
Hitesh Sharma
 
London open stack meet up - nov 2015
London open stack meet up - nov 2015London open stack meet up - nov 2015
London open stack meet up - nov 2015
Darryl Weaver
 
Enterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_bootingEnterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_booting
suk kim
 
Kickstart, Puppet, Docker
Kickstart, Puppet, DockerKickstart, Puppet, Docker
Kickstart, Puppet, Docker
Hirokazu Tokuno
 
How Emacs changed my life
How Emacs changed my lifeHow Emacs changed my life
How Emacs changed my life
yukihiro_matz
 
(IDEユーザのための) ClojureのEmacs開発環境について
(IDEユーザのための) ClojureのEmacs開発環境について(IDEユーザのための) ClojureのEmacs開発環境について
(IDEユーザのための) ClojureのEmacs開発環境について
Kazuhiro Hara
 
How To Manage Services on RHEL 7 or CentOS 7
How To Manage Services on RHEL 7 or CentOS 7How To Manage Services on RHEL 7 or CentOS 7
How To Manage Services on RHEL 7 or CentOS 7
VCP Muthukrishna
 
How to Manage journalctl Logging System on RHEL 7
How to Manage journalctl Logging System on RHEL 7How to Manage journalctl Logging System on RHEL 7
How to Manage journalctl Logging System on RHEL 7
VCP Muthukrishna
 
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
How To Install and Configure Log Rotation on RHEL 7 or CentOS 7
VCP Muthukrishna
 
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
VCP Muthukrishna
 
Ad

Similar to Code4vn - Linux day - linux boot process (20)

101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
Acácio Oliveira
 
Ch04
Ch04Ch04
Ch04
Raja Waseem Akhtar
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
Raja Waseem Akhtar
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
sagarpdalvi
 
linux installation.pdf
linux installation.pdflinux installation.pdf
linux installation.pdf
MuhammadShoaibHussai2
 
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 boot process
Linux boot processLinux boot process
Linux boot process
Chandrashekar B S
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
MohamedSaied877003
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
LinuxConcept
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
mukul bhardwaj
 
Linux basics
Linux basics Linux basics
Linux basics
suniljosekerala
 
Linux
Linux Linux
Linux
Mindtree
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
Dr. C.V. Suresh Babu
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
plarsen67
 
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
 
Boot prom basics
Boot prom basicsBoot prom basics
Boot prom basics
Ganesh Kumar Veerla
 
introduction to computer Linux essential.pptx
introduction to computer Linux essential.pptxintroduction to computer Linux essential.pptx
introduction to computer Linux essential.pptx
musomicatherine
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
Ishan A B Ambanwela
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
Information Technology
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
Acácio Oliveira
 
Ad

Recently uploaded (20)

Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdfAI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdf
Precisely
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Foundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google CertificateFoundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdfAI You Can Trust: The Critical Role of Governance and Quality.pdf
AI You Can Trust: The Critical Role of Governance and Quality.pdf
Precisely
 
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Challenges in Migrating Imperative Deep Learning Programs to Graph Execution:...
Raffi Khatchadourian
 
MINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PRMINDCTI revenue release Quarter 1 2025 PR
MINDCTI revenue release Quarter 1 2025 PR
MIND CTI
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Foundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google CertificateFoundations of Cybersecurity - Google Certificate
Foundations of Cybersecurity - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 

Code4vn - Linux day - linux boot process

  • 3. TEXT BIOS (BASIC INPUT/OUTPUT SYSTEM) ▸Built-in firmware used to perform: ▸Initialize and test the system hardware components ▸Load a boot loader or an operating system from a mass memory device (ex HDD). ▸The first software they run when powered on.
  • 5. TEXT MASTER BOOT RECORD ▸512 bytes in size and contains machine code instructions for booting the machine, the disk signature, and the partition table for the disk. ▸Created when the disk is partitioned. ▸Scans the partition table for the active partition. ▸Finds the starting sector of the active partition. ▸Loads a copy of the boot sector from the active partition into memory. ▸Transfers control to the executable code in the boot sector.
  • 6. TEXT GRUB: GNU GRAND UNIFIED BOOT LOADER ▸A program which enables the user to select which installed operating system or kernel to load at system boot time. It also allows the user to pass arguments to the kernel. ▸GRUB loads itself into memory in the following stages: ▸The Stage 1 or primary boot loader is read into memory by the BIOS from the MBR[1]. The primary boot loader exists on less than 512 bytes of disk space within the MBR and is capable of loading either the Stage 1.5 or Stage 2 boot loader. ▸The Stage 1.5 boot loader is read into memory by the Stage 1 boot loader, if necessary. Some hardware requires an intermediate step to get to the Stage 2 boot loader. This is sometimes true when the /boot/ partition is above the 1024 cylinder head of the hard drive or when using LBA mode. The Stage 1.5 boot loader is found either on the /boot/ partition or on a small part of the MBR and the /boot/ partition. ▸The Stage 2 or secondary boot loader is read into memory. The secondary boot loader displays the GRUB menu and command environment. This interface allows selection of the kernel or operating system to boot, pass arguments to the kernel, or look at system parameters. ▸The secondary boot loader reads the operating system or kernel and initrd into memory. Once GRUB determines which operating system to start, it loads it into memory and transfers control of the machine to that operating system.
  • 9. TEXT KERNEL ▸Initializes and configures the computer's memory, various hardware attached to the system ie: all processors, I/O subsystems, and storage devices. ▸Looks for the compressed initrd image in a predetermined location in memory, decompresses it, mounts it, and loads all necessary drivers. ▸Initializes virtual devices related to the file system, such as LVM or software RAID. ▸Unmounting the initrd disk image and freeing up all the memory the disk image once occupied.
  • 10. TEXT KERNEL ▸Creates a root device, mounts the root partition read-only, and frees any unused memory. ▸At this point, the kernel is loaded into memory and operational. ▸Kernel executes the /sbin/init program.
  • 11. TEXT KERNEL SPACE VS USER SPACE ▸Kernel space is strictly reserved for running a privileged operating system kernel, kernel extensions, and most device drivers. ▸In contrast, user space is the memory area where application software and some drivers execute. ▸Each user space process normally runs in its own virtual memory space, and, unless explicitly allowed, cannot access the memory of other processes. ▸Depending on the privileges, processes can request the kernel to map part of another process's memory space to its own, as is the case for debuggers. ▸Programs can also request shared memory regions with other processes, although other techniques are also available to allow inter-process communication.
  • 12. TEXT THE /SBIN/INIT PROGRAM (SYS V OR UPSTART) ▸Coordinates the rest of the boot process and configures the environment for the user. ▸Becomes the parent or grandparent of all of the processes that start up automatically on the system. ▸Runs the /etc/rc.d/rc.sysinit script, which sets the environment path, starts swap, checks the file systems, and executes all other steps required for system initialization. ▸Runs the /etc/inittab script, which describes how the system should be set up in each SysV init runlevel
  • 13. TEXT THE /SBIN/INIT PROGRAM (SYS V OR UPSTART) ▸Sets the source function library, /etc/rc.d/init.d/functions, for the system, which configures how to start, kill, and determine the PID of a program. ▸Starts all of the background processes by looking in the appropriate rc directory for the runlevel specified as default in /etc/inittab (Redhat) or /etc/init/rc-sysinit.conf (Ubuntu). ▸Ex: When booting to runlevel 5, the init program looks in the /etc/rc5.d/ directory to determine which processes to start and stop.
  • 14. TEXT
  • 15. TEXT SYS V - RUNLEVELS ▸The following runlevels are defined by default for Red Hat Enterprise Linux: ▸0 — Halt ▸1 — Single-user text mode ▸2 — Not used (user-definable) ▸3 — Full multi-user text mode ▸4 — Not used (user-definable) ▸5 — Full multi-user graphical mode (with an X-based login screen) ▸6 — Reboot
  • 16. TEXT LINUX DAEMON ▸A daemon is a type of program on Unix-like operating systems that runs unobtrusively in the background, rather than under the direct control of a user, waiting to be activated by the occurance of a specific event or condition
  • 17. TEXT /SBIN/GETTY ▸Forks an /sbin/getty process for each virtual console (login prompt) allocated to the runlevel. ▸The /sbin/getty process opens communication pathways to tty devices, sets their modes, prints the login prompt, accepts the user's username and password and initiates the login process.
  • 18. TEXT GETTY - LOGIN PROCESS ▸Step 1: Init creates the getty process ▸Step 2: getty process initiates login command ▸Step 3: login command try to check user credentials ▸Step 4: getty creates user shell process ▸Step 5: getty read shell property files ▸Step 6: getty provides you with PS1 prompt
  • 20. TEXT /ETC/GROUP ▸Group name: It is the name of group. ▸Password: Generally password is not used, hence it is empty/blank. It can store encrypted password. This is useful to implement privileged groups. ▸Group ID (GID): Each user must be assigned a group ID. You can see this number in your /etc/passwd file. ▸Group List: It is a list of user names of users who are members of the group. The user names, must be separated by commas.
  • 21. TEXT GETTY DETAIL ▸Step4: Gathers all the properties and before the start of user shell it read /etc/motd file and display its content as banner message to user. ▸Step5: Process reads /etc/profile file for shell related settings and for importing any alias or some sort of variables which we have to set for user shell. ▸Step6: Once it completes reading /etc/profile file, it will read user home directory content and change user shell properties according to .bashrc, .bash_profile if his default shell is bash. The getty process get shell details from /etc/passwd file.
  • 22. TEXT /USR/SBIN/NOLOGIN AND /BIN/FALSE ▸When /usr/sbin/nologin is set as the shell, if user with that shell logs in, they'll get a polite message saying 'This account is currently not available.'. This message can be changed with the file /etc/nologin.txt. ▸/bin/false is just a binary that immediately exits, returning false, when its called, so when someone who has false as shell logs in, they're immediately logged out when false exits.