System Startup and Shutdown

Slides:



Advertisements
Similar presentations
Introduction to Linux Linux startup process Unix Shells and scripts.
Advertisements

Basic Unix system administration
Booting and Shuting Down WeeSan Lee. Roadmap Bootstrapping Boot Loaders Startup/Init Scripts Reboot & Shutdown Q&A.
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
Week 8 System Initialization and X Windows. Objectives  Summarize the major steps necessary to boot a Linux system  Configure the LILO and GRUB boot.
Booting and Shutting Down the UNIX Operating System Arcadio A. Sincero Jr. 6/6/2001 CMSC 691X, Section 6080.
Linux+ Guide to Linux Certification Chapter Nine System Initialization.
Linux Booting Procedure
Linux+ Guide to Linux Certification, Second Edition
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Second Edition
Booting And Shutting Down. Bootstrapping  Bootstrapping is standard term for “starting up a computer”  During bootstrapping the kernel is loaded into.
Chapter 2 Booting and Shutting Down Kim Grempler (Sections 2.0 to 2.3) Leon Dague (Sections 2.4 to 2.7)
 Starting up a computer › Load kernel into memory and execute it. (1)BIOS load and run the MBR (Master Boot Record) (2)MBR searches for the bootable.
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Linux Boot Up Process Bootstrapping –Bootstrapping is the standard term for “ starting up a computer”. During bootstrapping, the kernel is loaded into.
1 Web Server Administration Chapter 3 Installing the Server.
Starting and Stopping Linux. Boot Process BIOS initializes hardware –Loads the boot sector MBR loads the bootloader –Point to kernel Kernel initializes.
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Guide To UNIX Using Linux Third Edition
Va-scanCopyright 2002, Marchany Unit 4 – The Boot Process Randy Marchany VA Tech Computing Center.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.
Linux+ Guide to Linux Certification, Third Edition
CompTIA Linux+ Certification
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Booting and boot levels
Hands-On Microsoft Windows Server 2008
Linux Booting Procedure
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
System Startup & Shutdown Objectives –to interpret the Unix startup and shutdown configuration files –to be able to create a customised run level Contents.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
1 Linux Basics for Networking. 2 Module - Linux Basics for Networking ♦ Overview This module focuses on the basics of networking using Redhat Enterprise.
2/19/2003 Lecture 3 Computer System Administration Lecture 3 Setup (continued)
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
Chapter Two Exploring the UNIX File System and File Security.
IT2204: Systems Administration I 8b).Booting (Supplementary Notes)
Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
System Startup & Shutdown
ITI Chris Uriarte ITI-481: Unix Administration Meeting 2 Rutgers University Center for Applied Computer Technologies Chris Uriarte, Instructor.
CIS Lesson 5 Lesson 5 New Skills Boot time GRUB edits (review) Changing BIOS boot order on a VM (review) Mounting CD ISO and floppy Image files on.
Linux Startup Process Presenter: Dipu Gupta.
Review Please turn in any homework/practicals you may have Folders Paths Services Processes.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
Genesis: From Raw Hardware to Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2009 by Scott Orr and the Trustees of Indiana University.
Unix System Administration Booting and Shutting Down Chapter 2.
1 Version 3.1 Module 5 Managing Cisco IOS Software.
Sys Admin Course Service Management Fourie Joubert.
Lecture 4 & 5: System Architecture  File systems  Devices  File system permissions  Review of Linux runlevels  In-class exercise.
Basic UNIX system administration CS 2204 Class meeting 14 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
Using Networks. Assignment Issues find syntax Permissions HW4 3c /proc vs /tmp vs /var.
Linux Introduction Linux was developed in the early 1990’s by Linus Torvald computer science student at the University of Helsinki Linux is distributed.
The Linux startup process Jerry Feldman The Linux Expertise Center Hewlett-Packard Company Document produced via OpenOffice.org.
System Administration Startup Process. Why Care? ● Every process on your system comes about by following a specific chain of events from the machine startup.
LPI 2010 NLLGG Trainer: Jeroen van Pelt Bijeenkomst 3: Systeem opstarten en werken met filesystemen
The Linux Kernel About 6 million lines of code
Guide to Linux Installation and Administration, 2e
Linux Start Sequence Summary
Chapter 4 Booting and Shutdown
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Exploring the UNIX File System and File Security
Genesis: From Raw Hardware to Processes
OPS235: Week 1 Installing Linux (Lab1: Investigations 4 - )
SUSE Linux Enterprise Desktop Administration
Objectives Topic 2.6 Understanding the boot process
Presentation transcript:

System Startup and Shutdown Chapter 8 System Startup and Shutdown

Objectives Define and explain bootstrap procedure Explain single and multi-user run levels Identify and configure system startup files Perform a clean shutdown procedure Explain and define the maintainance mode Libraries provide functionality for programs compiled under Linux. Understanding how libraries work, the different types of linking, and how to identify andresolve library issues is important for maintaining a system

Standard Boot Process (LILO) System load the Linux bootstrap from default boot device, LILO, which resides in Master Boot Record of hard drive The bootstrap program has ability to boot Linux to single-user or multi-user mode After the bootstrap has loaded the kernel ( stored in the /boot or / partition ) into memory, it relinquishes control to this system

Standard Boot Process (LILO) The Linux system initializes physical devices, virtual memory controller, and its internal control tables for processes, files, .. The init process is started and it starts all other user processes Before handing control over init, the kernel will create any other kernel threads

