System Administration Startup Process. Why Care? ● Every process on your system comes about by following a specific chain of events from the machine startup.

Slides:



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

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.
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
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.
Va-scanCopyright 2002, Marchany Unit 4 – The Boot Process Randy Marchany VA Tech Computing Center.
System Startup and Shutdown
1 Semester 2 Module 2 Introduction to Routers Yuda college of business James Chen
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.
Linux Filesystem Management
Linux+ Guide to Linux Certification, Third Edition
CompTIA Linux+ Certification
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Module 3: Resolving Boot Process Issues. Overview Understanding the Boot Process Using Advanced Boot Options Using the Boot.ini file to Change Startup.
Booting and boot levels
Hands-On Microsoft Windows Server 2008
System Startup & Shutdown Objectives –to interpret the Unix startup and shutdown configuration files –to be able to create a customised run level Contents.
itec 400 System Startup/Shutdown
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.
CIT 470: Advanced Network and System AdministrationSlide #1 CIT 470: Advanced Network and System Administration Booting and Runlevels.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
The Linux Operating System Lecture 3: Becoming the Superuser and Users and Groups The Tonga Institute of Higher Education.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 6 Manage Linux Processes and Services.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
System Startup & Shutdown
UNIX (Linux) Introduction Module-1. OS Kernel In computing, the kernel is the central component of OS. It is a bridge between applications and the actual.
ITI Chris Uriarte ITI-481: Unix Administration Meeting 2 Rutgers University Center for Applied Computer Technologies Chris Uriarte, Instructor.
More on file systems, Booting Todd Kelley CST8177– Todd Kelley1.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 9: Basic Linux Administration Chapter 11: System Administration: Core Concepts Chapter 16:
Linux Startup Process Presenter: Dipu Gupta.
COMP075 OS2 Managing Linux Services. Services? Services are processes that start, usually when the system starts, and run, usually, until the system stops.
CIT 500: IT Fundamentals Startup. Slide #2 Topics 1.Booting 2.Bootstrap loaders 3.Run levels 4.Startup scripts 5.Shutdown and reboot.
Linux booting How does it work?. First the bootloader The first step is for the bootloader to run BIOS indicates what devices to examine Bootstrap program.
Chap 11 System Admin: Core Concepts. A well-maintained system… Runs quickly enough so users don’t get frustrated Has enough storage to accommodate users’
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.
135 Shutdown and Reboot Version A.01 H3064S Module 17 Slides.
Sys Admin Course Service Management Fourie Joubert.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
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.
The Linux Kernel About 6 million lines of code
Chapter 2: Configure a Network Operating System
CIT 480: Securing Computer Systems
Chapter 2: System Structures
TOPIC 6: SYSTEM START-UP AND CONFIGURATION
Linux Start Sequence Summary
Chapter 4 Booting and Shutdown
Files Used in the Boot Process
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Chapter 2: Configure a Network Operating System
OPS235: Week 1 Installing Linux (Lab1: Investigations 4 - )
SUSE Linux Enterprise Desktop Administration
LINUX SYSTEM ADMINISTRATION
Modern PC operating systems
Linux Filesystem Management
Objectives Topic 2.6 Understanding the boot process
Presentation transcript:

System Administration Startup Process

Why Care? ● Every process on your system comes about by following a specific chain of events from the machine startup ● You may want to disable processes ● You may want to enable processes

BIOS ● Has control of the machine when power is turned on ● Does some basic checks, and then looks for bootable devices ● Finds a bootable device, and then transfers control of the system to the bootloader stored in the first sector of the bootable device

Boot Loader ● Finds the kernel, loads it into memory and starts running it

GRUB

Kernel ● Core of the operating system ● Manages processes, memory and access to devices ● Provides a common interface to system services ● Initializes itself ● Loads device drivers ● Runs init as first process

Init ● Ultimate parent of all other processes ● 7 different runlevels: – By convention: 0 is for halting machine, 6 is for rebooting the machine – Other levels have no set definition between distributions. RHEL uses: ● 1: single user mode ● 3: Multiuser ● 5: Multiuser with X11 automatically started

/etc/inittab ● Format of inittab x:5:respawn:/etc/X11/prefdm -nodaemon – A label – Runlevels in which line runs – Action – Command

/etc/inittab actions ● respawn: restart whenever process exits ● wait: start when entering runlevel, wait until process ends ● sysinit: run process during system boot, ignores runlevels ● ctrlaltdel: run when Cntl-Alt-Delete typed, ignores runlevels

