Startup and Shutdown1-1 Booting and Shutting Down  Bootstrapping m The computer must pull itself up m Automatic and manual booting m Steps in the boot.

Slides:



Advertisements
Similar presentations
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.
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.
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.
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.
Booting the Linux Kernel Dr. Michael L. Collard 1.
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.
Va-scanCopyright 2002, Marchany Unit 4 – The Boot Process Randy Marchany VA Tech Computing Center.
System Startup and Shutdown
Chapter 2 Booting Up and Shutting Down. Computer Center, CS, NCTU 2 Boot Up?
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2012 by Scott Orr and the Trustees of Indiana University.
IT2204: Systems Administration I 8. The Operating System and Booting.
Linux+ Guide to Linux Certification, Third Edition
CompTIA Linux+ Certification
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Booting Up and Shutting Down. Computer Center, CS, NCTU 2 Booting Up  Starting up a computer Load kernel into memory and execute it. (1)BIOS load and.
Booting and boot levels
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, 2e 1 Chapter 9 Preparing for Emergencies.
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.
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 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.
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.
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.
Sem 2v2 Chapter 5 Router Startup and Setup. A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
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.
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.
The GRUB bootloader Michael Opdenacker Thomas Petazzoni Free Electrons
Chapter Objectives In this chapter, you will learn:
Guide to Linux Installation and Administration, 2e
Booting Up and Shutting Down
Router Startup and Setup
CIT 480: Securing Computer Systems
Chapter 2: System Structures
Structure of Unix OS.
Booting Up and Shutting Down
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Genesis: From Raw Hardware to Processes
OPS235: Week 1 Installing Linux (Lab1: Investigations 4 - )
SUSE Linux Enterprise Desktop Administration
Router Startup and Setup
Booting Up and Shutting Down
Presentation transcript:

Startup and Shutdown1-1 Booting and Shutting Down  Bootstrapping m The computer must pull itself up m Automatic and manual booting m Steps in the boot process Loading and initialization of the kernel Device detection and configuration Creation of spontaneous system processes Execution of system startup scripts Multi-user operation

Startup and Shutdown1-2 Booting and Shutting Down m Kernel initialization Pathname is vender dependent –Traditional /vmunix Two steps loading –ROM loads a small boot program into memory from disk –This program then arranges for the kernel to be loaded Memory for internal data structure is allocated m Hardware configuration Check what hardware present Locate and initialize each device as specified Probe the bus for devices and ask the appropriate drivers for information. –Reboot maybe needed for new devices connected later.

Startup and Shutdown1-3 Booting and Shutting Down m System processes Spontaneous processes –Vary from system to system –On system V-ish machines: » sched – process 0 » init – process 1 » various memory and kernel process handlers. –Not real processes, but port of kernel Once the spontaneous processes have been created, the kernel’s role in bootstrapping in complete.

Startup and Shutdown1-4 Booting and Shutting Down m Single user Password may or maynot be required to enter into root shell The root partition / is mounted –/usr maybe mounted too You can mount other partition manually You can change the read only mount to be write-mode m Execution of startup scripts Normal shell scripts Process init run them according some rules m Multi-user operation Init spawns getty processes Getty allows user login

Startup and Shutdown1-5 Booting and Shutting Down  Booting in single-user mode m Solaris From boot prom ( by press stop +a), type boot –s Other boot commands – boot /path_to_kernel – boot –s – boot –r – boot –a /etc/system.bak – probe-scsi m HP-UX During prompt Type “boot pri isl” Then type “hpux –iS /stand/vmunix

Startup and Shutdown1-6 Booting PC  More complex than …  Firmware in machine designed for Unix knows m How to use the device connected to the machine m How to talk to the network on a basic level m How to understand disk based file system  On PC, initial boot code is BIOS – extremely simplistic compare to the firmware m Set the boot priority, try cdrom, then disk, … m Load the first 512 bytes of the disk – Master Boot Record (MBR) m MBR load a secondary boot program (“boot loader”) from a disk partition Lilo (Linux Loader) Grub (Grand Unified Bootloader)

