1 / 63

SUSE Linux Enterprise Server Administration (Course 3037)

SUSE Linux Enterprise Server Administration (Course 3037). Chapter 5 Manage System Initialization. Objectives. Describe the Linux Load Procedure Manage Runlevels Manage the Kernel Manage the GRUB Boot Loader Modify System Settings. Describe the Linux Load Procedure. Objectives

mervyn
Download Presentation

SUSE Linux Enterprise Server Administration (Course 3037)

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. SUSE Linux Enterprise Server Administration (Course 3037) Chapter 5 Manage System Initialization

  2. Objectives • Describe the Linux Load Procedure • Manage Runlevels • Manage the Kernel • Manage the GRUB Boot Loader • Modify System Settings SUSE Linux Enterprise Server Administration (Course 3037)

  3. Describe the Linux Load Procedure • Objectives • BIOS and Boot Manager • Kernel • initrd and linuxrc • init SUSE Linux Enterprise Server Administration (Course 3037)

  4. Describe the Linux Load Procedure (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  5. Describe the Linux Load Procedure (continued) • BIOS and Boot Manager • Tasks performed by the BIOS • Power-on self-test • Initial detection and setup of hardware • Accessing bootable devices • BIOS also reads the MBR (Master Boot Record) • BIOS starts the boot manager • Using the code in the MBR • Boot manager (such as GRUB) • Loads the kernel and the initrd to memory and starts the kernel SUSE Linux Enterprise Server Administration (Course 3037)

  6. Describe the Linux Load Procedure (continued) • Kernel • Uncompresses itself • Organizes and takes control of the continued booting of the system • Checks and sets the console • Reads BIOS settings • Initializes basic hardware interfaces • Probes existing hardware and initialize it accordingly • Manages hardware access • Allocates CPU time and memory to programs SUSE Linux Enterprise Server Administration (Course 3037)

  7. Describe the Linux Load Procedure (continued) • initrd and linuxrc • Boot manager informs the kernel that an initrd exists • And where it is located in memory • If initrd exists, it is integrated into the kernel • Kernel decompresses the initrd • And mounts it as a temporary root file system • linuxrc • Loads modules required to mount root file system • May be dynamically linked • As soon as linuxrc finishes • initrd is unmounted and the boot process continues SUSE Linux Enterprise Server Administration (Course 3037)

  8. Describe the Linux Load Procedure (continued) • init • Boots the system with all its programs and configurations • init process has ID number of 1 • /etc/inittab file • Configuration file • /etc/init.d/boot script • Controls the start of services • /etc/init.d/rc script • Uses configured runlevels to start services and daemons SUSE Linux Enterprise Server Administration (Course 3037)

  9. Manage Runlevels • Objectives • Runlevel Basics • How to Change the Runlevel at Boot • How to Manage Runlevels from the Command Line • How to Shut Down or Halt the System • How to Set Runlevels with YaST SUSE Linux Enterprise Server Administration (Course 3037)

  10. Runlevel Basics • What runlevels are • Various runlevels define the state of the system • init configuration file (/etc/inittab) • Determines what happens on individual runlevels • Syntax: id:rl:action:process • Standard entries parameters • initdefault • bootwait • wait • ctrlaltdel • respwan SUSE Linux Enterprise Server Administration (Course 3037)

  11. Runlevel Basics (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  12. Runlevel Basics (continued) • init scripts • Located in the directory /etc/init.d/ • Scripts can be called up • Directly by init when you boot the system • Indirectly by init when you change the runlevel • Directly by the /etc/init.d/ script start or stop commands • Some of the most important script include • boot • boot.local • boot.setup • halt • rc SUSE Linux Enterprise Server Administration (Course 3037)

  13. Runlevel Basics (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  14. Runlevel Basics (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  15. Runlevel Basics (continued) • Runlevel symbolic links • Each runlevel has a subdirectory in /etc/init.d/ • Types of files • Sxxservice • Kxxservice • Point to service scripts in /etc/init.d/ • Some links point to the same script SUSE Linux Enterprise Server Administration (Course 3037)

  16. Runlevel Basics (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  17. Runlevel Basics (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  18. Runlevel Basics (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  19. Runlevel Basics (continued) • How init determines which services to start and stop • Script /etc/init.d/rc examines directories • /etc/init.d/rccurrentrl.d/ and /etc/init.d/rcnewrl.d • Options • Kxx link in /etc/init.d/rccurrentrl.d/ and Sxx link in /etc/init.d/rcnewrl.d/ for the same service • Script in /etc/init.d/ is not called at all • Kxx link in /etc/init.d/rccurrentrl.d/ and no Sxx link in /etc/init.d/rcnewrl.d/ • Stop script in /etc/init.d/service • Sxx link in /etc/init.d/rcnewrl.d/ and no Kxx link in /etc/init.d/rccurrentrl.d/ • Start script in /etc/init.d/service SUSE Linux Enterprise Server Administration (Course 3037)

  20. Runlevel Basics (continued) • Activate and deactivate services for a runlevel • Use command insserv or YaST • INIT INFO block at the beginning of script • Determines in which runlevel the service should start or stop • Used by insserv • Use insserv after editing the INIT INFO block • To create the needed links and renumber the existing ones as needed • Use /etc/init.d/service stop, and then insserv -r service • To remove all links for a service SUSE Linux Enterprise Server Administration (Course 3037)

  21. How to Change the Runlevel at Boot • The standard runlevel is 3 or 5 • GRUP choices • Linux • Floppy • Failsafe • Entry Linux options • root • vga • runlevel • Example: root=/dev/hda4 vga=791 1 SUSE Linux Enterprise Server Administration (Course 3037)

  22. How to Manage Runlevels from the Command Line • Change to another runlevel • Using command init • Stop the system • Entering init 0 • Restart the system • Entering init 6 • Ctrl + Alt + Backspace • Restarts the X Window system • Restart graphical system • Enter init 5 SUSE Linux Enterprise Server Administration (Course 3037)

  23. How to Shut Down or Halt the System • System should always be shut down properly • Command shutdown • Controls the shutdown of the system • Informs all users that the system will be shut down • Does not allow other users to log in before it shuts down SUSE Linux Enterprise Server Administration (Course 3037)

  24. How to Shut Down or Halt the System (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  25. How to Set Runlevels with YaST • Steps • Start YaST Runlevel Editor module • Switch to the Expert mode • Select a new default runlevel (optional) • Select a service and runlevels associated with it • Select Start Now, Stop Now, or Refresh status (optional) • Enable, disable the service SUSE Linux Enterprise Server Administration (Course 3037)

  26. How to Set Runlevels with YaST (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  27. How to Set Runlevels with YaST (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  28. Exercise 5-1 Manage Run Levels • In this exercise you will manage run levels SUSE Linux Enterprise Server Administration (Course 3037)

  29. Manage the Kernel • Objectives • Kernel Module Basics • How to Find Hardware Driver Information • How to Manage Modules from the Command Line • modprobe Configuration File (/etc/modprobe.conf) • Kernel Module Loader (kmod) SUSE Linux Enterprise Server Administration (Course 3037)

  30. Kernel Module Basics • Kernel is installed in directory /boot/ • Drivers can be compiled into the kernel • Or be loaded as kernel modules • Kernel modules are in lib/modules/version/kernel/ • Files and directories related to the kernel • /boot/initrd • /boot/vmlinuz • /proc/sys/kernel/ • /proc/version • /usr/src/linux/ SUSE Linux Enterprise Server Administration (Course 3037)

  31. How to Find Hardware Driver Information • Command hwinfo • Detects the hardware of your system • Selects the drivers needed to run this hardware • Syntax • hwinfo --hardware_type • hwinfo --help (for a short introduction to the command) SUSE Linux Enterprise Server Administration (Course 3037)

  32. Exercise 5-2 View Information about the Hardware System • In this exercise, you do the following: • Part I: View General Information about the Hardware System • Part II: View Information about Specific Hardware SUSE Linux Enterprise Server Administration (Course 3037)

  33. How to Manage Modules from the Command Line • lsmod • Lists the currently loaded modules in the kernel • insmod module • Loads the indicated moduleinto the kernel • rmmod module • Removes the indicated modulefrom the kernel • modprobe module • Loads the indicated module into the kernel • Or removes it (with option -r) SUSE Linux Enterprise Server Administration (Course 3037)

  34. How to Manage Modules from the Command Line (continued) • depmod • Creates the file /lib/modules/version/modules.dep • modinfo option module • Displays information about the module indicated SUSE Linux Enterprise Server Administration (Course 3037)

  35. modprobe Configuration File (/etc/modprobe.conf) • /etc/modprobe.conf • Configuration file for the kernel modules • Command types • install • Lets modprobe execute commands when loading a specific module into the kernel • alias • Determine which kernel module will be loaded for a specific device file • options • Options for loading a module SUSE Linux Enterprise Server Administration (Course 3037)

  36. Kernel Module Loader (kmod) • kmod • Most elegant way to use modules • Performs background monitoring • Makes sure modules are loaded by modprobe • Activate kmod • Option Kernel module loader needs to be set to “y” (yes) • In the kernel configuration • kmod is not designed to unload modules automatically SUSE Linux Enterprise Server Administration (Course 3037)

  37. Exercise 5-3 Manage the Linux Kernel • In this exercise, you view information about your kernel, and load and unload kernel modules SUSE Linux Enterprise Server Administration (Course 3037)

  38. Manage the GRUB Boot Loader • Objectives • What a Boot Manager Is • Boot Managers in SUSE Linux • How to Start the GRUB Shell • How to Modify the GRUB Configuration File • How to Configure GRUB with YaST SUSE Linux Enterprise Server Administration (Course 3037)

  39. What a Boot Manager Is • Boot loader • Loads the operating system kernel • Which then loads the system • Locates the operating system files on the hard drive • And starts the operating system • Boot manager • Can handle several operating systems • Two-stage architecture • Stage 1: contains code to load stage 2 • Stage 2: contains the actual boot manager SUSE Linux Enterprise Server Administration (Course 3037)

  40. Boot Managers in SUSE Linux • GRUB Boot Manager • Standard boot manager in SLES • GRUB features include • File system support • Interactive control • LILO Boot Manager • Configuration file is /etc/lilo.conf • Structure similar to GRUB configuration file SUSE Linux Enterprise Server Administration (Course 3037)

  41. Boot Managers in SUSE Linux (continued) • Map files, GRUB, and LILO • Kernel is a file within a file system on a partition • Concepts unknown to the BIOS • Maps • Note physical block numbers on disk that comprise logical files • BIOS loads all blocks listed in maps • LILO relies entirely on maps • GRUB tries to become independent from maps at an early stage SUSE Linux Enterprise Server Administration (Course 3037)

  42. Boot Managers in SUSE Linux (continued) • Additional information • Linux system • Manual pages and info file • README files • In the directory /usr/share/doc/packages/grub/ • In the directory /usr/share/doc/packages/lilo/ • Internet sites • www.gnu.org/software/grub/ SUSE Linux Enterprise Server Administration (Course 3037)

  43. How to Start the GRUB Shell • From a running system • Enter command grub as root • Command find • Finds out which partition contains the kernel • Close GRUB shell by entering quit • From the boot prompt • From the graphical boot selection menu, press Esc • A text-based menu appears • Start the GRUB shell by typing c SUSE Linux Enterprise Server Administration (Course 3037)

  44. How to Modify the GRUB Configuration File • Edit file /boot/grub/menu.lst structure • File structure • General options • Options for various operating systems • That can be booted with the GRUB SUSE Linux Enterprise Server Administration (Course 3037)

  45. How to Configure GRUB with YaST • Steps • Start YaST Boot Loader Configuration module • Add, edit, or delete an option • Display and edit the configuration files (optional) • Select additional boot options (optional) SUSE Linux Enterprise Server Administration (Course 3037)

  46. How to Configure GRUB with YaST (continued) SUSE Linux Enterprise Server Administration (Course 3037)

  47. Exercise 5-4 Manage the Boot Loader • In this exercise you do the following: • Part I: Pass Kernel Parameters to the Boot Loader • Part II: Configure Boot Managers SUSE Linux Enterprise Server Administration (Course 3037)

  48. Modify System Settings • Tasks involved • View and Change System Settings (/proc/sys/) • Modify Kernel and Hardware Parameters with Powertweak • Configure /etc/sysconfig/ Files with YaST SUSE Linux Enterprise Server Administration (Course 3037)

  49. View and Change System Settings (/proc/sys/) • Files in /proc/ and /proc/sys/ are kept in memory • Changes to these files are lost after a reboot • View the current configuration • Use cat and less to view files in /proc/sys/ • Use sysctl to view modifiable values below /proc/sys/ • Edit the current configuration • Use echo to edit individual configuration values • You can also use sysctl • Use sysctl to load and set kernel parameters • Execute script • Activate it by entering insserv –d boot.sysctl SUSE Linux Enterprise Server Administration (Course 3037)

  50. Modify Kernel and Hardware Parameters with Powertweak • Steps • Start YaST Powertweak Configuration module • Create the Powertweak configuration file • Find a parameter • Select or enter the setting • Find and configure other setting (optional) • Review and save the changes SUSE Linux Enterprise Server Administration (Course 3037)

More Related