/etc/inttab actions ● powerfail: run when init gets SIGPWR signal and /etc/powerstatus contains F(AIL) ● powerwaitok: run when init gets SIGPWR signal and /etc/powerstatus contains O(K) ● initdefault: signals default run level id:5:initdefault:

/sbin/telinit ● telinit allows you to give commands to the init process ● tell init to switch to a different runmode telinit – This is only temporary --- the next time you restart init will come back to the default runlevel

Getting init to re-read inittab ● init only reads inittab when it starts up, when a process it monitors quits, or when you tell it to re- read inittab ● To tell it to re-read inittab, use the telinit command as root: /sbin/telinit q

Boot Sequence BIOS boot loader kernel init all other processes

Exercises ● Examine /etc/inittab and determine the default runlevel of your system ● What does the line 6:2345:respawn:/sbin/mingetty tty6 in /etc/inittab do? ● What happens when "/sbin/mingetty tty6” exits?

/etc/rc.d/rc.sysinit ● Does basic startup activity: – Configures kernel parameters – Sets system clock from computer's hardware clock – Loads keyboard map – checks all disk partitions, mounts them – Starts swapping – Load modules

/etc/rc.d/init.d/ ● For each service that is started through inittab, there is a script in this directory that starts and stops the service ● The script must be run with a command argument: – "start" to start the service – "stop" to stop the service – "restart" to restart the service ● Scripts may define other commands as well

/etc/rc.d/rcN.d/ ● For each runlevel N, there is a /etc/rc.d/rcN.d/ directory ● This directory contains symlinks to /etc/rc.d/init.d/ scripts

/etc/rc.d/rcN.d/ scripts ● KNNservice – If service is running, stop it when entering this runlevel (i.e., run script with "stop" argument) ● SNNservice – If service is not running, start it when entering this runlevel (i.e., run script with "start" argument) ● "NN" is an "ordering" number from 0 to 99

Why have numbers in the script names? ● Allows services to have dependencies ● Lower numbers run first ● So, for example, S10network can start up networking before S55sshd starts up sshd, because sshd needs networking before it can start.

Enabling and Disabling Scripts: chkconfig ● command line program ● allows editing of all levels, as well as services started through xinetd 'super-daemon' /sbin/chkconfig --list Lists all services, all runlevels /sbin/chkconfig [ --level ] name Configures a service to be on, to be off, or to reset to defaults. Optionally specify levels to modify, if you don't want to modify all levels.

Enabling and Disabling Scripts: ntsysv ● text based interactive command ● allows editing of all levels, as well as services started through xinetd 'super-daemon' /usr/sbin/ntsysv Edit current runlevel /usr/sbin/ntsysv --level Edit specific runlevel

Enabling and Disabling Scripts: system-config-services ● Graphical configuration client ● Actually removes /etc/rc.d/rcN.d/{S|K}NNname symlinks, instead of just renaming them

Enabling and Disabling Scripts: renaming them ● Simply renaming symlinks ● Not recommended unless you have a compelling reason to do so

Exercise ● To become root, run the command 'su -' and enter the root password ● Check that sshd is running in your default runlevel. ● Use chkconfig to disable it in runlevel 5. ● Is sshd still running? – Run: ps ax | grep sshd

/sbin/service ● None of the preceeding options for configuring which services run actually turns on or off a service. ● To immediately turn on or off a service, use service: /sbin/service servicename start /sbin/service servicename stop

/sbin/service ● To see the status of a process, run /sbin/service servicename status

/sbin/service ● /sbin/service may have other options depending on the service's startup script ● /sbin/service servicename simply calls the appropriate /etc/rc.d/init.d/servicename script.

Exercises ● Shut off sshd ● Check sshd's status to verify that it is not running ● Turn sshd back on ● Verify that it is running

Getting a login prompt ● Text login through getty and friends ● Graphical login through XDM and friends ● More details in sections on terminals and X

/sbin/shutdown ● /sbin/shutdown [-r|-h] time message ● Runs shutdown to reboot (-r) or halt the machine (-h) at a certain time, and displays the message as a note to logged in users and to various log files

Shutdown options ● time can be an absolute time HH:MM ● where HH is in 24 hour time (i.e. 1 pm is 13:00) or ● Time can be an offset +m where +m is m minutes from now or ● now, which is the same as +0

What shutdown does ● Prevents users from logging in ● Prints advisory message ● Switches init to runlevel 0 (shutdown) or 6 (reboot)

Exercise ● How would you configure your machine to start up without X running?