Booting and Halting Chapter 4. Chapter Objectives Examine the sequence of events that occur when a system is booted. Examine the methods used to modify.

Slides:



Advertisements
Similar presentations
Basic Unix system administration
Advertisements

2 © 2004, Cisco Systems, Inc. All rights reserved. IT Essentials I v. 3 Module 4 Operating System Fundamentals.
Linux Boot Loaders. ♦ Overview A boot loader is a small program that exists in the system and loads the operating system into the system’s memory at system.
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.
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 can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Booting the Linux Kernel Dr. Michael L. Collard 1.
Linux+ Guide to Linux Certification, Second Edition
DIT314 ~ Client Operating System & Administration CHAPTER 4 CONFIGURING HARDWARE DEVICES AND STARTUP PROCESS Prepared By : Suraya Alias.
Booting And Shutting Down. Bootstrapping  Bootstrapping is standard term for “starting up a computer”  During bootstrapping the kernel is loaded into.
计算机系 信息处理实验室 Lecture 5 Startup and Shutdown
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Unix kernel Kernel refers to the core part of an operating system Historically, UNIX kernels are monolithic Newer versions of UNIX allow part of the kernel.
Chapter 14 Chapter 14: Server Monitoring and Optimization.
1 Web Server Administration Chapter 3 Installing the Server.
Lesson 4-Installing Network Operating Systems. Overview Installing and configuring Novell NetWare 6.0. Installing and configuring Windows 2000 Server.
Va-scanCopyright 2002, Marchany Unit 4 – The Boot Process Randy Marchany VA Tech Computing Center.
System Startup and Shutdown
Xuan Guo Chapter 1 What is UNIX? Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003 Original Notes.
Installing Linux Redhat: A how to guide in installing and configuring Redhat 6.2.
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.
Operating Systems Operating System
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Administering Windows 7 Lesson 11. Objectives Troubleshoot Windows 7 Use remote access technologies Troubleshoot installation and startup issues Understand.
Booting and boot levels
Basic Input Output System
®® Microsoft Windows 7 for Power Users Tutorial 8 Troubleshooting Windows 7.
Linux Booting Procedure
System Startup & Shutdown Objectives –to interpret the Unix startup and shutdown configuration files –to be able to create a customised run level Contents.
Booting. Booting is the process of powering it on and starting the operating system. power on your machine, and in a few minutes your computer will be.
COSC 4750 Customizing and maintenance. Installing software Redhat/Fedora (and linux in general) has a package installer, called rpm Many programs will.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
Windows Vista Inside Out Chapter 22 - Monitoring System Activities with Event Viewer Last modified am.
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
14 Step-by-Step Instructions for an Upgrade Installation n Prepare for the installation Verify that all devices and applications are Windows 2000 compatible.
Linux Administration. Pre-Install Different distributions –Redhat, Caldera, mandrake, SuSE, FreeBSD Redhat Server Install –Check HCL –Significant issues.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
System Startup & Shutdown
CHAPTER 2. Overview 1. Pre-Installation Tasks 2. Installing and Configuring Linux 3. X Server 4. Post Installation Configuration and Tasks.
Chapter Thirteen Booting Windows XP. Objectives Understand the Windows XP boot process Understand the Windows XP boot process Troubleshoot system restoration.
Linux Startup Process Presenter: Dipu Gupta.
Introduction to UNIX CS465. What is UNIX? (1) UNIX is an Operating System (OS). An operating system is a control program that allocates the computer's.
Genesis: From Raw Hardware to Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
Runlevel initialization. Boot to Linux Grub interface.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2009 by Scott Orr and the Trustees of Indiana University.
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
Unix System Administration Booting and Shutting Down Chapter 2.
The Linux Operating System R.Bigelow. What is an Operating System An operating system is a collection of programs that manage a computer's resources.
Commands 3/1/ Boot PROM Fundamentals All Sun systems have resident boot PROM firmware Provides basic hardware testing and initialization prior.
CEG 2400 FALL 2012 Linux/UNIX Network Operating Systems.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
1 Setup and Compile Linux Kernel Speaker: Yi-Ji Jheng Date:
Troubleshooting Windows Vista Lesson 11. Skills Matrix Technology SkillObjective DomainObjective # Troubleshooting Installation and Startup Issues Troubleshoot.
Overview A) Power on or reset B) 1st stage boot loader C) 2nd stage boot loader D) Operate system.
Linux Introduction Linux was developed in the early 1990’s by Linus Torvald computer science student at the University of Helsinki Linux is distributed.
System Administration Startup Process. Why Care? ● Every process on your system comes about by following a specific chain of events from the machine startup.
An Introduction to System Administration
Chapter 8 Unix & Linux.
Operating System & Application Software
Chapter Objectives In this chapter, you will learn:
Chapter 2: System Structures
Chapter 4 – Introduction to Operating System Concepts
Linux Start Sequence Summary
CONFIGURING HARDWARE DEVICE & START UP PROCESS
SUSE Linux Enterprise Desktop Administration
Instructor Materials Chapter 5: Windows Installation
Presentation transcript:

