SlideShare a Scribd company logo
Booting and Shut Down
of
Operating System
Prepared By
Prof.Bhushan Pawar
MESCOE,Pune(Wadia Campus)
bhushan.pawar@mescoepune.org
1Prof.Bhushan Pawar
Bootstrapping
Standard term for starting up a computer.
During bootstrapping, the kernel is loaded into
memory and begins to execute.
When a computer is turned on, it first executes
boot code that is stored in ROM.
The kernel probes the system’s hardware and
then spawns the system’s init process, which
is always process number 1.
2Prof.Bhushan Pawar
Recovery boot to a shell
 In normal operation, systems boot themselves
independently and are then accessed remotely by
administrators.
 If a disk crashes, administrators need a recovery tool.
 Then instead of shooting for full system operation,
UNIX systems can boot just run a shell on the system
console known as booting to single-user mode, recovery
mode, or maintenance mode.
 Single-user mode does not allow network operation we
need physical access to the system console to use it.
3Prof.Bhushan Pawar
Recovery boot to a shell (Contin…)
On most systems, you request a boot to single-
user mode by passing an argument to the
kernel at boot time. If the system is already up
and running, you can bring it down to single-
user mode with the shutdown or telinit
command.
4Prof.Bhushan Pawar
Steps in the boot process
• consists of 6 distinct phases
– Reading of the boot loader from the master boot
record
– Loading and initialization of the kernel
– Device detection and configuration
– Creation of kernel processes
– Administrator intervention (single-user mode
only)
– Execution of system startup scripts
5Prof.Bhushan Pawar
Kernel initialization
• First bootstrapping task is to get kernel into
memory so that it can be executed.
• The pathname of the kernel /boot/vmlinuz
• System ROM loads a small boot program into
memory from disk. This program is called as
boot loader.
6Prof.Bhushan Pawar
Creation of kernel processes
Kernel process created through the normal
system fork mechanism
init is always pid 1. Most UNIX systems have
sched as process 0.
7Prof.Bhushan Pawar
Operator intervention
(recovery mode only)
• If the system is to be brought in recovery
mode, a command-line flag passed by the
kernel.
• During a single-user boot on same systems,
you are prompted to enter the root password.
If you enter the right password, the system
spawns a root shell.
• You can execute commands in same way as
when logged in on a fully booted system.
8Prof.Bhushan Pawar
Booting PC
• When a machine boots, it begins by executing
code stored in ROMs.
• The initial boot code is generally called a BIOS
(Basic Input/Output System)
• Actually, a PC has several levels of BIOS: one
for the machine itself, one for the video card,
one for the SCSI card if the system has one,
and sometimes components for other
peripherals such as network cards.
9Prof.Bhushan Pawar
Booting PC (Continue…)
• Built-in BIOS knows about some of the devices
that live on the motherboard. E.g. IDE(integrated
development environment), SATA Controller,
network interfaces.
• The BIOS normally lets you select which devices
you want the system to try to boot from. You can
usually specify an ordered list of preferences such
as “Try to boot from a DVD, then a USB drive,
then the hard disk.” Network booting with
PXE(Preboot eXecution Environment) is also a
common option.
10Prof.Bhushan Pawar
Booting PC (Continue…)
• Once the BIOS has figured device to boot from
it tries to read the first block of the device.
This 512-byte segment is known as the master
boot record or MBR. The MBR contains a
program that tells the computer from which
partition to load a secondary boot program,
the “boot loader.”
11Prof.Bhushan Pawar
Booting PC (Continue…)
• The default MBR contains a simple program
that tells the computer to get its boot loader
from the first partition on the disk.
• Once the MBR has chosen a partition to boot
from, it tries to load the boot loader specific
to that partition. This loader is then
responsible for loading the kernel.
12Prof.Bhushan Pawar
GRUB: GRAND UNIFIED BOOT LOADER
• GRUB, developed by the GNU project
• It is the default boot loader for UNIX & LINUX
systems with Intel Processors.
• GRUB’s job is to choose a kernel from a
previously assembled list and to load that
kernel with options specified by the
administrator.
13Prof.Bhushan Pawar
14
GRUB Loader
Prof.Bhushan Pawar
GRUB Loader (Continue..)
• By default, GRUB reads its default boot
configuration from /boot/grub/menu.lst or
/boot/grub/grub.conf
• GRUB allows dynamic changes at each system
boot.
• The menu.lst and grub.conf files are slightly
different but have a similar syntax. Red Hat
systems use grub.conf, and Solaris, SUSE, and
Ubuntu still use menu.lst
15Prof.Bhushan Pawar
GRUB Loader (Continue..)
• To enter command-line mode, type c from the GRUB boot
screen.
GRUB command-line options
Command Meaning
reboot Reboots the system
find Finds files on all mountable partitions
root Specifies the root device (a partition)
kernel Loads a kernel from the root device
help Gets interactive help for a command
boot Boots the system from the specified kernel image
16Prof.Bhushan Pawar
BOOTING TO SINGLE-USER MODE
• The beginnings of the boot process are system
dependent. Systems with non-Intel processors have
custom boot loader software.
• Single-user mode with GRUB
– don’t need to use the command line.
– boot options should be easily modifiable and
decided on the ‘a’ key as the appropriate tool.
– At the GRUB splash screen, highlight the desired
kernel and press ‘a’ to append to the boot
options.
17Prof.Bhushan Pawar
Single-user mode with GRUB
(Continue..)
• To boot into single-user mode, add the single
(or -s on Solaris) flag to the end of the existing
kernel options.
• E.g
grub append> ro root=LABEL=/ rhgb quiet single
18Prof.Bhushan Pawar
Single-user mode with GRUB
(Continue..)
• rhgb = redhat graphical boot - This is a GUI mode booting
screen with most of the information hidden while the user
sees a rotating activity icon spining and brief information as to
what the computer is doing.
quiet = hides the majority of boot messages before rhgb
starts. These are supposed to make the common user more
comfortable. They get alarmed about seeing the kernel and
initializing messages, so they hide them for their comfort.
19Prof.Bhushan Pawar
Single-user mode on SPARC
(scalable processor architecture)
• To interrupt the boot procedure and enter the
OpenBoot PROM on Sun hardware, press the L1 and
‘a’ keys simultaneously. L1 is sometimes labeled
STOP on modern Sun keyboards.
• Type boot -s to boot to single-user mode.
20Prof.Bhushan Pawar
WORKING WITH STARTUP SCRIPTS
• After exiting from single-user mode init executes the
system startup scripts & that are interpreted by sh or
bash.
• Systems use approach in which scripts are numbered
and executed.
• Scripts are kept in /etc/init.d, and links to them are
made in the directories /etc/rc0.d, /etc/rc1.d
21Prof.Bhushan Pawar
WORKING WITH STARTUP SCRIPTS
(Continue…)
• Tasks that are often performed in the startup
scripts
Setting the name of the computer
Setting the time zone
Checking the disks with fsck (i.e file system check)
Mounting the system’s disks
Removing old files from the /tmp directory
Configuring network interfaces
Starting up daemons and network services
Prof.Bhushan Pawar 22
Rebooting & Shutting Down
• On consumer-oriented operating systems,
rebooting the operating system is an
appropriate first course of treatment for many
problems.
• Whenever we modify a startup script or make
significant system changes, we should reboot
just to make sure that the system comes up
successfully.
Prof.Bhushan Pawar 23
shutdown: the proper way to halt
the system
• It is the safest, most considerate, and most thorough
command to initiate a halt or reboot or to return the
system to single-user mode.
• You can ask shutdown to wait awhile before shutting
down the system. During the waiting period,
shutdown sends messages to logged-in users at
progressively shorter intervals, warning them of the
impending downtime.
• Most versions of shutdown, specify whether the
machine should halt, go to single-user mode, or
reboot. (Path is /sbin/shutdown)
Prof.Bhushan Pawar 24
halt and reboot: simpler ways to
shut down
• The halt command performs the essential duties
required to shut the system down. It is called by
shutdown -h but can also be used by itself.
• Halt logs the shutdown, kills nonessential processes,
executes the sync system call (called by and
equivalent to the sync command), waits for file
system writes to complete, and then halts the kernel.
• halt -n prevents the sync call.
Prof.Bhushan Pawar 25
halt and reboot: simpler ways to
shut down (Continue…)
• reboot is almost identical to halt, but it causes
the machine to reboot instead of halting.
• Reboot is called by shutdown -r.
Prof.Bhushan Pawar 26

