SlideShare ist ein Scribd-Unternehmen logo
1 von 40
LINUX BOOTING PROCEDURE
LINUX SYSTEM ADMINITRATION
How Linux boot?
2
System startup
How computer startup?
4
 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
Booting sequence
5
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
BIOS (Basic Input/Output System)
6
 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
MBR (Master Boot Record)
8
 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.
MBR (Master Boot Record)
9
MBR (Master Boot Record)
10
 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
Extracting the MBR
11
 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.
Boot loader
12
 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.
Other boot loader (Several OS)
13
 bootman
 GRUB
 LILO
 NTLDR
 XOSL
 BootX
 loadlin
 Gujin
 Boot Camp
 Syslinux
 GAG
GRUB: GRand Unified Bootloader
14
 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.
GRUB boot process
15
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.
Example GRUB config file
16
LILO: LInux LOader
17
 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
Kernel image
19
 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 turn
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
Task of kernel
20
 Process management
 Memory management
 Device management
 System call
Major functions flow for Linux kernel boot
21
Init process
22
 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
The Linux Init Processes
23
 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
System processes
Process ID Description
0 The Scheduler
1 The init process
2 kflushd
3 kupdate
4 kpiod
5 kswapd
6 mdrecoveryd
24
Inittab file
25
 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:
Runlevels
26
 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
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)
27
rc#.d files
28
 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
init.d
29
 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)
Start/stop deamon
30
 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
Linux files structure
Linux files structure
32
http://www.secguru.com/files/linux_file_structure
FSSTND : (Filesystem standard)
33
 All directories are grouped under the root entry "/"
 root - The home directory for the root user
 home - Contains the user's home directories along with
directories for services
 ftp
 HTTP
 samba
FSSTND : (Filesystem standard)
34
 bin - Commands needed during booting up that might
be needed by normal users
 sbin - Like bin but commands are not intended for
normal users. Commands run by LINUX.
 proc - This filesystem is not on a disk. It is a virtual
filesystem that exists in the kernels imagination which is
memory
 1 - A directory with info about process number 1. Each process
has a directory below proc.
FSSTND : (Filesystem standard)
35
 usr - Contains all commands, libraries, man pages, games
and static files for normal operation.
 bin - Almost all user commands. some commands are in /bin or
/usr/local/bin.
 sbin - System admin commands not needed on the root filesystem. e.g.,
most server programs.
 include - Header files for the C programming language. Should be
below /user/lib for consistency.
 lib - Unchanging data files for programs and subsystems
 local - The place for locally installed software and other files.
 man - Manual pages
 info - Info documents
 doc - Documentation
 tmp
 X11R6 - The X windows system files. There is a directory similar to usr
below this directory.
 X386 - Like X11R6 but for X11 release 5
FSSTND : (Filesystem standard)
36
 boot - Files used by the bootstrap loader, LILO. Kernel
images are often kept here.
 lib - Shared libraries needed by the programs on the root
filesystem
 modules - Loadable kernel modules, especially those
needed to boot the system after disasters.
 dev - Device files
 etc - Configuration files specific to the machine.
 skel - When a home directory is created it is initialized
with files from this directory
 sysconfig - Files that configure the linux system for
devices.
FSSTND : (Filesystem standard)
37
 var - Contains files that change for mail, news, printers log
files, man pages, temp files
 file
 lib - Files that change while the system is running normally
 local - Variable data for programs installed in /usr/local.
 lock - Lock files. Used by a program to indicate it is using a particular
device or file
 log - Log files from programs such as login and syslog which logs all
logins and logouts.
 run - Files that contain information about the system that is valid until
the system is next booted
 spool - Directories for mail, printer spools, news and other spooled
work.
 tmp - Temporary files that are large or need to exist for longer than they
should in /tmp.
 catman - A cache for man pages that are formatted on demand
FSSTND : (Filesystem standard)
38
 mnt - Mount points for temporary mounts by the
system administrator.
 tmp - Temporary files. Programs running after
bootup should use /var/tmp
References
39
 http://en.wikipedia.org/
 http://www-128.ibm.com/developerworks/linux/library/l-linuxboot/
 http://yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html
 http://www.pycs.net/lateral/stories/23.html
 http://www.secguru.com/files/linux_file_structure
 http://www.comptechdoc.org/os/linux/commands/linux_crfilest.html
THANK YOU
Sreenatha Reddy K R
krsreenatha@gmail.com
40

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Apache web service
Apache web serviceApache web service
Apache web service
 
OS concepts 6 OS for various computing environments
OS concepts 6 OS for various computing environmentsOS concepts 6 OS for various computing environments
OS concepts 6 OS for various computing environments
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Linux scheduler
Linux schedulerLinux scheduler
Linux scheduler
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Os Threads
Os ThreadsOs Threads
Os Threads
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Introduction to Makefile
Introduction to MakefileIntroduction to Makefile
Introduction to Makefile
 
Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
 
systemd
systemdsystemd
systemd
 
