System Administration. Startup Process

Similar documents
Certification. System Initialization and Services

RHCE BOOT CAMP. The Boot Process. Wednesday, November 28, 12

CSE 265: System and Network Administration

CSE 265: System and Network Administration

grub-md5-crypt --help Usage: grub-md5-crypt [OPTION] Encrypt a password in MD5 format.

Using grub to Boot various Operating Systems

The Linux Boot Process

Booting up and Shutting down A primer for troubleshooting

HOW LINUX BOOTS. As it turns out, there isn t much to the boot process:

Booting Up and Shutting Down. lctseng / Liang-Chi Tseng

The Linux IPL Procedure

Chapter 2 Booting Up and Shutting Down

CST8177 Linux II. Linux Boot Process

Runlevels, System Shutdown and Reboot

Linux/Citrix Virtual Environment Documentation

Integrated Lights-Out 3 Virtual Serial Port configuration and operation

Authored by: Brian E. Brzezicki Copyright 2013, Paladin Group LLC Reuse without permission is strictly prohibited

Introduction to Linux start-up. Hao-Ran Liu

Oracle 1Z Enterprise Linux System Administration. Download Full Version :

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

Booting Up and Shutting Down

More on file systems, Booting Todd Kelley CST8177 Todd Kelley 1

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Chapter 6. Boot time configuration. Chapter 6 Boot time configuration

More on file systems, Booting Todd Kelley CST8177 Todd Kelley 1

Services and Security

This is Lab Worksheet 13 - not an Assignment. Boot Process and GRUB

NETW 110 Lab 3 Post-Installation Configuration Page 1

Exam Name: Red Hat Certified Engineer on Redhat

InDepth Linux Serial Consoles for Servers and Clusters

Installing Red Hat Enterprise Linux AS 4 Update 3 on the IBM System p5 185 or IBM Intellistation POWER 185

RedHat. Rh202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

The kernel is not to be confused with the Basic Input/Output System (BIOS).

CompTIA Linux+/LPIC-1 COPYRIGHTED MATERIAL

University of Pennsylvania Zachary Goldberg. CIS c. More Kernel Bits. 10/03/09 Slide 1

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu

LPIC 102. be familiar with standard runlevels in a Linux system

Managing the Linux Boot Process

Advanced Unix System Administration

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

RH202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs) Exam.

systemd: What to Know and How to Transition

OPERATING SYSTEMS LINUX

Linux Administration

Initialization: runlevels

Lab 3a Using the vi editor

Preparing for the Prime Home Installation

Booting: ROM vs RAM The term random access memory is somewhat misleading because DRAM, SRAM and ROM all qualify as random access memories We will

OPERATING SYSTEMS. Božo Krstajić, PhD, University of Montenegro Podgorica.

A guide to RHCSA & RHCE Certifications

Fedora 12 Essentials

CST8207: GNU/Linux Operating Systems I Lab Ten Boot Process and GRUB. Boot Process and GRUB

SUSE Advanced Troubleshooting: The Boot Process Lecture

Configuring a Standalone VCL Environment using VMware Server 2.0

Chapter 02 Linux Installation and Usage

Introduction to Linux Init Scripts

Recovering GRUB: Dual Boot Problems and Solutions

System Administration. Terminals and the X Window System

Unit 2 System startup and shutdown

How to disable ACPI on productive Linux servers to decrease kernel panics and increase CPU fan lifespan

LPI Linux LPIC1. Module 1

Advanced Operating Systems and Virtualization. Alessandro Pellegrini A.Y. 2017/2018

Exam Questions RH202

INSTALLING INSTALLING INSTALLING

Automating Linux App Startup

LPI EXAM LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2. Buy Full Product.

. Fill in the Blank: A directory named mydir has just been... Points:10. Add Question Success: 64 questions added as a copy.

SANOG VI IP Services Workshop: FreeBSD Install

MODULE 02. Installation

WLM1200-RMTS User s Guide

Console Redirection on VMware ESX Server Software and Dell PowerEdge Servers

CompTIA Exam LX0-103 CompTIA Linux+ [Powered by LPI] Exam 1 Version: 6.0 [ Total Questions: 120 ]

Vendor: RedHat. Exam Code: RH133. Exam Name: Red Hat Linux System Administration. Version: Demo

Exam : 1Z Title : Enterprise Linux System Administration. Version : DEMO

INSTALLING INSTALLING INSTALLING

CIT 480: Securing Computer Systems

ITDUMPS QUESTION & ANSWER. Accurate study guides, High passing rate! IT dumps provides update free of charge in one year!

CompTIA Linux+ Guide to Linux Certification Fourth Edition. Chapter 2 Linux Installation and Usage

FastTrack to Red Hat Linux System Administrator Course Overview

minit Felix von Leitner September 2004 minit

Course 55187B Linux System Administration

Ubuntu installation alongside windows 8/8.1 and 10

HP-UX System Administration Course Overview. Skills Gained. Who will the Course Benefit?

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

LPI Exam LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2 Version: 6.0 [ Total Questions: 120 ]

Vendor: LPI. Exam Code: Exam Name: LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2. Version: Demo

Start Up and Shutdown Procedures (Unix)

Instructions: Step 1: Respond to the following: IT131 Linux+

LX0-103 Exam Questions Demo CompTIA. Exam Questions LX CompTIA Linux+ [Powered by LPI] 1

Thousands of Linux Installations (and only one administrator)

RH133. Red Hat Linux System Administration

Virtual Data Center (vdc) Manual

Chapter 7. Getting Started with Boot from Volume

Red Hat Operating System Installation Tips

Linux Level 1. Student Manual.

FC SAN Boot Configuration Guide

DUAL OS INSTALLATION

SysadminSG RHCSA Study Guide

LPIC-1 Exam 101, Part 1 of 2, version 4.0

Transcription:

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 Configuration File: /boot/grub/grub.conf default=0 timeout=10 splashimage=(hd0,0)/boot/grub/splash.xpm.gz ttitle Red Hat Enterprise Linux Client (2.6.18 53.1.13.el5) root (hd0,0) kernel /vmlinuz 2.6.18 53.1.13.el5 ro root=label=/1 rhgb quiet initrd /initrd 2.6.18 53.1.13.el5.img

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: 0 6 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 <runlevel> 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: command line program chkconfig 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 <levels> ] name <on off reset> 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 <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?