More Related Content

What's hot

Linux Administration
Linux AdministrationLinux Administration
Linux Administration
Harish1983
 
Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)
k33a
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
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
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
Sadia Bashir
 
Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in Linux
Knoldus Inc.
 
Linux kernel
Linux kernelLinux kernel
Linux file system
Linux file systemLinux file system
Linux file system
Md. Tanvir Hossain
 
Presentation on Operating System & its Components
Presentation on Operating System & its ComponentsPresentation on Operating System & its Components
Presentation on Operating System & its ComponentsMahmuda Rahman
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
Henry Osborne
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administrator
Aisha Talat
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
Emertxe Information Technologies Pvt Ltd
 
Boot process
Boot processBoot process
Boot process
Salman Memon
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
Wayne Jones Jnr
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
Nishant Munjal
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
iamumr
 
13 DHCP Configuration in Linux
13 DHCP Configuration in Linux13 DHCP Configuration in Linux
13 DHCP Configuration in Linux
Hameda Hurmat
 

What's hot (20)

Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
Process management in os
Process management in osProcess management in os
Process management in os
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in Linux
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Presentation on Operating System & its Components
Presentation on Operating System & its ComponentsPresentation on Operating System & its Components
Presentation on Operating System & its Components
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
User and groups administrator
User  and  groups administratorUser  and  groups administrator
User and groups administrator
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
Boot process
Boot processBoot process
Boot process
 
