The Linux Boot Process

Similar documents
System Administration. Startup Process

Certification. System Initialization and Services

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

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

Introduction to Linux start-up. Hao-Ran Liu

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

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

The Linux IPL Procedure

CSE 265: System and Network Administration

CSE 265: System and Network Administration

Initialization: runlevels

Using grub to Boot various Operating Systems

Chapter 2 Booting Up and Shutting Down

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

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

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

Booting up and Shutting down A primer for troubleshooting

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

MODULE 02. Installation

Booting Up and Shutting Down

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

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

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

Linux/Citrix Virtual Environment Documentation

Global Navigator Server Installation Manual

RAP Installation README

Managing the Linux Boot Process

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

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

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

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

Runlevels, System Shutdown and Reboot

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

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

Integrated Lights-Out 3 Virtual Serial Port configuration and operation

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

Boot Process in details for (X86) Computers

Boot. How OS boots

CST8177 Linux II. Linux Boot Process

Unit 2 System startup and shutdown

CompTIA Linux+/LPIC-1 COPYRIGHTED MATERIAL

Operating System Kernel and the boot process

NETW 110 Lab 3 Post-Installation Configuration Page 1

The table below lists the domains measured by this examination and the extent to which they are represented in the examination.

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

Red Hat Enterprise Linux 3. Reference Guide

RH-202. RedHat. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

ITEC451 Network Design & Analysis Laboratory Guide: Appendix

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

RH133. Red Hat Linux System Administration

Automating Linux App Startup

ttylinux User Guide pc i Maintained by Douglas Jerome Based on Previous Work by Pascal Schmidt April 8, 2012

Introduction to Linux Init Scripts

Advanced Unix System Administration

Basic UNIX system administration

minit Felix von Leitner September 2004 minit

File System Hierarchy Standard (FHS)

SUSE Advanced Troubleshooting: The Boot Process Lecture

Initial Bootloader. On power-up, when a computer is turned on, the following operations are performed:

How to Use This Lab Manual

Upgrade Cisco Interface Module for LoRaWAN IXM using the Console

1Z0-100 oracle.

WHITE PAPER. Instant openmosix. How to build a working openmosix cluster without touching a compiler

Recovering GRUB: Dual Boot Problems and Solutions

The Linux Handbook. Version 1.6, August 2007

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

Linux Administration

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

Lab - Installation of the Linux Operating System

Index 299. Special Characters * (asterisk) deactivating users, 110 with rpm command, 51

Services, logging, accounting Todd Kelley CST8177 Todd Kelley 1

Exam Name: Red Hat Certified Engineer on Redhat

Course 55187B Linux System Administration

The LILO Configuration Handbook. Virgil J. Nisly

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

Installation of Fedora 12 with CD

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

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

User. Applications. Operating System. Hardware

Chapter 02 Linux Installation and Usage

ECE 471 Embedded Systems Lecture 16

Basic Linux Security. Roman Bohuk University of Virginia

Linux Bible. Negus, C. Table of Contents ISBN-13: Part I: Getting Started 1 Chapter 1: Starting with Linux 3

CSE 265: System and Network Administration

ECE 4110 Internetwork Programming Lab 1: Installation of the Linux Operating System. Lab Goals. Section I: Before we begin

1Z Oracle Linux 6 Implementation Essentials Exam Summary Syllabus Questions

1.3 What does Ctrl-D, Ctrl-A, Ctrl-F and Ctrl-T do in terms of command line editing? (6)

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

Womp Howto. William Daniau 1st January 2004

Automating Linux App Startup

Thousands of Linux Installations (and only one administrator)

CIT 480: Securing Computer Systems

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

ExpressCluster for Linux Ver3.0

Installing Linux on JMU Computer-Science Department Removable Hard Drives for CS-450 and CS-550

Computer Center, CS, NCTU. Outline. FreeBSD version 8.2-RELEASE. Installing FreeBSD. From CD-ROM

Initial Bootloader > Flash Drive. Warning. If not used carefully this process can be dangerous

System control mechanisms

systemd: What to Know and How to Transition

Booting Up & Processes

Transcription:

The Linux Boot Process Dr. Billy Harris -- Linux booting -- init/services configuration Copyright 2002 Billy Harris (Billy-Harris@utc.edu) You are welcome to use and distribute this document so long as you retain this copyright message.

Basic Input/Output System

Basic Input/Output System POST power-on self test Video BIOS VGA = 320x200, 256 colors Memory test Device initialization Basic disk drivers Setup Executes code from the MBR