Booting and Halting Chapter 4

Chapter Objectives Examine the sequence of events that occur when a system is booted. Examine the methods used to modify the boot sequence. Examine how to use the PROM monitor to select alternate boot devices. Examine the boot manager and boot loader. Examine how to shut a system down properly.

An Overview Of The Boot Sequence When power is applied, the system resets all of the logic gates (chips) to a known state. A series of diagnostic tests (Power-On Self- Test, or POST) are run from the PROM Monitor to ensure that some minimal set of hardware components are available for system operation. Once the POST operation completes, the system loads a small “boot loader” program from the system PROM. The boot-loader loads the system boot block.

An Overview Of The Boot Sequence The system executes the code from the boot block. –This program loads the secondary boot loader that will eventually load the operating system kernel and start it. Most secondary boot loaders allow the operator to select the device to boot from, as well as the program that will be loaded into memory and started.

An Overview Of The Boot Sequence The kernel creates a few necessary processes: –the init process, –a process scheduler, –and usually a few memory management processes. The init process runs a series of start-up scripts that configure the system for multi-user operation. Now that we’ve see the basic series of events that occur during the system boot process, let’s examine some of the internal events that occur during each major step of the boot process.

Step 1: PROM Monitor The PROM monitor includes a small program (Power On Self Test, or POST) that initializes the system hardware, and runs a miniature diagnostic program. –The diagnostics ensure a minimally operational base for the OS to run on. –POST diagnostic routines do not guarantee that the system hardware is fully functional. Once the diagnostic completes, the PROM monitor probes the system busses to determine what hardware is connected to the system. Once the hardware has been probed, the PROM monitor loads and starts the second phase of the boot process; the boot block.

PC PROM Monitors PC BIOS –Limited alternate boot device selection Typically: Disk, CDROM, Floppy, and net. Sometimes alternate disk boot is supported. –Configure/modify hardware settings Enable/disable device, change IRQ/memory ranges. –Allows for device BIOS interaction

Sun PROM Monitor –Actually a 2 level monitor which includes “new” and “old” modes. The SUN monitor includes a FORTH language interpreter. –Allows the user to select alternate boot devices, enable/disable hardware features, probe devices, test devices. Apple Monitor RS6000 Monitor SGI and HP monitors

Step 2: Boot Block The boot block’s job is to initialize some of the system’s peripherals and memory, and to load yet another program, the secondary boot loader, (sometimes known as the boot manager) that will load the OS kernel. A boot block is typically placed on the disk as part of the OS installation process. The sysadmin should be familiar with the similarities and differences between the following boot blocks: –Windows Boot Block –Linux Boot Block –Solaris Boot Block –IRIX Boot Block –MacOS and AIX Boot Block

Step 3: Secondary Boot Loader The secondary boot loader loads the kernel and starts it. The secondary boot loader often allows operator intervention: –Select alternate kernel to load –Modify boot parameters (single user, extensions, …) USE PASSWORD SECURITY HERE!!! –Securing the boot process such that users cannot boot alternate media, or an alternate kernel, is a very wise step to take!

Linux Loader (LILO) # sample /etc/lilo.conf boot = /dev/hda delay = 40 password=SOME_PASSWORD_HERE default=vmlinuz-stable vga = normal root = /dev/hda1 image = vmlinuz label = net test kernel restricted image = vmlinuz-stable label = stable kernel restricted other = /dev/hda3 label = Windows 2000 Professional restricted table = /dev/hda

GRUB # /etc/grub.conf generated by anaconda timeout=10 splashimage=(hd0,1)/grub/splash.xpm.gz password --md5 $1$ÕpîÁÜdþï$J08sMAcfyWW.C3soZpHkh. title Red Hat Linux ( custom) root (hd0,1) kernel /vmlinuz custom ro root=/dev/hda5 initrd /initrd img title Red Hat Linux ( ) Emergency kernel (no afs) root (hd0,1) kernel /vmlinuz ro root=/dev/hda5 initrd /initrd img title Windows 2000 Professional rootnoverify (hd0,0) chainloader +1

The Windows Multi-Boot Loader timeout=10 default=multi(0)disk(0)rdisk(0)partition(2)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows 2000 Professional" /fastdetect multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00" multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos

Step 4: The OS Kernel –Once the kernel is loaded, and started, it probes devices. Some architectures use the PROM monitor to build a device tree that is handed to the kernel during the boot process. Other architectures require the kernel to probe the system busses for devices to build the device tree. –Once the device tree is available, the kernel parses it, and each device is probed to determine if it is operational, (and if so, the driver module is loaded into the kernel). This search for memory and devices is sometimes referred to as auto-configuration.

Step 4: The OS Kernel UNIX Run Levels –All flavors of UNIX, and UNIX- work-alikes use similar foundations for the system run modes. –As far as UNIX and its ilk are concerned, there are basically two run modes: single user (sometimes called maintenance mode), and multi-user. –There may be several forms of the multi-user mode (with services, without services, and so on) on any given UNIX OS.

Step 4: The OS Kernel MacOS Run Levels –MacOS also provides for “multiple” run levels. On the older versions of MacOS, different run levels meant simply a choice between “boot normally”, or “boot without extensions”.” Now that MacOS X is a Mach/UNIX based kernel, there are more run levels available. –The MacOS X kernel enjoys the same set of run levels, as do the other UNIX variants.

Windows Run Levels Windows has a limited set of run levels –Multi-user –Safe Mode –Safe mode with networking Typically used to repair damaged system.

Step 4: The OS Kernel Start-up Scripts –(Un)fortunately, within the OS world there are several “camps” of believers when it comes to how the system should start system services. –The following sections provide an overview of the details of the Windows, MacOS, System V UNIX, and BSD start-up sequences, pointing out OS- specific oddities as applicable.

Step 4: The OS Kernel Typically, BSD variants include a run control (also known as an rc) script in the /etc directory. –This allows the administrator to edit a single /etc/rc script to make it start a new service at boot time. Other BSD variants have simply increased the number of rc files in the /etc directory. –For example, the FreeBSD start-up directory contains scripts with names such as /etc/rc.atm, /etc/rc.firewall, and /etc/rc.network. These individual scripts, respectively, configure the ATM network cards, cause the system to become a firewall, and configure the network links respectively. These scripts are called by the master script, /etc/rc

rc script problems Using a small number of rc scripts can cause problems: –Startup becomes more difficult to test, as each script starts multiple services. Need to reboot system to test scripts. –Not easy to “shut down” individual services using rc scripts.

System V Scripts System V employs a directory full of init scripts. Each System V variant seems to put these scripts in a different directory: –Solaris /etc/init.d –Linux /etc/rc.d/init.d –HPUX /sbin/init.d Each script starts/stops one service. Symbolic, or hard links connect the /etc/init.d scripts into the correct run level directories (/etc/rcN.d/ where “N” is the run level between 0 and 6). As system enters a run level, the scripts in the corresponding run level directory are executed: –First the K (Kill) scripts are run in numeric, then alphabetic order. –Next, the S (Start) scripts are run in numeric, then alphabetic order.

System V Scripts grumpy% ls -lsa /etc/rc*.d/*afs* 2 lrwxrwxrwx 1 root other 15 May /etc/rc0.d/K66afs -> /etc/init.d/afs 2 lrwxrwxrwx 1 root other 15 May /etc/rc2.d/S70afs -> /etc/init.d/afs Typical init script format: #!/bin/sh Setup code (set environment variables, subroutine definitions, …) case $1 in start) Code to start service stop) Code to stop service *) Error handling code and/or usage message

Benefits of init Scripts One of the benefits of using init directory scripts is that they are easily tested. –The scripts may be manually invoked with the stop and start arguments as a check to determine whether they function correctly before creating the links to the rc directories, and trying them under actual system boot conditions. –This procedure is recommended because it can help you catch mistakes that might interrupt the boot process and leave the system unusable.

Changing Run Levels The following commands are typically reserved for system maintenance activities. –UNIX shutdown Command –The System V init 0 Command –The telinit Command NOTE: The shutdown, telinit, and init 0 commands can only be executed with root access. –Windows Shutdown Command –Legacy MacOS Shutdown Command

Emergency Measures # STOP-A pressed Abort at PC OxFOO >sync panic: zero syncing file systems done. 586 static and sysmap kernel pages 34 dynamic kernel data pages 179 kernet-pageable pages 0 segkmap kernel pages 0 segvn kernel pages 799 total pages (799 chunks) dumping to vp ff1b9004, offset pages left 109 pages left 101 pages left 5 pages left 799 total pages, dump succeeded rebooting...

Summary The administrator should understand the sequence of events that occur when a system is booted. The administrator should understand the methods used to modify the boot sequence. The administrator should know how to use the PROM monitor to select alternate boot devices. The administrator should understand the workings of the boot manager and boot loader. The administrator should understand how to shut a system down properly.