University of Pisa Computer Science Department System Administration Boot-shutdown Stefano Bistarelli University of Pisa Computer Science Department

Slides:



Advertisements
Similar presentations
© 2004 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Installation & management of SUSE.
Advertisements

University of Pisa Computer Science Department System Administration Monitoring Stefano Bistarelli University of Pisa Computer Science Department
University of Pisa Computer Science Department System Administration adduser Stefano Bistarelli University of Pisa Computer Science Department
University of Pisa Computer Science Department System Administration backup Stefano Bistarelli University of Pisa Computer Science Department
Chapter 1 The Study of Body Function Image PowerPoint
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Microsoft®.
DCT Retail Mode for Live Demo
Troubleshooting Startup Problems
Drivers and the kernel1-1 Drivers and the kernel UNIX system has three layers: m The hardware m The operating system kernel m The user-level programs Kernel.
Chapter 11: The X Window System Guide To UNIX Using Linux Third Edition.
VOORBLAD.
© 2012 National Heart Foundation of Australia. Slide 2.
RH030 Linux Computing Essentials
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
25 seconds left…...
1 Institutional Repository Workshop 1 – 3 April 2009 Presented by Leonard Daniels.
Januar MDMDFSSMDMDFSSS
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
PSSA Preparation.
Basic Unix system administration
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 can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Chapter 2 Booting and Shutting Down Kim Grempler (Sections 2.0 to 2.3) Leon Dague (Sections 2.4 to 2.7)
Week Fourteen Agenda Announcements Final Exam True/False -100 questions (1 point per question) Multiple Choice - 40 questions (2 points per question)
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
Process states inWindows 2000 and Linux Module 2.1.
Linux Filesystem Management
Booting and boot levels
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.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
System Startup & Shutdown
The kernel considers each program running on your system to be a process A process lives as it executes, with a lifetime that may be short or long A process.
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.
Week Fourteen Agenda Announcements Final Exam True/False -100 questions (1 point per question) Multiple Choice - 40 questions (2 points per question)
Agenda  Working with Processes: Purpose Running Programs within same process (execl, execlp, execle, execv, execvp, execve) “Spawning” other process (fork,
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.
Scis.regis.edu ● CS 468: Advanced UNIX Class 5 Dr. Jesús Borrego Regis University 1.
Week Fourteen Agenda Announcements Final Exam True/False -100 questions (1 point per question) Multiple Choice - 40 questions (2 points per question)
1 © John Urrutia. All rights reserved. Chapter 15 System Administration.
Interprocess Communication Mechanisms. IPC Signals Pipes System V IPC.
Daemons Ying Zhang CMSC691X, Summer02. Outline  Introduction  Init and Cron  System daemons  Print daemons and NFS daemons  Time synchronization.
System Administration. Logging in as System Administrator System Admin login (aka superuser, aka root) –login id: root –Default PS1 prompt: # –Home directory:
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2009 by Scott Orr and the Trustees of Indiana University.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
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 Linux Kernel About 6 million lines of code
UNIX signals.
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
Linux Start Sequence Summary
Chapter 4 Booting and Shutdown
CSC Advanced Unix Programming, Fall 2015
OPS235: Week 1 Installing Linux (Lab1: Investigations 4 - )
SUSE Linux Enterprise Desktop Administration
Linux Filesystem Management
Presentation transcript:

University of Pisa Computer Science Department System Administration Boot-shutdown Stefano Bistarelli University of Pisa Computer Science Department Annalina Fabrizio

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Outline

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Outline

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Prima Settimana 9 Introduzione W2K Installazione win2K (anche studenti) Backup Riferimenti: -Lucidi -Cap 1,2,15 libro 10 W2K registri Active Directory Gestione computer Linux -Installazione Linux Riferimenti: -Lucidi -Cap 4,5 libro -RH inst.guide 11 lab -Linux utente1 12 lab -Linux utente2

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Seconda settimana 15 lab 16 W2K Booting and Shutdown Disco ripristino Linux Booting and Shutdown Inst. Linux (studenti) Riferimenti: -Lucidi - fotocopie 17 W2K Utenti Linux Backup multi boot Utenti superuser Riferimenti: -Libro Cap. 7 -Lucidi - fotocopie 18 lab Esercitazioni su: Backup (N-P-F) Ripasso quanto fatto finora Domande studenti Inst. office 19 lab

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Booting and Shutdown - Linux powered-down halted 1. Loading UNIX into memory 2. Inizialization of the Kernel 3. Hardware probing and configuration 4. Creation of spontaneous system processes single-user execution of inizialization script multi-user operation

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Loading UNIX into memory Processor look for the BIOS BIOS check the system, look and test for periferal and look for booting device (disco, nastro, cdrom, rete) su disco fa partire MBR MBR cerca il boot loader (LILO in Linux) LILO controlla file di configurazione /etc/lilo.conf (vederlo) load the kernel /boot/vmlinuz-???

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration /etc/lilo.conf Man lilo Lilo –q (per vedere /boot/map) Boot via seriale/mode Proteggere con password boot=/dev/sda map=/boot/map install=/boot/boot.b prompt timeout=50 linear default=linux image=/boot/vmlinuz smp label=linux initrd=/boot/initrd smp.img read-only root=/dev/sda1 image=/boot/vmlinuz label=linux-up initrd=/boot/initrd img read-only root=/dev/sda1

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Lab:15 min Man lilo.conf Opzione utili? Compact Message=messsagefile Verbose=? Si? Aggiungerla se non ce di gia. Digitare lilo per fissare modifiche

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Inizialization of the Kernel and Hardware probing and configuration Kernel: test per trovare quanta memoria istallata e quanta riservarne per se. test per controllare che HW e' presente (nel kernel ci sono inseriti tutti i device che volete, e lui controlla per verificare la presenza dell'HW) configurazione dell'HW (via probing o leggendola dal device) Se HW non risponde, device e' disabilitato (se aggiungete l' HW l'O.S. non se ne accorge (non e' plug-and-play)

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Creation of spontaneous system processes id:5:initdefault: # System initialization. si::sysinit:/etc/rc.d/rc.sysinit l0:0:wait:/etc/rc.d/rc 0 … l6:6:wait:/etc/rc.d/rc 6 # Things to run in every runlevel. ud::once:/sbin/update # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -r now # When our UPS tells us power has failed, assume we have a few minutes # of power left. Schedule a shutdown for 2 minutes from now. # This does, of course, assume you have powerd installed and your # UPS connected and working correctly. pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" # If power was restored before the shutdown kicked in, cancel it. pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" # Run gettys in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 … 6:2345:respawn:/sbin/mingetty tty6 # Run xdm in runlevel 5; xdm is now a separate service x:5:respawn:/etc/X11/prefdm -nodaemon /sbin/init (legge /etc/inittab)

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Id:runlevel:azione:processo # Run gettys in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 Runlevel 0 halted 1,s,S single-user 2 NFS 3 net 4 not used 5 Xwin 6 reboot Azione Respawn (riparte al termine dopo 5 minuti) Once (solo una volta)

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Inittab (continua) /etc/rc.d/sysinit.d Set the path Read in config data. Set the system clock. Start up swapping swapon –a Set the hostname hostname ${HOSTNAME} Clear mtab Enter root and /proc into mtab. Load sound modules Check filesystems chkfs Mount all other filesystems /etc/sysconfig

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration modalità single user - solo / montata - nessun demone attivo - possibilità di fare fsck, date,... Da boot di lilo Single emergency

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration initialiazation script /etc/rc* (vederli) - setting the name - setting the timezone - fsck - mountin fs - removing file from /tmp - starting daemon e net services - account e quotas - configurig network interface

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration daemoni cron swapper update lpd sendmail inetd comsat talkd rwhod ftpd rexecd rlogind rshd timed routed gated syslogd named nntpd

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration multiuser - runlevels: 0 halted 1,s,S single-user 6 reboot - inittab: initdefault 1 getty Login shell 2 xdm xterm

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration login /etc/nologin /etc/usertty /etc/securetty.hushlogin (quiet login) No chekmail, no motd, no last log (/var/log/lastlog) Who /var/run/utmp (userlist grafico) /var/log/wtmp (va ripulito)

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Shell login ~/.bash_profile ~/.profile Shell – xterm ~/.bashrc File passwd e shadow.. Con calma!!

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration the system does not boot - HW problem - boot device difettoso - damaged fs - kernel malconfigurato - errori in /etc/rc*

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration HW problem - power? - cavi? - check the light! - spengi-riaccendi - prova autodiagnostici - syslog.conf --> log non su /dev/console ma su /var/log/kernellog - chiama tecnico

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration altri device probem copie del kernel su piu' boot device damaged fs / damaged --> niente da fare --> reinstall boot single user, fsck kernel malconfigurato riconfigurarlo erori in rc* edit

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration shut-down - modifiche a /etc/rc script - reset periferiche e non piu' riconosciute (modem, printer) - un macchina unix si dovrebbe spegnere max 1 volta a settimana - se si inchioda

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration come fare shut-down turn-off (solo incendio/inondazione) shutdown [-t sec] [-rkhncf] time [warning-message] bloccato login (vedi anche file nologin) opzioni -r rebbot (6), -h halt (0), -k kidding, -f fastboot, -c cancel Halt (o), reboot (6), poweroff [-n] [-w] [-d] [-f] [-i] [-p] Kill the processes, execute sync, halt the CPU -n nosync, -p poweroff init 0-6,s

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration come fare shut-down kill [ -signal ] [ -a ] pid By sending signal TERM to init (kill –15 1 == kill -TERM 1) SHUTDOWN By sending signal KILL to init Kill –9 1

University of Pisa Computer Science Department dr. Stefano Bistarelli: System Administration Signals: kill –l signal SIGHUP 1 SIGINT 2 SIGQUIT 3 SIGILL 4 SIGTRAP 5 SIGABRT 6 SIGIOT 6 SIGBUS 7 SIGFPE 8 SIGKILL 9 SIGUSR1 10 SIGSEGV 11 SIGUSR2 12 SIGPIPE 13 SIGALRM 14 SIGTERM 15 SIGSTKFLT 16 SIGCHLD 17 SIGCONT 18 SIGSTOP 19 SIGTSTP 20 SIGTTIN 21 SIGTTOU 22 SIGURG 23 SIGXCPU 24 SIGXFSZ 25 SIGVTALRM 26 SIGPROF 27 SIGWINCH 28 SIGIO 29 SIGPWR 30 SIGUNUSED 31