1 / 22

Chapter 8 System Startup and Shutdown

Chapter 8 System Startup and Shutdown. Objectives. Define and explain bootstrap procedure Explain single and multi-user run levels Identify and configure system startup files Perform a clean shutdown procedure Explain and define the maintainance mode. Standard Boot Process (LILO).

Download Presentation

Chapter 8 System Startup and Shutdown

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter8 System Startup and Shutdown

  2. Objectives • Define and explain bootstrap procedure • Explain single and multi-user run levels • Identify and configure system startup files • Perform a clean shutdown procedure • Explain and define the maintainance mode

  3. Standard Boot Process (LILO) • System load the Linux bootstrap from default boot device, LILO, which resides in Master Boot Record of hard drive • The bootstrap program has ability to boot Linux to single-user or multi-user mode • After the bootstrap has loaded the kernel ( stored in the /boot or / partition ) into memory, it relinquishes control to this system

  4. Standard Boot Process (LILO) • The Linux system initializes physical devices, virtual memory controller, and its internal control tables for processes, files, .. • The init process is started and it starts all other user processes • Before handing control over init, the kernel will create any other kernel threads

  5. Boot Problems • Sometimes, lilo will not able to boot the system, it prints the letters LILO on screen. The problems: disk corrupted, the information on disk geometry is incorrect, or since the new kernel image is installed • Troubleshooting: boot the system from bootable CD or floppy and try to repair disk problems or correct the /etc/lilo.conf

  6. Manual Boot • There are times when lilo has loaded the kernel but the kernel does NOT work properly because some of hardware can not be found,…It’s possible to pass configuration to the kernel through lilo at lilo command line when booting:

  7. Manual Boot • List of some important boot prompt arguments : • Instead of typing them at each reboot, these arguments can be included into the lilo.conf : append=“hdc=cdrom”

  8. Manual Boot • More information about boot prompt and arguments can be found at: http://www.tldp.org/HOWTO/BootPrompt-HOWTO.html • Refers to man 5 lilo.conf for a detailed information about arguments

  9. Startup Flow Control • It used to run Linux system at level 3

  10. Run Levels

  11. Run Levels

  12. Run Levels Using • Use /sbin/runlevel to get current run level • How to start X window ? • RedHat and TurboLinux : # init 5 • Debian : # init 2 • SuSE and Caldera: # init 3 • Slackware : # init 4 • Reboot : # init 6 • Shutdown : # init 0 • To manual set default run level at boot time, open /etc/inittab and look for this line : id:5:initdefault:

  13. The init Control File: /etc/inittab • The init process uses /etc/inittab as its control file : • This is a text file, can be edited by the system admin • init must be told about changes to /etc/inittab by: # init q • One line per process to run at define run levels • Lines starting with ‘#’ are comments • Processes run from /etc/inittab are daemons • Init read /etc/inittab every time the run level is changed

  14. Structure of /etc/inittab • Each line has 4 fields seperated by colons: id:level:action:command

  15. Structure of /etc/inittab • The main inittabaction keywords are:

  16. /etc/inittab # more /etc/inittab ... id:3:initdefault: #System initialization si::sysinit:/etc/rc.d/rc.sysinit l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 l3:3:wait:/etc/rc.d/rc 3 l4:4:wait:/etc/rc.d/rc 4 l5:5:wait:/etc/rc.d/rc 5 l6:6:wait:/etc/rc.d/rc 6

  17. Run Command Scripts • The run commands scripts are kept under /etc/rc.d/ and are initiated by init with directions from /etc/inittab • The script called rc itself runs startup programs in sub-directories under /etc/rc.d/ • rc 0 looks in /etc/rc.d/rc0.d for runlevel 0 • rc 1 looks in /etc/rc.d/rc1.d for runlevel 1 • rc 2 looks in /etc/rc.d/rc2.d for runlevel 2 • etc …

  18. Run Command Scripts • These startup programs are symbolic links to the actual scripts in the /etc/init.d/ • The startup link names are formatted: first character is S (started) or K (killed or stopped), the next two digits identify the order that scripts are executed by rc program

  19. Changing Run Levels • Use init command to change between run levels. Syntax : init <runlevel> • Examples :

  20. Shuting Down • Use shutdown commansd. It differs from “init 0” when allowing to specify time to exit, warn users what happens, … • Make sure that you follow the proper shutdown procedure. Do NOT simply shut off the power

  21. Maintenance Mode • When the system doesn’t work because problems. The simplest and best solution is to shut down the system to maintenance mode (run level 1) or reboot the system to single-user mode (run level S) and try to fix problems

  22. Summary • Define and explain bootstrap procedure • Explain single and multi-user run levels • Identify and configure system startup files • Perform a clean shutdown procedure • Explain and define the maintainance mode

More Related