Boot Problems Sometimes, lilo will not able to boot the system, it prints the letters LILO on screen. The problems: disk corrupted, the information on disk geometry is incorrect, or since the new kernel image is installed Troubleshooting: boot the system from bootable CD or floppy and try to repair disk problems or correct the /etc/lilo.conf

Manual Boot There are times when lilo has loaded the kernel but the kernel does NOT work properly because some of hardware can not be found,…It’s possible to pass configuration to the kernel through lilo at lilo command line when booting:

Manual Boot List of some important boot prompt arguments : root=/dev/hda1 Tell the kernel which device to be mounted as root file system ramdisk_size=2MB Define maximum of ramdisk (up to 4MB ) single This actually is a parameter passed to init, causes the system to boot in single-user mode mem=192MB Tell the kernel amount of memory ( RAM size ) aha1542=0x334 Set the I/O port address for SCSI Interface Card hdc=cdrom Specifies the third disk device is a CD-ROM Instead of typing them at each reboot, these arguments can be included into the lilo.conf : append=“hdc=cdrom”

Manual Boot More information about boot prompt and arguments can be found at: http://www.tldp.org/HOWTO/BootPrompt-HOWTO.html Refers to man 5 lilo.conf for a detailed information about arguments

Startup Flow Control It used to run Linux system at level 3

Run Levels Runlevel 0 /etc/rc.d/rc0.d Shutdown mode. Tasks: killing all processes and unmounting file systems Runlevel 1 /etc/rc.d/rc1.d Single-user mode, generally used by system administrator when doing maintenance/recovery of the system Runlevel 2 /etc/rc.d/rc2.d Multi-user mode, some network services are not started : NFS, … Runlevel 3 /etc/rc.d/rc3.d Multi-user mode, all network services are started

Run Levels Runlevel 4 /etc/rc.d/rc4.d User defined run level Multi-user X11 mode. All services that are started in run level 3 are generally started Runlevel 6 /etc/rc.d/rc6.d Reboot runlevel. Runlevel s/S /etc/rc.d/rcS.d Single-user mode. Runlevel a/b/c Pseudo states. (rarely used)

Run Levels Using Use /sbin/runlevel to get current run level How to start X window ? RedHat and TurboLinux : # init 5 Debian : # init 2 SuSE and Caldera: # init 3 Slackware : # init 4 Reboot : # init 6 Shutdown : # init 0 To manual set default run level at boot time, open /etc/inittab and look for this line : id:5:initdefault:

The init Control File: /etc/inittab The init process uses /etc/inittab as its control file : This is a text file, can be edited by the system admin init must be told about changes to /etc/inittab by: # init q One line per process to run at define run levels Lines starting with ‘#’ are comments Processes run from /etc/inittab are daemons Init read /etc/inittab every time the run level is changed

Structure of /etc/inittab Each line has 4 fields seperated by colons: id:level:action:command id Unique identifier for line (up to 4 alphanumeric characters) level Run level(s) to activate processs action Keyword for how to run process command Full path name and parameters of command to be executed

Structure of /etc/inittab The main inittab action keywords are: off Do not run this command. Used to retain an entry but to disable it. wait Run command and wait for completion once Run command but do not wait. Daemons processes are often started this way respawn Run command; If process exists, then rerun it. Used for commands that have to start again after completion, like getty and ttymon sysinit Run command at first init boot Run command at boot time but do not wait bootwait Like boot but wait for completion initdefault Defines default boot level

/etc/inittab # more /etc/inittab id:3:initdefault: ... id:3:initdefault: #System initialization si::sysinit:/etc/rc.d/rc.sysinit l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 l3:3:wait:/etc/rc.d/rc 3 l4:4:wait:/etc/rc.d/rc 4 l5:5:wait:/etc/rc.d/rc 5 l6:6:wait:/etc/rc.d/rc 6

Run Command Scripts The run commands scripts are kept under /etc/rc.d/ and are initiated by init with directions from /etc/inittab The script called rc itself runs startup programs in sub-directories under /etc/rc.d/ rc 0 looks in /etc/rc.d/rc0.d for runlevel 0 rc 1 looks in /etc/rc.d/rc1.d for runlevel 1 rc 2 looks in /etc/rc.d/rc2.d for runlevel 2 etc …

Run Command Scripts These startup programs are symbolic links to the actual scripts in the /etc/init.d/ The startup link names are formatted: first character is S (started) or K (killed or stopped), the next two digits identify the order that scripts are executed by rc program

Changing Run Levels Use init command to change between run levels. Syntax : init <runlevel> Examples : # init 0 Shutdown system # init 6 Reboot system # init 3 Change to runlevel 3, multi-user text mode # init 5 Change to runlevel 5, multi-user X11 mode

Shuting Down Use shutdown commansd. It differs from “init 0” when allowing to specify time to exit, warn users what happens, … Make sure that you follow the proper shutdown procedure. Do NOT simply shut off the power # shutdown Default system shutdown (run level 1) # shutdown –r now Reboot the system now (run level 6) # shutdown –h 2:00 Halt the system at 2:00AM (run level 0)

Maintenance Mode When the system doesn’t work because problems. The simplest and best solution is to shut down the system to maintenance mode (run level 1) or reboot the system to single-user mode (run level S) and try to fix problems

Summary Define and explain bootstrap procedure Explain single and multi-user run levels Identify and configure system startup files Perform a clean shutdown procedure Explain and define the maintainance mode Libraries provide functionality for programs compiled under Linux. Understanding how libraries work, the different types of linking, and how to identify andresolve library issues is important for maintaining a system