Introduction to Linux basic
Introduction to Linux basicIntroduction to Linux basic
Introduction to Linux basic
 
Linux operating system
Linux operating systemLinux operating system
Linux operating system
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 

Andere mochten auch

Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networkingSreenatha Reddy K R
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structureSreenatha Reddy K R
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first secondAlison Chaiken
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFBrendan Gregg
 
Unix nim-presentation
Unix nim-presentationUnix nim-presentation
Unix nim-presentationRajeev Ghosh
 
101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct locationAcácio Oliveira
 
021413 aix trends_jay_kruemcke
021413 aix trends_jay_kruemcke021413 aix trends_jay_kruemcke
021413 aix trends_jay_kruemckeJay Kruemcke
 
Embedded programming on r pi and arduino
Embedded programming on r pi and arduinoEmbedded programming on r pi and arduino
Embedded programming on r pi and arduinoYashin Mehaboobe
 
Alfred Project @LinuxDayNapoli2014
Alfred Project @LinuxDayNapoli2014Alfred Project @LinuxDayNapoli2014
Alfred Project @LinuxDayNapoli2014gbr1
 
Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...
Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...
Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...KohaGruppoItaliano
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linuxSreenatha Reddy K R
 
Uboot starts analysis
Uboot starts analysisUboot starts analysis
Uboot starts analysiscri fan
 
Linux System Administration Crash Course
Linux System Administration Crash CourseLinux System Administration Crash Course
Linux System Administration Crash CourseJason Cannon
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom BoardPatrick Bellasi
 
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3WE-IT TUTORIALS
 

Andere mochten auch (20)

Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first second
 
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPFLinux 4.x Tracing: Performance Analysis with bcc/BPF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
 
Unix nim-presentation
Unix nim-presentationUnix nim-presentation
Unix nim-presentation
 
101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location101 4.7 find system files and place files in the correct location
101 4.7 find system files and place files in the correct location
 
021413 aix trends_jay_kruemcke
021413 aix trends_jay_kruemcke021413 aix trends_jay_kruemcke
021413 aix trends_jay_kruemcke
 
Linux forensics
Linux forensicsLinux forensics
Linux forensics
 
Embedded programming on r pi and arduino
Embedded programming on r pi and arduinoEmbedded programming on r pi and arduino
Embedded programming on r pi and arduino
 
Alfred Project @LinuxDayNapoli2014
Alfred Project @LinuxDayNapoli2014Alfred Project @LinuxDayNapoli2014
Alfred Project @LinuxDayNapoli2014
 
Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...
Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...
Biblioteca Generale della Custodia di Terra Santa a Gerusalemme : Specifiche ...
 
Presentation on rhce
Presentation on rhcePresentation on rhce
Presentation on rhce
 
Access control list acl - permissions in linux
Access control list acl  - permissions in linuxAccess control list acl  - permissions in linux
Access control list acl - permissions in linux
 
Installing Aix
Installing AixInstalling Aix
Installing Aix
 
Uboot starts analysis
Uboot starts analysisUboot starts analysis
Uboot starts analysis
 
Linux System Administration Crash Course
Linux System Administration Crash CourseLinux System Administration Crash Course
Linux System Administration Crash Course
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
tybsc it sem 5 Linux administration notes of unit 1,2,3,4,5,6 version 3
 

Ähnlich wie Linux booting process - Linux System Administration

Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptxMohamedSaied877003
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloadingArpita Gupta
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processHari Shankar
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processsagarpdalvi
 
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 systempethkarakash3898
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in LinuxSiddhesh Palkar
 
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
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut iiplarsen67
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchSherif Mousa
 
Linux directory structure by jitu mistry
Linux directory structure by jitu mistryLinux directory structure by jitu mistry
Linux directory structure by jitu mistryJITU MISTRY
 

Ähnlich wie Linux booting process - Linux System Administration (20)

Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Linux basics
Linux basics Linux basics
Linux basics
 
Linux basics
Linux basics Linux basics
Linux basics
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
Linux startup
Linux startupLinux startup
Linux startup
 
Linux admin course
Linux admin courseLinux admin course
Linux admin course
 
Ch1 linux basics
Ch1 linux basicsCh1 linux basics
Ch1 linux basics
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
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
 
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
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in Linux
 
Linux booting sequence
Linux booting sequenceLinux booting sequence
Linux booting sequence
 
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
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
 
Linux directory structure by jitu mistry
Linux directory structure by jitu mistryLinux directory structure by jitu mistry
Linux directory structure by jitu mistry
 

Mehr von Sreenatha Reddy K R

Data science applications and usecases
Data science applications and usecasesData science applications and usecases
Data science applications and usecasesSreenatha Reddy K R
 
Linux security firewall and SELinux
Linux security firewall and SELinuxLinux security firewall and SELinux
Linux security firewall and SELinuxSreenatha Reddy K R
 
Linux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupLinux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupSreenatha Reddy K R
 