Chapter 10 - File System Interface
Chapter 10 - File System InterfaceChapter 10 - File System Interface
Chapter 10 - File System Interface
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
 
13 DHCP Configuration in Linux
13 DHCP Configuration in Linux13 DHCP Configuration in Linux
13 DHCP Configuration in Linux
 

Viewers also liked

Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
Dominique Cimafranca
 
Cpu registers
Cpu registersCpu registers
Cpu registers
Puneet Rajput
 
Operating systems
Operating systemsOperating systems
Operating systems
Chinmay Raul
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
ajeela mushtaq
 
Kernel I/O subsystem
Kernel I/O subsystemKernel I/O subsystem
Kernel I/O subsystem
AtiKa Bhatti
 
Spring Boot with Quartz
Spring Boot with QuartzSpring Boot with Quartz
Spring Boot with Quartz
David Kiss
 
Registers
RegistersRegisters
Registers
Sahil Bansal
 
Docker allocating resources
Docker allocating resourcesDocker allocating resources
Docker allocating resources
Mohammadreza Amini
 
Memory management
Memory managementMemory management
Memory managementRasi123
 
File access methods.54
File access methods.54File access methods.54
File access methods.54myrajendra
 
Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
Alea Soluciones, S.L.
 

Viewers also liked (13)

Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
 
5. boot process
5. boot process5. boot process
5. boot process
 
Cpu registers
Cpu registersCpu registers
Cpu registers
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
 
Kernel I/O subsystem
Kernel I/O subsystemKernel I/O subsystem
Kernel I/O subsystem
 
Spring Boot with Quartz
Spring Boot with QuartzSpring Boot with Quartz
Spring Boot with Quartz
 
Registers
RegistersRegisters
Registers
 
Docker allocating resources
Docker allocating resourcesDocker allocating resources
Docker allocating resources
 
Memory management
Memory managementMemory management
Memory management
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 
File organization
File organizationFile organization
File organization
 
Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
 

Similar to Booting & shut down,

Unit 4 booting & shut down
Unit 4 booting & shut downUnit 4 booting & shut down
Unit 4 booting & shut down
Bhushan Pawar -Java Trainer
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
sourav verma
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting Process
Hardeep Bhurji
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloadingArpita Gupta
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
brusnigin
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
Acácio Oliveira
 
Linux Boot Process
Linux Boot ProcessLinux Boot Process
Linux Boot Process
darshhingu
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
Rishabh5121993
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
Anando Kumar Paul
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
LinuxConcept
 
Linux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involvedLinux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involved
divyammo
 
Computer system organisation
Computer system organisationComputer system organisation
Computer system organisation
RakshiyaRamya
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
Dhaval Kaneria
 
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
 
Linux booting process
Linux booting processLinux booting process
Linux booting process
Prashant Hegde
 
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
 
BOOTING.ppt
BOOTING.pptBOOTING.ppt
BOOTING.ppt
TripleRainbow
 

Similar to Booting & shut down, (20)

Unit 4 booting & shut down
Unit 4 booting & shut downUnit 4 booting & shut down
Unit 4 booting & shut down
 
Linux booting process!!
Linux booting process!!Linux booting process!!
Linux booting process!!
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting Process
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
 
Linux Boot Process
Linux Boot ProcessLinux Boot Process
Linux Boot Process
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
 
Linux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involvedLinux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involved
 
Computer system organisation
Computer system organisationComputer system organisation
Computer system organisation
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Linux booting process
Linux booting processLinux booting process
Linux booting process
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
Ch04
Ch04Ch04
Ch04
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in Linux
 