Startup and Shutdown1-7 Grub  Powerful boot loader m Is designed to address the complexity of booting a personal computer m A wide variety of free OS + proprietary OS  How to boot OS’ m Loading an OS directly m Chain-loading  Naming convention m The first hard disk partition 1: (hd0,1) m (hd0,0)/vmlinuz

Startup and Shutdown1-8 Loading OS from Grub  Grub can boot any multiboot-compliant OS in the steps directly: m Set root device with command root m Load the kernel image with command kernel Append parameters to kernel after the filename m Load modules with module m Run the command with boot  Example: m title GNU/Linux m Kernel (hd1,0) /vmlinuz root=/dev/hdb1

Startup and Shutdown1-9 Grub’s chain-lading  Boot unsupported operating system m The boot load is in the boot sector of the partition where the OS is installed m Set root device with rootnoverify m Set the active flag in the partition with makeactive m Load the boot loader with chainloader m Run boot  Example: Title Windows NT Root (hd0,0) Make active Chainloader +1

Startup and Shutdown1-10 Make your system robust

Startup and Shutdown1-11 Network boot  Situation m No local disk m Installation  Net BOOT ROM - PXE ROM m Boot the machine m Set up the network card ( talk with DHCP) m Download a second stage boot image – pxegrub m Pxegrub will download configuration from tftp server m Then download the OS image

Startup and Shutdown1-12 Protecting  set password to start interactive operation m Password –md5 $1$  For each item m Use lock Title Boot DOS Lock Rootnoveryfy (hd0,1) Makeactive Chainload +1 m Use password in the place of lock

Startup and Shutdown1-13 Grub’s user interface  Menu interface m Choose preconfigured m Edit the configuration  Command line m flexible. – do what ever you need  Get into the interface m Interrupt before the timeout timeout sec

Startup and Shutdown1-14 Exercise  Take a look at your grub configuration file m /etc/grub.conf m what is the root device  Get into the grub menu interface  Get into the grub command line

Startup and Shutdown1-15 Startup scripts  System V style m /etc/init.d m /etc/rc0.d /etc/rc1.d …  Startup scripts perform m Setting the name of the computer m Setting the time zone m Checking the disks with fsck m Mounting the system’s disk m Removing old files from /tmp directory m Configuring the network interfaces m Starting up daemons and network services

Startup and Shutdown1-16 Startup scripts  Run levels: m Level 0: system is completely shut down m Level 1 or S: single-user mode m Level 2 –5 : multiuser levels 2 or 3 are normal 4 or 5 rarely used m Level 6: reboot level  What to do for each level m Defined in /etc/inittab Entry format: id:runlevels:action:process Default level Typically SAs don’t need to mess up with it

Startup and Shutdown1-17 Startup scripts  The startup scripts called by inittab m Individual script master copy stays in init.d, typically under /etc or /sbin Understand argument start, stop, [restart] m Symbolic links are made to appropriate directories /etc/rc*.d or /sbin/rc*.d Links start with S or K followed by a number and the name of the service –Example, on Fedora1 under /etc/rc3.d K20nfs ->../init.d/nfs S12syslog ->../init.d/syslog

Startup and Shutdown1-18 Startup scripts m When lower run level transitions to higher level: Init runs all the scripts start with S –in ascending numerical order –with argument start m When higher run level transitions to lower level: Init runs all the scripts start with K ( for kill) –in desending numerical order –with argument stop m To start a daemon, we need to make a symbolic links. Example: #ln –s /etc/init.d/sshd /etc/rc2.d/S99sshd #ln –s /etc/init.d/sshd /etc/rc2.d/K25sshd

Startup and Shutdown1-19 Startup scripts  Solaris startup scripts m System-V style /etc/init.d and /etc/rc*.d m Configuration files /etc/default –init –Login –Console –Cron –… … /etc/hostname.interface

