SlideShare une entreprise Scribd logo
1  sur  50
Week 8
System Initialization
and X Windows
Objectives
 Summarize the major steps necessary
  to boot a Linux system
 Configure the LILO and GRUB boot
  loaders
 Explain how the init daemon initializes
  the system at boot time into different
  runlevels
 Configure the system to start daemons
  upon entering certain runlevels

               Linux+ Guide to Linux Certification, 3e   2
Objectives (continued)
 Explain the purpose of the major Linux
  GUI components: X Windows, window
  manager, and desktop environment
 List common window managers and
  desktop environments used in Linux
 Configure X Windows settings




              Linux+ Guide to Linux Certification, 3e   3
The Boot Process
   POST (Power On Self Test): series of tests
    run when computer initializes
    Ensures functionality of hardware
   MBR: defines partitions and boot loader
    Normally located on first HDD sector
   Boot loader: program used to load an OS
   MBR might contain pointer to a partition
    containing a boot loader on the first sector
   Active partition: partition pointed to by MBR
    One per HDD


                   Linux+ Guide to Linux Certification, 3e   4
The Boot Process (continued)
 /boot: directory containing kernel and
  boot-related files
 Vmlinuz-<kernel version>: Linux kernel
  file
 Daemon: system process that performs
  useful tasks
    e.g., printing, scheduling, OS maintenance
   Init (initialize) daemon: first process
    started by Linux kernel
    Loads all other daemons
    Brings system to usable state

                  Linux+ Guide to Linux Certification, 3e   5
The Boot Process (continued)




        Figure 8-1: The boot process

          Linux+ Guide to Linux Certification, 3e   6
Boot Loaders
 Primary function: load Linux kernel into
  memory
 Other functions:
    Passing information to kernel during startup
    Booting another OS: known as dual booting
   Two most common boot loaders:
    GRand Unified Boot loader (GRUB)
    Linux Loader (LILO)



                  Linux+ Guide to Linux Certification, 3e   7
GRUB
   More common boot loader for modern
    Linux
   Stage1: first major part of GRUB
    Typically resides on MBR
    Points to Stage1.5
   Stage1.5: loads filesystem support and
    Stage2
    Resides in /boot/grub
   Stage2: performs boot loader functions
    Displays graphical boot loader screen
    Resides in /boot/grub


                   Linux+ Guide to Linux Certification, 3e   8
GRUB (continued)




      Figure 8-2: GRUB boot loader screen

            Linux+ Guide to Linux Certification, 3e   9