BOOTING.ppt
BOOTING.pptBOOTING.ppt
BOOTING.ppt
 

Recently uploaded

PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
SriSurya50
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
kitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptxkitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptx
datarid22
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 

Recently uploaded (20)

PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptxFresher’s Quiz 2023 at GMC Nizamabad.pptx
Fresher’s Quiz 2023 at GMC Nizamabad.pptx
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
kitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptxkitab khulasah nurul yaqin jilid 1 - 2.pptx
kitab khulasah nurul yaqin jilid 1 - 2.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 

Booting & shut down,

  • 1. Booting and Shut Down of Operating System Prepared By Prof.Bhushan Pawar MESCOE,Pune(Wadia Campus) bhushan.pawar@mescoepune.org 1Prof.Bhushan Pawar
  • 2. Bootstrapping Standard term for starting up a computer. During bootstrapping, the kernel is loaded into memory and begins to execute. When a computer is turned on, it first executes boot code that is stored in ROM. The kernel probes the system’s hardware and then spawns the system’s init process, which is always process number 1. 2Prof.Bhushan Pawar
  • 3. Recovery boot to a shell  In normal operation, systems boot themselves independently and are then accessed remotely by administrators.  If a disk crashes, administrators need a recovery tool.  Then instead of shooting for full system operation, UNIX systems can boot just run a shell on the system console known as booting to single-user mode, recovery mode, or maintenance mode.  Single-user mode does not allow network operation we need physical access to the system console to use it. 3Prof.Bhushan Pawar
  • 4. Recovery boot to a shell (Contin…) On most systems, you request a boot to single- user mode by passing an argument to the kernel at boot time. If the system is already up and running, you can bring it down to single- user mode with the shutdown or telinit command. 4Prof.Bhushan Pawar
  • 5. Steps in the boot process • consists of 6 distinct phases – Reading of the boot loader from the master boot record – Loading and initialization of the kernel – Device detection and configuration – Creation of kernel processes – Administrator intervention (single-user mode only) – Execution of system startup scripts 5Prof.Bhushan Pawar
  • 6. Kernel initialization • First bootstrapping task is to get kernel into memory so that it can be executed. • The pathname of the kernel /boot/vmlinuz • System ROM loads a small boot program into memory from disk. This program is called as boot loader. 6Prof.Bhushan Pawar
  • 7. Creation of kernel processes Kernel process created through the normal system fork mechanism init is always pid 1. Most UNIX systems have sched as process 0. 7Prof.Bhushan Pawar
  • 8. Operator intervention (recovery mode only) • If the system is to be brought in recovery mode, a command-line flag passed by the kernel. • During a single-user boot on same systems, you are prompted to enter the root password. If you enter the right password, the system spawns a root shell. • You can execute commands in same way as when logged in on a fully booted system. 8Prof.Bhushan Pawar
  • 9. Booting PC • When a machine boots, it begins by executing code stored in ROMs. • The initial boot code is generally called a BIOS (Basic Input/Output System) • Actually, a PC has several levels of BIOS: one for the machine itself, one for the video card, one for the SCSI card if the system has one, and sometimes components for other peripherals such as network cards. 9Prof.Bhushan Pawar
  • 10. Booting PC (Continue…) • Built-in BIOS knows about some of the devices that live on the motherboard. E.g. IDE(integrated development environment), SATA Controller, network interfaces. • The BIOS normally lets you select which devices you want the system to try to boot from. You can usually specify an ordered list of preferences such as “Try to boot from a DVD, then a USB drive, then the hard disk.” Network booting with PXE(Preboot eXecution Environment) is also a common option. 10Prof.Bhushan Pawar
  • 11. Booting PC (Continue…) • Once the BIOS has figured device to boot from it tries to read the first block of the device. This 512-byte segment is known as the master boot record or MBR. The MBR contains a program that tells the computer from which partition to load a secondary boot program, the “boot loader.” 11Prof.Bhushan Pawar
  • 12. Booting PC (Continue…) • The default MBR contains a simple program that tells the computer to get its boot loader from the first partition on the disk. • Once the MBR has chosen a partition to boot from, it tries to load the boot loader specific to that partition. This loader is then responsible for loading the kernel. 12Prof.Bhushan Pawar
  • 13. GRUB: GRAND UNIFIED BOOT LOADER • GRUB, developed by the GNU project • It is the default boot loader for UNIX & LINUX systems with Intel Processors. • GRUB’s job is to choose a kernel from a previously assembled list and to load that kernel with options specified by the administrator. 13Prof.Bhushan Pawar
  • 15. GRUB Loader (Continue..) • By default, GRUB reads its default boot configuration from /boot/grub/menu.lst or /boot/grub/grub.conf • GRUB allows dynamic changes at each system boot. • The menu.lst and grub.conf files are slightly different but have a similar syntax. Red Hat systems use grub.conf, and Solaris, SUSE, and Ubuntu still use menu.lst 15Prof.Bhushan Pawar
  • 16. GRUB Loader (Continue..) • To enter command-line mode, type c from the GRUB boot screen. GRUB command-line options Command Meaning reboot Reboots the system find Finds files on all mountable partitions root Specifies the root device (a partition) kernel Loads a kernel from the root device help Gets interactive help for a command boot Boots the system from the specified kernel image 16Prof.Bhushan Pawar
  • 17. BOOTING TO SINGLE-USER MODE • The beginnings of the boot process are system dependent. Systems with non-Intel processors have custom boot loader software. • Single-user mode with GRUB – don’t need to use the command line. – boot options should be easily modifiable and decided on the ‘a’ key as the appropriate tool. – At the GRUB splash screen, highlight the desired kernel and press ‘a’ to append to the boot options. 17Prof.Bhushan Pawar
  • 18. Single-user mode with GRUB (Continue..) • To boot into single-user mode, add the single (or -s on Solaris) flag to the end of the existing kernel options. • E.g grub append> ro root=LABEL=/ rhgb quiet single 18Prof.Bhushan Pawar
  • 19. Single-user mode with GRUB (Continue..) • rhgb = redhat graphical boot - This is a GUI mode booting screen with most of the information hidden while the user sees a rotating activity icon spining and brief information as to what the computer is doing. quiet = hides the majority of boot messages before rhgb starts. These are supposed to make the common user more comfortable. They get alarmed about seeing the kernel and initializing messages, so they hide them for their comfort. 19Prof.Bhushan Pawar
  • 20. Single-user mode on SPARC (scalable processor architecture) • To interrupt the boot procedure and enter the OpenBoot PROM on Sun hardware, press the L1 and ‘a’ keys simultaneously. L1 is sometimes labeled STOP on modern Sun keyboards. • Type boot -s to boot to single-user mode. 20Prof.Bhushan Pawar
  • 21. WORKING WITH STARTUP SCRIPTS • After exiting from single-user mode init executes the system startup scripts & that are interpreted by sh or bash. • Systems use approach in which scripts are numbered and executed. • Scripts are kept in /etc/init.d, and links to them are made in the directories /etc/rc0.d, /etc/rc1.d 21Prof.Bhushan Pawar
  • 22. WORKING WITH STARTUP SCRIPTS (Continue…) • Tasks that are often performed in the startup scripts Setting the name of the computer Setting the time zone Checking the disks with fsck (i.e file system check) Mounting the system’s disks Removing old files from the /tmp directory Configuring network interfaces Starting up daemons and network services Prof.Bhushan Pawar 22
  • 23. Rebooting & Shutting Down • On consumer-oriented operating systems, rebooting the operating system is an appropriate first course of treatment for many problems. • Whenever we modify a startup script or make significant system changes, we should reboot just to make sure that the system comes up successfully. Prof.Bhushan Pawar 23
  • 24. shutdown: the proper way to halt the system • It is the safest, most considerate, and most thorough command to initiate a halt or reboot or to return the system to single-user mode. • You can ask shutdown to wait awhile before shutting down the system. During the waiting period, shutdown sends messages to logged-in users at progressively shorter intervals, warning them of the impending downtime. • Most versions of shutdown, specify whether the machine should halt, go to single-user mode, or reboot. (Path is /sbin/shutdown) Prof.Bhushan Pawar 24
  • 25. halt and reboot: simpler ways to shut down • The halt command performs the essential duties required to shut the system down. It is called by shutdown -h but can also be used by itself. • Halt logs the shutdown, kills nonessential processes, executes the sync system call (called by and equivalent to the sync command), waits for file system writes to complete, and then halts the kernel. • halt -n prevents the sync call. Prof.Bhushan Pawar 25
  • 26. halt and reboot: simpler ways to shut down (Continue…) • reboot is almost identical to halt, but it causes the machine to reboot instead of halting. • Reboot is called by shutdown -r. Prof.Bhushan Pawar 26