Startup and Shutdown1-20 Startup scripts  HP-UX startup scripts m System-V style /sbin/init.d and /sbin/rc*.d m Configuration files Under /sbin/rc.config.d Match the master script name Example: –/sbin/init.d/HpmOracle –/sbin/rc.config.d/HpmOracle m Output of startup scripts in /etc/rc.log Excellent place to look for startup errors.

Startup and Shutdown1-21 Startup scripts m Some commonly modified HP-UX config files in /etc/rc.config.d SnmpMaster auditing netconf nameservs nfsconf mailservcs lp  Red Hat startup scripts /etc/rc.local interactive confirmation mode /etc/sysconfig files –Hwconf –Network, network-scripts –Sendmail –syslog

Startup and Shutdown1-22 Startup scripts  FreeBSD m A single startup script /etc/rc No concept of level Read three files that specify configuration –/etc/defaults/rc.conf –/etc/rc.conf –/etc/rc.conf.local Scripts rc.something will be run in a predefined order. Script rc.local

Startup and Shutdown1-23 Rebooting and shutting down  The need to reboot/shutdown m Scheduled maintenance, such as OS upgrade m Hardware changes or additions m Running diagnostics m Performance tunning, such as changing static system configuration m Administrative tasks, such as testing new startup scripts, etc. m System not responding

Startup and Shutdown1-24 Rebooting and shutting down  Clean system shutdown m All users are notified, with some reasonable advance warning. m All running process are sent a singal to exit gracefully, provided the program has mage provisions to do so m All subsystems are shutdown gracefully m All remaining users are logged off and remaining process are killed m File system integrity is maintained m Depending on the type of shutdown, the system moves to single-user mode, the processor is halted, or the system is rebooted…

Startup and Shutdown1-25 Rebooting and shutting down  Ways to shutdown or reboot m Turn off power m Use shutdown command m Use halt or reboot commands m Sending init a TERM signal m Using telinit to change init’s run level m Killing init

Startup and Shutdown1-26 Rebooting and shutting down  Command shutdown m Safest, most considerate, and most through way to Initiate a halt Reboot Return to single-use mode m Arguments System V: #shutdown –g n [-i level] [-y] -g Wait time, default 60 level usually 0: if you intend to turn off the power 1: administrative state 2: single-user mode 5 firm ware 6 reboot to initdefault state

Startup and Shutdown1-27 Rebooting and shutting down Example. On Hp-Ux shutdown –h now Read “man shutdown “ on your lab machine and try it out.  Aborting a shutdown m During grace period, kill it m Otherwise, leave it  Shutdown security m On Hp-UX Only root is allowed by default Configure /etc/shutdown.allow

Startup and Shutdown1-28 Rebooting and shutting down  When the system crashes m Hardware failure Ex: CPU panic m Unrecoverable hardware errors m Power failures m Env problems: too hot. m Software problems m Resource problems  What to do m Reboot m Collect the info Check the lights Check the console Check the crash dump file or other logs if rebooted already  When the system won’t boot

Startup and Shutdown1-29 Rebooting and shutting down  Common failures m Bad or flaky hardware Check the obvious first –Is it turned on? –Is cable connection loose? –Is the SCSI chain terminated? Try humoring the device –Power cycling –Call field service Device failure –Call field service

Startup and Shutdown1-30 Rebooting and shutting down m Unreadable filesystems on working disks –Bad rootfilesystem »Boot it up using other media (tape or cdrom) »Remaking the system restoring its files from backup. »The worst case is to reinstall OS and restore files Example: HP-UX has the recovery utility m Damage to non-filesystem areas of a disk Damaged boot areas: –Boot block can be restored sometime. –Exactly follow the steps that vendor support provides Corrupted partition tables –Recreate the partition provided you have complete and detailed records of how the partitions were setup.

Startup and Shutdown1-31 Rebooting and shutting down m Incompatible hardware New device –System does not support the type of device –Need system reconfigure »Remove it first and then follow the vendor instruction to make the change on your system first. Problems after an upgrade –Too too old devices –New release bugs m System configuration Error in configuration files Unbootable kernel