Linux System Administration - NFS Server
Linux System Administration - NFS ServerLinux System Administration - NFS Server
Linux System Administration - NFS ServerSreenatha Reddy K R
 
Linux System Administration - DNS
Linux System Administration - DNSLinux System Administration - DNS
Linux System Administration - DNSSreenatha Reddy K R
 

Mehr von Sreenatha Reddy K R (7)

Data science applications and usecases
Data science applications and usecasesData science applications and usecases
Data science applications and usecases
 
Linux security firewall and SELinux
Linux security firewall and SELinuxLinux security firewall and SELinux
Linux security firewall and SELinux
 
Mail server setup
Mail server setupMail server setup
Mail server setup
 
Linux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setupLinux System Administration - Web Server and squid setup
Linux System Administration - Web Server and squid setup
 
Linux System Administration - NFS Server
Linux System Administration - NFS ServerLinux System Administration - NFS Server
Linux System Administration - NFS Server
 
Linux System Administration - DNS
Linux System Administration - DNSLinux System Administration - DNS
Linux System Administration - DNS
 
DHCP and NIS
DHCP and NISDHCP and NIS
DHCP and NIS
 

Kürzlich hochgeladen

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 

Kürzlich hochgeladen (20)

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 

Linux booting process - Linux System Administration

  • 1. LINUX BOOTING PROCEDURE LINUX SYSTEM ADMINITRATION
  • 4. How computer startup? 4  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 5 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) 6  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. MBR (Master Boot Record) 8  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) 9
  • 10. MBR (Master Boot Record) 10  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 11  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 12  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) 13  bootman  GRUB  LILO  NTLDR  XOSL  BootX  loadlin  Gujin  Boot Camp  Syslinux  GAG
  • 14. GRUB: GRand Unified Bootloader 14  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 15 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. LILO: LInux LOader 17  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. Kernel image 19  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 turn 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 20  Process management  Memory management  Device management  System call
  • 21. Major functions flow for Linux kernel boot 21
  • 22. Init process 22  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 23  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 24
  • 25. Inittab file 25  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 26  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) 27
  • 28. rc#.d files 28  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 29  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 30  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
  • 33. FSSTND : (Filesystem standard) 33  All directories are grouped under the root entry "/"  root - The home directory for the root user  home - Contains the user's home directories along with directories for services  ftp  HTTP  samba
  • 34. FSSTND : (Filesystem standard) 34  bin - Commands needed during booting up that might be needed by normal users  sbin - Like bin but commands are not intended for normal users. Commands run by LINUX.  proc - This filesystem is not on a disk. It is a virtual filesystem that exists in the kernels imagination which is memory  1 - A directory with info about process number 1. Each process has a directory below proc.
  • 35. FSSTND : (Filesystem standard) 35  usr - Contains all commands, libraries, man pages, games and static files for normal operation.  bin - Almost all user commands. some commands are in /bin or /usr/local/bin.  sbin - System admin commands not needed on the root filesystem. e.g., most server programs.  include - Header files for the C programming language. Should be below /user/lib for consistency.  lib - Unchanging data files for programs and subsystems  local - The place for locally installed software and other files.  man - Manual pages  info - Info documents  doc - Documentation  tmp  X11R6 - The X windows system files. There is a directory similar to usr below this directory.  X386 - Like X11R6 but for X11 release 5
  • 36. FSSTND : (Filesystem standard) 36  boot - Files used by the bootstrap loader, LILO. Kernel images are often kept here.  lib - Shared libraries needed by the programs on the root filesystem  modules - Loadable kernel modules, especially those needed to boot the system after disasters.  dev - Device files  etc - Configuration files specific to the machine.  skel - When a home directory is created it is initialized with files from this directory  sysconfig - Files that configure the linux system for devices.
  • 37. FSSTND : (Filesystem standard) 37  var - Contains files that change for mail, news, printers log files, man pages, temp files  file  lib - Files that change while the system is running normally  local - Variable data for programs installed in /usr/local.  lock - Lock files. Used by a program to indicate it is using a particular device or file  log - Log files from programs such as login and syslog which logs all logins and logouts.  run - Files that contain information about the system that is valid until the system is next booted  spool - Directories for mail, printer spools, news and other spooled work.  tmp - Temporary files that are large or need to exist for longer than they should in /tmp.  catman - A cache for man pages that are formatted on demand
  • 38. FSSTND : (Filesystem standard) 38  mnt - Mount points for temporary mounts by the system administrator.  tmp - Temporary files. Programs running after bootup should use /var/tmp
  • 39. References 39  http://en.wikipedia.org/  http://www-128.ibm.com/developerworks/linux/library/l-linuxboot/  http://yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html  http://www.pycs.net/lateral/stories/23.html  http://www.secguru.com/files/linux_file_structure  http://www.comptechdoc.org/os/linux/commands/linux_crfilest.html
  • 40. THANK YOU Sreenatha Reddy K R krsreenatha@gmail.com 40