GRUB (continued)
   To configure, edit /boot/grub/grub.conf
    Read directly by Stage2 boot loader
    HDDs and partitions identified by numbers
     ○ Format: (hd<drive#>,<partition#>)
   GRUB root partition: partition containing
    Stage2 boot loader and grub.conf file
   GRUB normally allows manipulation of boot
    loader
    To prevent, enable password protection
   grub-md5-crypt command: generates
    encrypted password for use in grub.conf
    file

                  Linux+ Guide to Linux Certification, 3e   10
GRUB (continued)
   If press any key during first five seconds after
    the BIOS POST get graphical GRUB boot
    menu
    Manipulate the boot process
    Get a grub> prompt to enter commands
      ○ Help screen provides list of all available commands
   grub-install command: installs GRUB
    boot loader
    Typically for reinstallation when GRUB becomes
      damaged

                    Linux+ Guide to Linux Certification, 3e   11
GRUB (continued)




    Figure 8-5: Viewing help at the GRUB prompt

              Linux+ Guide to Linux Certification, 3e   12
LILO
 Stands for Linux Loader
 Traditional Linux boot loader
    No longer supported by Fedora
 Typically located on MBR
 Lilo boot: prompt appears following
  BIOS POST
    Allows choice of OS to load at startup
   To configure, edit /etc/lilo.conf file

                  Linux+ Guide to Linux Certification, 3e   13
LILO (continued)




      Table 8-1: Common /etc/lilo.conf keywords

             Linux+ Guide to Linux Certification, 3e   14
LILO (continued)
   append= keyword (in /etc/lilo.conf):
    Useful for manually passing information
    to Linux kernel
    Can pass almost any hardware information
     ○ Format is hardware dependent
 Must reinstall LILO if /etc/lilo.conf file
  altered
 lilo command: Reinstalls LILO
    -u option: Uninstall LILO


                  Linux+ Guide to Linux Certification, 3e   15
Dual Booting Linux
   Normally only one OS may be used at a
    time
    Can use virtualization software to run
     multiple OSs at the same time
   Dual booting: configuration of boot
    loader which allows choice of OS at boot
    time




                  Linux+ Guide to Linux Certification, 3e   16
Using GRUB or LILO to Dual Boot
Other Operating Systems
   Easiest if Linux installed after another OS
    Allows installation program to detect other OS
     ○ Place appropriate entries in boot loader
       configuration file
   GRUB and LILO cannot load Windows
    Kernel directly
    GRUB loads Windows boot loader from
     Windows partition
    LILO uses other= keyword to load boot loader
     in appropriate partition


                   Linux+ Guide to Linux Certification, 3e   17
Using GRUB or LILO to Dual Boot
Other Operating Systems
(continued)




   Figure 8-7: Configuring GRUB for a dual boot system

                 Linux+ Guide to Linux Certification, 3e   18
Using a Windows Boot Loader to
Dual Boot Linux
   Use EasyBCD to add components to
    Windows boot loader
    Within EasyBCD, use NeoGrub tab to modify
     Windows boot loader to include Linux support
    Copy contents of grub.conf into C:NSTmenu.lst
   At next boot, Windows boot loader will
    prompt to choose between Windows and
    starting the NeoGrub loader to load the
    Linux OS

                 Linux+ Guide to Linux Certification, 3e   19
Using a Windows Boot Loader to
Dual Boot Linux (continued)




        Figure 8-9: The EasyBCD program

             Linux+ Guide to Linux Certification, 3e   20
Using a Windows Boot Loader to
Dual Boot Linux (continued)




  Figure 8-10: Booting Linux from a Windows boot loader
                Linux+ Guide to Linux Certification, 3e   21
Linux Initialization
   Kernel assumes control after Linux
    loaded
    Executes first daemon process (init
      daemon)
   /etc/inittab: configuration file for init
    daemon
    Used to determine number of daemons to
      be loaded
   init daemon responsible for unloading
    daemons when the system is halted or
    rebooted
                   Linux+ Guide to Linux Certification, 3e   22
Runlevels
   Runlevel: defines number and type of
    daemons loaded into memory and
    executed
    init daemon responsible for changing runlevels
     ○ Often called initstates
    Seven standard runlevels
   runlevel command: displays current and
    most recent runlevel
   init command: change OS runlevel
    telinit command: Alias to init command



                   Linux+ Guide to Linux Certification, 3e   23
Runlevels (continued)




          Table 8-3: Linux runlevels

          Linux+ Guide to Linux Certification, 3e   24
The /etc/inittab File
   Indicates default runlevel which the init
    daemon enters
    Syntax: id:5:initdefault:
   Contains single uncommented line and
    series of explanatory comments




                 Linux+ Guide to Linux Certification, 3e   25
Runtime Configuration Scripts
   Runtime configuration (rc) scripts: scripts
    that prepare the system, start daemons
    and bring system to usable state
    Executed by init daemon
   At boot time, run
    /etc/rc.d/rc.sysinit script
    Initialize the hardware components, set
      variables, check filesystems, and perform
      system tasks
   dmesg command: shows output of
    hardware detection and
    /etc/rc.d/rc.sysinit script

                   Linux+ Guide to Linux Certification, 3e   26
Runtime Configuration Scripts
(continued)
   init daemon executes script for default
    runlevel (5) /etc/rc.d/rc5 script
    Executes all files that start with S or K in
     the /etc/rc.d/rc5.d directory
      ○ Each file is symbolic link to script for starting or
        stopping daemon
      ○ S/K indicate Start/Kill daemon upon entering
        the runlevel
   When user specifies runlevel1, init
    daemon runs default script but executes
    files in the /etc/rc.d/rc1.d directory

                     Linux+ Guide to Linux Certification, 3e   27
Runtime Configuration Scripts
(continued)
   Message during system initialization
    indicates whether each runtime
    configuration script has loaded
    successfully
    Hidden by graphical boot screen display
      ○ Use Esc key to remove the graphical screen
   Output of runtime configuration scripts is
    logged to the /var/log/messages file


                   Linux+ Guide to Linux Certification, 3e   28
Runtime Configuration Scripts
(continued)




      Figure 8-11: The Linux initialization process

               Linux+ Guide to Linux Certification, 3e   29
Configuring Daemon Startup
   Most daemons started by init daemon from
    symbolic links in /etc/rc.d/rc*.d directories
    Point to daemon executable files in
      /etc/rc.d/init.d
   Most daemons accept arguments start,
    stop, restart
    Can be used to manipulate daemons after system
      startup
   service command: start, stop, or restart
    daemons within /etc/rc.d/init.d directory

                         Linux+ Guide to Linux Certification, 3e   30
Configuring Daemon Startup
(continued)
   To add daemons to be automatically
    started:
    Add executable to /etc/rc.d/init.d
    Create appropriate links to /etc/rc.d/rc*.d
   chkconfig command: view and modify
    daemons that are started in each runlevel
   ntsysv utility: modifies file entries in
    /etc/rc.d/rc*.d directories
   Service Configuration utility: easiest way to
    control daemon startup by runlevel

                    Linux+ Guide to Linux Certification, 3e   31
The X Windows System: Linux GUI
Components




      Figure 8-15: Components of the Linux GUI

              Linux+ Guide to Linux Certification, 3e   32
X Windows
   X Windows: core component of Linux GUI
    Provides ability to draw graphical images in
     windows that are displayed on terminal screen
    Sometimes referred to as X server
   X client: programs that tell X Windows how
    to draw the graphics and display the results
    Need not run on same computer as X Windows
   XFree86: OSS version of X Windows
    Originally intended for Intel x86 platform



                    Linux+ Guide to Linux Certification, 3e   33
Windows Managers and Desktop
Environments
 Window manager: modifies look and feel
  of X Windows
 Desktop environment: standard set of
  GUI tools
    Works with a window manager to provide
     standard GUI environment
    Provides toolkits that speed up process of
     creating new software
    KDE and GNOME are most common


                  Linux+ Guide to Linux Certification, 3e   34
Windows Managers and Desktop
Environments (continued)
   K Windows Manager (kwm): window
    manager that works under KDE
   Qt toolkit: software toolkit used with KDE
   GNOME desktop environment: default
    desktop environment in Fedora Linux
    Metacity window manager
    GTK+ toolkit
   Can configure KDE or GNOME to use
    different window manager
    e.g., compiz


                    Linux+ Guide to Linux Certification, 3e   35
Windows Managers and Desktop
Environments (continued)




     Figure 8-16: The KDE desktop environment

              Linux+ Guide to Linux Certification, 3e   36
Windows Managers and Desktop
Environments (continued)




     Figure 8-17: The GNOME desktop environment

              Linux+ Guide to Linux Certification, 3e   37
Starting and Stopping X Windows
   Runlevel 5 starts GNOME Display Manager
    (GDM)
    Displays graphical login screen
    Allows user to choose the desktop environment
   .dmrc file: contains desktop environments
    that were manually selected in a session
    menu
    By default, root user is not allowed to log into
      system using GDM
      ○ To change this, edit /etc/pam.d/gdm and
        /etc/pam.d/gdm-password files


                    Linux+ Guide to Linux Certification, 3e   38
Starting and Stopping X Windows
(continued)
   For runlevel 3:
    Start gdm manually, or
    Use startx command
   startx command: start X Windows and
    Window Manager or desktop
    environment specified in .xinitrc file
    in home directory
    Usually points to .Xclients-default file



                   Linux+ Guide to Linux Certification, 3e   39
Configuring X Windows
   X Windows interfaces with video
    hardware
    Requires information regarding keyboard,
     mouse, monitor, and video adapter card
   Attempts to automatically detect
    required information
    If automatic detection fails, user needs to
     specify correct hardware information
     manually


                  Linux+ Guide to Linux Certification, 3e   40
Configuring X Windows
(continued)
   Mouse, keyboard, monitor, and video
    adapter card information stored in a file
    /etc/X11/xorg.conf file for X.org
     implementation of X Windows
    /etc/X11/XF86Config file for XFree86
     implementation of X Windows
    Files can be edited manually or using a
     program
   mouse-test command: detect mouse
    Should be run as root user


                   Linux+ Guide to Linux Certification, 3e   41
Configuring X Windows
(continued)
 system-config-keyboard
  command: start the Keyboard tool in
  order to configure keyboard
 system-config-display command:
  start the Display Settings utility to
  configure video adapter card
 xvidtune utility: fine-tune the vsync and
  hsync of the video card and monitor


               Linux+ Guide to Linux Certification, 3e   42
Configuring X Windows
(continued)




      Figure 8-21: Selecting a keyboard layout

              Linux+ Guide to Linux Certification, 3e   43
Configuring X Windows
(continued)




       Figure 8-22: The Display Settings utility

              Linux+ Guide to Linux Certification, 3e   44
Configuring X Windows
(continued)




   Figure 8-23: Configuring video card and monitor model

                 Linux+ Guide to Linux Certification, 3e   45
Configuring X Windows
(continued)




     Figure 8-24: Configuring dual display support

               Linux+ Guide to Linux Certification, 3e   46
Configuring X Windows
(continued)




        Figure 8-25: The xvidtune utility

            Linux+ Guide to Linux Certification, 3e   47
Summary
   Boot loaders are typically loaded by the
    system BIOS from the MBR or the first
    sector of the active partition of a hard disk
   The boot loader is responsible for loading
    the Linux kernel and to boot other OSs in a
    dual boot configuration
   The GRUB boot loader uses the
    /boot/grub/grub.conf configuration file and
    the LILO boot loader uses the /etc/lilo.conf
    configuration file


                  Linux+ Guide to Linux Certification, 3e   48
Summary (continued)
   Seven standard runlevels are used to
    categorize a Linux system based on the
    number and type of daemons loaded in
    memory
   The init daemon is responsible for loading
    and unloading daemons when switching
    between runlevels
   Daemons are typically stored in the
    /etc/rc.d/init.d directory and loaded at
    system startup from entries in the
    /etc/rc.d/rc*.d directories

                 Linux+ Guide to Linux Certification, 3e   49
Summary (continued)
 The Linux GUI has several interchangeable
  components: X server, X clients, Window
  Manager, and optional desktop environment
 X Windows is the core component of the Linux
  GUI that draws graphics to the terminal screen
 You can start the Linux GUI from runlevel 3 by
  typing startx at a command prompt, or from
  runlevel 5 by using the gdm
 The hardware information required by X
  windows is automatically detected, but can be
  modified


                Linux+ Guide to Linux Certification, 3e   50

Contenu connexe

Tendances

Lavigne bsdmag july
Lavigne bsdmag julyLavigne bsdmag july
Lavigne bsdmag julyDru Lavigne
 
LINUX System Call Quick Reference
LINUX System Call Quick ReferenceLINUX System Call Quick Reference
LINUX System Call Quick Referencewensheng wei
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Wave Digitech
 
Chapter09 -- networking with unix and linux
Chapter09  -- networking with unix and linuxChapter09  -- networking with unix and linux
Chapter09 -- networking with unix and linuxRaja Waseem Akhtar
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administrationharirxg
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSPratik Tambekar
 
Linux Administration
Linux AdministrationLinux Administration
Linux AdministrationHarish1983
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linuxLiran Ben Haim
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumarymentorsnet
 
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson202 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2Niit Care
 

Tendances (20)

Linux
LinuxLinux
Linux
 
Lavigne bsdmag july
Lavigne bsdmag julyLavigne bsdmag july
Lavigne bsdmag july
 
Linux commands
Linux commandsLinux commands
Linux commands
 
LINUX System Call Quick Reference
LINUX System Call Quick ReferenceLINUX System Call Quick Reference
LINUX System Call Quick Reference
 
Ch02
Ch02Ch02
Ch02
 
Linuxbasiccommands
LinuxbasiccommandsLinuxbasiccommands
Linuxbasiccommands
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
Chapter09 -- networking with unix and linux
Chapter09  -- networking with unix and linuxChapter09  -- networking with unix and linux
Chapter09 -- networking with unix and linux
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OS
 
Commands
CommandsCommands
Commands
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Programming Embedded linux
Programming Embedded linuxProgramming Embedded linux
Programming Embedded linux
 
Ch1 linux basics
Ch1 linux basicsCh1 linux basics
Ch1 linux basics
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
 
02 t1 s2_linux_lesson2
02 t1 s2_linux_lesson202 t1 s2_linux_lesson2
02 t1 s2_linux_lesson2
 

Similaire à Ch08

Similaire à Ch08 (20)

Linux startup
Linux startupLinux startup
Linux startup
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
System Init
System InitSystem Init
System Init
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Linux admin course
Linux admin courseLinux admin course
Linux admin course
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
Ch04
Ch04Ch04
Ch04
 
Linux
LinuxLinux
Linux
 
Red Hat Training
Red Hat   TrainingRed Hat   Training
Red Hat Training
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
101 2.2 install boot manager
101 2.2 install boot manager101 2.2 install boot manager
101 2.2 install boot manager
 
Linux introduction Class 02
Linux introduction Class 02Linux introduction Class 02
Linux introduction Class 02
 

Ch08

  • 2. Objectives  Summarize the major steps necessary to boot a Linux system  Configure the LILO and GRUB boot loaders  Explain how the init daemon initializes the system at boot time into different runlevels  Configure the system to start daemons upon entering certain runlevels Linux+ Guide to Linux Certification, 3e 2
  • 3. Objectives (continued)  Explain the purpose of the major Linux GUI components: X Windows, window manager, and desktop environment  List common window managers and desktop environments used in Linux  Configure X Windows settings Linux+ Guide to Linux Certification, 3e 3
  • 4. The Boot Process  POST (Power On Self Test): series of tests run when computer initializes Ensures functionality of hardware  MBR: defines partitions and boot loader Normally located on first HDD sector  Boot loader: program used to load an OS  MBR might contain pointer to a partition containing a boot loader on the first sector  Active partition: partition pointed to by MBR One per HDD Linux+ Guide to Linux Certification, 3e 4
  • 5. The Boot Process (continued)  /boot: directory containing kernel and boot-related files  Vmlinuz-<kernel version>: Linux kernel file  Daemon: system process that performs useful tasks e.g., printing, scheduling, OS maintenance  Init (initialize) daemon: first process started by Linux kernel Loads all other daemons Brings system to usable state Linux+ Guide to Linux Certification, 3e 5
  • 6. The Boot Process (continued) Figure 8-1: The boot process Linux+ Guide to Linux Certification, 3e 6
  • 7. Boot Loaders  Primary function: load Linux kernel into memory  Other functions: Passing information to kernel during startup Booting another OS: known as dual booting  Two most common boot loaders: GRand Unified Boot loader (GRUB) Linux Loader (LILO) Linux+ Guide to Linux Certification, 3e 7
  • 8. GRUB  More common boot loader for modern Linux  Stage1: first major part of GRUB Typically resides on MBR Points to Stage1.5  Stage1.5: loads filesystem support and Stage2 Resides in /boot/grub  Stage2: performs boot loader functions Displays graphical boot loader screen Resides in /boot/grub Linux+ Guide to Linux Certification, 3e 8
  • 9. GRUB (continued) Figure 8-2: GRUB boot loader screen Linux+ Guide to Linux Certification, 3e 9
  • 10. GRUB (continued)  To configure, edit /boot/grub/grub.conf Read directly by Stage2 boot loader HDDs and partitions identified by numbers ○ Format: (hd<drive#>,<partition#>)  GRUB root partition: partition containing Stage2 boot loader and grub.conf file  GRUB normally allows manipulation of boot loader To prevent, enable password protection  grub-md5-crypt command: generates encrypted password for use in grub.conf file Linux+ Guide to Linux Certification, 3e 10
  • 11. GRUB (continued)  If press any key during first five seconds after the BIOS POST get graphical GRUB boot menu Manipulate the boot process Get a grub> prompt to enter commands ○ Help screen provides list of all available commands  grub-install command: installs GRUB boot loader Typically for reinstallation when GRUB becomes damaged Linux+ Guide to Linux Certification, 3e 11
  • 12. GRUB (continued) Figure 8-5: Viewing help at the GRUB prompt Linux+ Guide to Linux Certification, 3e 12
  • 13. LILO  Stands for Linux Loader  Traditional Linux boot loader No longer supported by Fedora  Typically located on MBR  Lilo boot: prompt appears following BIOS POST Allows choice of OS to load at startup  To configure, edit /etc/lilo.conf file Linux+ Guide to Linux Certification, 3e 13
  • 14. LILO (continued) Table 8-1: Common /etc/lilo.conf keywords Linux+ Guide to Linux Certification, 3e 14
  • 15. LILO (continued)  append= keyword (in /etc/lilo.conf): Useful for manually passing information to Linux kernel Can pass almost any hardware information ○ Format is hardware dependent  Must reinstall LILO if /etc/lilo.conf file altered  lilo command: Reinstalls LILO -u option: Uninstall LILO Linux+ Guide to Linux Certification, 3e 15
  • 16. Dual Booting Linux  Normally only one OS may be used at a time Can use virtualization software to run multiple OSs at the same time  Dual booting: configuration of boot loader which allows choice of OS at boot time Linux+ Guide to Linux Certification, 3e 16
  • 17. Using GRUB or LILO to Dual Boot Other Operating Systems  Easiest if Linux installed after another OS Allows installation program to detect other OS ○ Place appropriate entries in boot loader configuration file  GRUB and LILO cannot load Windows Kernel directly GRUB loads Windows boot loader from Windows partition LILO uses other= keyword to load boot loader in appropriate partition Linux+ Guide to Linux Certification, 3e 17
  • 18. Using GRUB or LILO to Dual Boot Other Operating Systems (continued) Figure 8-7: Configuring GRUB for a dual boot system Linux+ Guide to Linux Certification, 3e 18
  • 19. Using a Windows Boot Loader to Dual Boot Linux  Use EasyBCD to add components to Windows boot loader Within EasyBCD, use NeoGrub tab to modify Windows boot loader to include Linux support Copy contents of grub.conf into C:NSTmenu.lst  At next boot, Windows boot loader will prompt to choose between Windows and starting the NeoGrub loader to load the Linux OS Linux+ Guide to Linux Certification, 3e 19
  • 20. Using a Windows Boot Loader to Dual Boot Linux (continued) Figure 8-9: The EasyBCD program Linux+ Guide to Linux Certification, 3e 20
  • 21. Using a Windows Boot Loader to Dual Boot Linux (continued) Figure 8-10: Booting Linux from a Windows boot loader Linux+ Guide to Linux Certification, 3e 21
  • 22. Linux Initialization  Kernel assumes control after Linux loaded Executes first daemon process (init daemon)  /etc/inittab: configuration file for init daemon Used to determine number of daemons to be loaded  init daemon responsible for unloading daemons when the system is halted or rebooted Linux+ Guide to Linux Certification, 3e 22
  • 23. Runlevels  Runlevel: defines number and type of daemons loaded into memory and executed init daemon responsible for changing runlevels ○ Often called initstates Seven standard runlevels  runlevel command: displays current and most recent runlevel  init command: change OS runlevel telinit command: Alias to init command Linux+ Guide to Linux Certification, 3e 23
  • 24. Runlevels (continued) Table 8-3: Linux runlevels Linux+ Guide to Linux Certification, 3e 24
  • 25. The /etc/inittab File  Indicates default runlevel which the init daemon enters Syntax: id:5:initdefault:  Contains single uncommented line and series of explanatory comments Linux+ Guide to Linux Certification, 3e 25
  • 26. Runtime Configuration Scripts  Runtime configuration (rc) scripts: scripts that prepare the system, start daemons and bring system to usable state Executed by init daemon  At boot time, run /etc/rc.d/rc.sysinit script Initialize the hardware components, set variables, check filesystems, and perform system tasks  dmesg command: shows output of hardware detection and /etc/rc.d/rc.sysinit script Linux+ Guide to Linux Certification, 3e 26
  • 27. Runtime Configuration Scripts (continued)  init daemon executes script for default runlevel (5) /etc/rc.d/rc5 script Executes all files that start with S or K in the /etc/rc.d/rc5.d directory ○ Each file is symbolic link to script for starting or stopping daemon ○ S/K indicate Start/Kill daemon upon entering the runlevel  When user specifies runlevel1, init daemon runs default script but executes files in the /etc/rc.d/rc1.d directory Linux+ Guide to Linux Certification, 3e 27
  • 28. Runtime Configuration Scripts (continued)  Message during system initialization indicates whether each runtime configuration script has loaded successfully Hidden by graphical boot screen display ○ Use Esc key to remove the graphical screen  Output of runtime configuration scripts is logged to the /var/log/messages file Linux+ Guide to Linux Certification, 3e 28
  • 29. Runtime Configuration Scripts (continued) Figure 8-11: The Linux initialization process Linux+ Guide to Linux Certification, 3e 29
  • 30. Configuring Daemon Startup  Most daemons started by init daemon from symbolic links in /etc/rc.d/rc*.d directories Point to daemon executable files in /etc/rc.d/init.d  Most daemons accept arguments start, stop, restart Can be used to manipulate daemons after system startup  service command: start, stop, or restart daemons within /etc/rc.d/init.d directory Linux+ Guide to Linux Certification, 3e 30
  • 31. Configuring Daemon Startup (continued)  To add daemons to be automatically started: Add executable to /etc/rc.d/init.d Create appropriate links to /etc/rc.d/rc*.d  chkconfig command: view and modify daemons that are started in each runlevel  ntsysv utility: modifies file entries in /etc/rc.d/rc*.d directories  Service Configuration utility: easiest way to control daemon startup by runlevel Linux+ Guide to Linux Certification, 3e 31
  • 32. The X Windows System: Linux GUI Components Figure 8-15: Components of the Linux GUI Linux+ Guide to Linux Certification, 3e 32
  • 33. X Windows  X Windows: core component of Linux GUI Provides ability to draw graphical images in windows that are displayed on terminal screen Sometimes referred to as X server  X client: programs that tell X Windows how to draw the graphics and display the results Need not run on same computer as X Windows  XFree86: OSS version of X Windows Originally intended for Intel x86 platform Linux+ Guide to Linux Certification, 3e 33
  • 34. Windows Managers and Desktop Environments  Window manager: modifies look and feel of X Windows  Desktop environment: standard set of GUI tools Works with a window manager to provide standard GUI environment Provides toolkits that speed up process of creating new software KDE and GNOME are most common Linux+ Guide to Linux Certification, 3e 34
  • 35. Windows Managers and Desktop Environments (continued)  K Windows Manager (kwm): window manager that works under KDE  Qt toolkit: software toolkit used with KDE  GNOME desktop environment: default desktop environment in Fedora Linux Metacity window manager GTK+ toolkit  Can configure KDE or GNOME to use different window manager e.g., compiz Linux+ Guide to Linux Certification, 3e 35
  • 36. Windows Managers and Desktop Environments (continued) Figure 8-16: The KDE desktop environment Linux+ Guide to Linux Certification, 3e 36
  • 37. Windows Managers and Desktop Environments (continued) Figure 8-17: The GNOME desktop environment Linux+ Guide to Linux Certification, 3e 37
  • 38. Starting and Stopping X Windows  Runlevel 5 starts GNOME Display Manager (GDM) Displays graphical login screen Allows user to choose the desktop environment  .dmrc file: contains desktop environments that were manually selected in a session menu By default, root user is not allowed to log into system using GDM ○ To change this, edit /etc/pam.d/gdm and /etc/pam.d/gdm-password files Linux+ Guide to Linux Certification, 3e 38
  • 39. Starting and Stopping X Windows (continued)  For runlevel 3: Start gdm manually, or Use startx command  startx command: start X Windows and Window Manager or desktop environment specified in .xinitrc file in home directory Usually points to .Xclients-default file Linux+ Guide to Linux Certification, 3e 39
  • 40. Configuring X Windows  X Windows interfaces with video hardware Requires information regarding keyboard, mouse, monitor, and video adapter card  Attempts to automatically detect required information If automatic detection fails, user needs to specify correct hardware information manually Linux+ Guide to Linux Certification, 3e 40
  • 41. Configuring X Windows (continued)  Mouse, keyboard, monitor, and video adapter card information stored in a file /etc/X11/xorg.conf file for X.org implementation of X Windows /etc/X11/XF86Config file for XFree86 implementation of X Windows Files can be edited manually or using a program  mouse-test command: detect mouse Should be run as root user Linux+ Guide to Linux Certification, 3e 41
  • 42. Configuring X Windows (continued)  system-config-keyboard command: start the Keyboard tool in order to configure keyboard  system-config-display command: start the Display Settings utility to configure video adapter card  xvidtune utility: fine-tune the vsync and hsync of the video card and monitor Linux+ Guide to Linux Certification, 3e 42
  • 43. Configuring X Windows (continued) Figure 8-21: Selecting a keyboard layout Linux+ Guide to Linux Certification, 3e 43
  • 44. Configuring X Windows (continued) Figure 8-22: The Display Settings utility Linux+ Guide to Linux Certification, 3e 44
  • 45. Configuring X Windows (continued) Figure 8-23: Configuring video card and monitor model Linux+ Guide to Linux Certification, 3e 45
  • 46. Configuring X Windows (continued) Figure 8-24: Configuring dual display support Linux+ Guide to Linux Certification, 3e 46
  • 47. Configuring X Windows (continued) Figure 8-25: The xvidtune utility Linux+ Guide to Linux Certification, 3e 47
  • 48. Summary  Boot loaders are typically loaded by the system BIOS from the MBR or the first sector of the active partition of a hard disk  The boot loader is responsible for loading the Linux kernel and to boot other OSs in a dual boot configuration  The GRUB boot loader uses the /boot/grub/grub.conf configuration file and the LILO boot loader uses the /etc/lilo.conf configuration file Linux+ Guide to Linux Certification, 3e 48
  • 49. Summary (continued)  Seven standard runlevels are used to categorize a Linux system based on the number and type of daemons loaded in memory  The init daemon is responsible for loading and unloading daemons when switching between runlevels  Daemons are typically stored in the /etc/rc.d/init.d directory and loaded at system startup from entries in the /etc/rc.d/rc*.d directories Linux+ Guide to Linux Certification, 3e 49
  • 50. Summary (continued)  The Linux GUI has several interchangeable components: X server, X clients, Window Manager, and optional desktop environment  X Windows is the core component of the Linux GUI that draws graphics to the terminal screen  You can start the Linux GUI from runlevel 3 by typing startx at a command prompt, or from runlevel 5 by using the gdm  The hardware information required by X windows is automatically detected, but can be modified Linux+ Guide to Linux Certification, 3e 50