Master Boot Record Very first block of disk holds a boot loader. The purpose of the boot loader is to load an operating system. It has 512 bytes for code to do this.

Master Boot Record Very first block of disk holds a boot loader. The purpose of the boot loader is to load an operating system. It has 512 bytes for code to do this. Minus whatever it uses to maintain the partition table. Under Windoze systems, the MBR is very simple it simply loads specified blocks from the disk and JMPs to begin executing.

Grand Unified Boot Loader

Grand Unified Boot Loader GRUB Mounts the boot partition [normally referenced as /boot] Configuration is stored as an ordinary text file on the disk. Despite its name, it is still x86 specific, and does not support any of the BSD distributions.

Other Boot Loaders /boot/loader for BSD systems LILO [older Linux boot loader] aboot, elilo, milo All have one purpose: Load Linux

Linux Kernel The kernel is the operating system Memory management Interprocess communication File I/O Various device drivers.

Linux Kernel Linux uses a modular kernel, which means that device drivers can be added and removed without rebooting the system. But what about device drivers that are needed to boot the system (SCS I?) -- Initial ramdisk [initrd] holds copies of these modules and is also loaded by the boot loader.

Linux Booting The kernel loads init init launches a whole bunch of programs including a variant of getty. getty runs login login su's to the user, and executes the user s shell. --slight variations if you use an Xwindows-based login.

Files which Modify Boot Behavoir /nologin disables non-root logins. /fastboot disabled fsck /forcefsck requires fsck /.autofsck requires fsck

Configuring Init

Old Days Shell scripts init would execute rc, then rc.local Wanted a new web server? Edit rc.local. Wanted a new ftp server? Edit rc.local. Ranted to replace old web server with a new one? Edit rc.local

System V Conceptually much more complicated Each service provides a shell script which lives in the init.d directory, and can start, stop, or restart the service. The system uses different run levels to determine which services to start and stop.

Run Levels Run Level 0: System halt Run Level 1 [S]: Single User Run Level 3: Multi-user; text login Run Level 5: Multi-user; graphical login Run Level 6: System reboot Also have two customized run levels, A and B, which start or stop services, but do not change the actual run level.

Init Scripts # cd /etc/init.d # ls anacron gpm kdcrotate atd halt keytable autofs httpd killall netfs random sshd crond identd kudzu functions iptables lpd #./atd status atd (pid 883) is running... #./lpd stop Stopping lpd: [ OK ]

Service # service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] Can also use service --status-all service httpd --full-restart

Services & Run Levels How does init know which services to start/stop? We still have rc.sysinit, rc, and rc.local. Better method: each run level has a directory. Each directory has symbolic links to the init.d scripts The name of the link determines whether the service should be started/stopped.

Services & Run Levels # cd /etc/rc.d/rc3.d # ls K05saslauthd S13portmap S55sshd K65identd S17keytable S56rawdevices S05kudzu S20random S56xinetd S08iptables S25netfs S58ntpd S10network S26ups S60lpd S12syslog S28autofs S78mysqld # ls -al S60lpd lrwxrwxrwx S60lpd ->../init.d/lpd

Telinit Use telinit to change run levels Examine each K script. If the system is running, execute the script with stop Examine each S script. If the system is not running, execute the script with start How does init know whether or not the system is running?

Configuring Services The RPMS should install the scripts you need. After installing, a simple # service <name> start should work. Similarly, you can stop a service and use rpm -e to remove it from your system.

Chkconfing Chkconfig will add/remove the symbolic links for you. # chkconfig --level 345 ntpd on # chkconfig --list ntpd ntpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off Can also use --del to remove the links entirely [but the script is still in init.d] or --add to add a new service. How does chkconfig know what number to use for the S and K links?

Chkconfing Chkconfig will add/remove the symbolic links for you. # chkconfig --level 345 ntpd on # chkconfig --list ntpd ntpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off Can also use --del to remove the links entirely [but the script is still in init.d] or --add to add a new service. How does chkconfig know what number to use for the S and K links?

Chkconfing [init.d]# more sshd #!/bin/bash # # Init file for OpenSSH server daemon # # chkconfig: 2345 55 25 # description: OpenSSH server daemon

ntsysv Redhat Service Confifuration menu-based text program redhat-configure-services GNOME based program. Both give a list of possible services; you can check/uncheck to enable/disable.

Inittab # # inittab This file describes # the system in a id:5:initdefault: # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -r now l2:2:wait:/etc/rc.d/rc 2 1:2345:respawn:/sbin/mingetty tty1 x:5:respawn:/etc/x11/prefdm -nodaemon