SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Linux Presentation
Linux PresentationLinux Presentation
Linux Presentationnishantsri
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commandsSagar Kumar
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Présentation ubuntu 12.10 PDF
Présentation ubuntu  12.10 PDFPrésentation ubuntu  12.10 PDF
Présentation ubuntu 12.10 PDFMohamed Ben Bouzid
 
Linux Boot Process
Linux Boot ProcessLinux Boot Process
Linux Boot Processdarshhingu
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux TroubleshootingKeith Wright
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting processSiddharth Jain
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linuxPapu Kumar
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemSadia Bashir
 
Install ubuntu
Install ubuntuInstall ubuntu
Install ubuntupramoddps
 

Mais procurados (20)

Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Présentation ubuntu 12.10 PDF
Présentation ubuntu  12.10 PDFPrésentation ubuntu  12.10 PDF
Présentation ubuntu 12.10 PDF
 
Linux Boot Process
Linux Boot ProcessLinux Boot Process
Linux Boot Process
 
Linux OS presentation
Linux OS presentationLinux OS presentation
Linux OS presentation
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Boot process
Boot processBoot process
Boot process
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting process
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
comparing windows and linux ppt
comparing windows and linux pptcomparing windows and linux ppt
comparing windows and linux ppt
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
Linux booting process
Linux booting processLinux booting process
Linux booting process
 
Install ubuntu
Install ubuntuInstall ubuntu
Install ubuntu
 

Destaque

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
 

Destaque (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 Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
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
 

Semelhante a Linux booting process - Linux System Administration

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
 

Semelhante a Linux booting process - Linux System Administration (20)

Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
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
 
linux file system
linux file systemlinux file system
linux file system
 
Linux file system
Linux file systemLinux file system
Linux file system
 

Mais de 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
 

Mais de 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
 

Último

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 

Último (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 

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