1 / 51

Linux+ Guide to Linux Certification, Second Edition

Linux+ Guide to Linux Certification, Second Edition. Chapter 9 System Initialization and X Windows. Objectives. Summarize the major steps necessary to boot a Linux system Configure the LILO and GRUB boot loaders Dual boot Linux with the Windows OS using LILO, GRUB, and NTLOADER

odele
Download Presentation

Linux+ Guide to Linux Certification, Second Edition

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. Linux+ Guide to Linux Certification, Second Edition Chapter 9 System Initialization and X Windows

  2. Objectives • Summarize the major steps necessary to boot a Linux system • Configure the LILO and GRUB boot loaders • Dual boot Linux with the Windows OS using LILO, GRUB, and NTLOADER • Understand how the init daemon initializes the system at boot time into different runlevels Linux+ Guide to Linux Certification, 2e

  3. Objectives (continued) • Configure the system to start daemons upon system startup • 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 using various Linux utilities Linux+ Guide to Linux Certification, 2e

  4. The Boot Process • POST: Series of tests run when computer is turned on • 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, 2e

  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, 2e

  6. The Boot Process (continued) Figure 9-1: The boot process Linux+ Guide to Linux Certification, 2e

  7. Boot Loaders • Primary function: Load Linux kernel into memory • Other functions: • Passing information to kernel • Booting another OS • Two most common boot loaders: • Linux Loader (LILO) • GRand Unified Boot loader (GRUB) Linux+ Guide to Linux Certification, 2e

  8. LILO • Traditional Linux boot loader • Typically located on MBR • Allows choice of OS to load at startup • To configure, edit /etc/lilo.conf Linux+ Guide to Linux Certification, 2e

  9. 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, 2e

  10. GRUB • More recent than the LILO boot loader • Stage 1: First major part of GRUB • Typically resides on MBR • Points to Stage 1.5 • Stage1.5: Loads filesystem support • Resides in /boot/grub • Stage2: Performs boot loader functions • Displays graphical boot loader screen • To configure, edit /boot/grub/grub.conf • Read directly by Stage 2 boot loader • HDDs and partitions identified by numbers • Format: (hd<drive#>,<partition#>) Linux+ Guide to Linux Certification, 2e

  11. GRUB (continued) Figure 9-3: GRUB boot loader screen Linux+ Guide to Linux Certification, 2e

  12. GRUB (continued) • GRUB root partition: Partition containing Stage 2 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 • Can switch boot loader from GRUB to LILO at any time • grub-install command: Installs GRUB boot loader Linux+ Guide to Linux Certification, 2e

  13. GRUB (continued) Figure 9-4: Viewing help at the GRUB boot loader screen prompt Linux+ Guide to Linux Certification, 2e

  14. Dual Booting Linux • Only one OS may be used at a time • Boot loader may be configured to allow choice of OS at boot time Linux+ Guide to Linux Certification, 2e

  15. Using LILO or GRUB to Dual Boot other Operating Systems • Dual boot: Two or more OSs exist on HDD • Easiest if Linux installed after another OS • Allows installation program to detect other OS • Place appropriate entries in boot loader configuration file • LILO and GRUB cannot load Windows Kernel directly Linux+ Guide to Linux Certification, 2e

  16. Using LILO or GRUB to Dual Boot other Operating Systems (continued) Figure 9-5: Partitioning for a dual boot system Linux+ Guide to Linux Certification, 2e

  17. Using LILO or GRUB to Dual Boot other Operating Systems (continued) Figure 9-6: Configuring GRUB for a dual boot system Linux+ Guide to Linux Certification, 2e

  18. Using FIPS • Windows installers use entire HDD for Windows partitions • Leaves no space for Linux • First non-destructive Interactive Partition Splitter (FIPS): Resizes Windows partition • Preserves Windows OS on Windows partition • Creates space to install Linux Linux+ Guide to Linux Certification, 2e

  19. Using FIPS (continued) • Guidelines/limitations to using FIPS: • FAT16 and FAT32 filesystems only • Will only work with primary Windows partition • Windows partition split into two primary partitions • Need sufficient free space within existing Windows partition to allow Linux installation Linux+ Guide to Linux Certification, 2e

  20. Using a Windows Boot Loader to Dual Boot Linux • Specify location of GRUB or LILO in Windows boot loader configuration • NTLOADER: Boot loader available with Windows NT/2000/XP • At boot time, prompts for OS to boot • Able to load LILO or GRUB • Windows must be installed on first primary active partition • NTLOADER placed on MBR by default Linux+ Guide to Linux Certification, 2e

  21. Using a Windows Boot Loader to Dual Boot Linux (continued) Figure 9-7: Configuring GRUB to reside on a Linux partition Linux+ Guide to Linux Certification, 2e

  22. Using a Windows Boot Loader to Dual Boot Linux (continued) • When Linux installed, install GRUB on first sector of the partition • Avoids overwriting NTLOADER in MBR • After Linux installed: • Run Linux rescue utility • Make GRUB bootable image file (linboot.bin) • Reboot into Windows OS • Copy linboot.bin to C:\ • Configure NTLOADER configuration file Linux+ Guide to Linux Certification, 2e

  23. Using a Windows Boot Loader to Dual Boot Linux (continued) • Boot.ini: File used to configure NTLOADER • For NTLOADER to be able to boot Linux, must specify the path to linboot.bin Linux+ Guide to Linux Certification, 2e

  24. Using a Windows Boot Loader to Dual Boot Linux (continued) Figure 9-8: NTLOADER operating system choice screen at boot time Linux+ Guide to Linux Certification, 2e

  25. Linux Initialization • Kernel assumes control after Linux loaded • Executes first daemon process (init daemon) • /etc/inittab: Configuration file for init daemon Linux+ Guide to Linux Certification, 2e

  26. Runlevels • Runlevel: Defines number and type of daemons loaded into memory and executed • init daemon responsible for changing runlevels • Often called initstates • runlevel command: Displays current and most recent runlevel • init command: Change OS runlevel • telinit command: Alias to init command Linux+ Guide to Linux Certification, 2e

  27. The /etc/inittab File • Consulted to start or stop daemons • /etc/rc.d/rc.sysinit: First script executed during system startup • Init hardware, set variables, check filesystems, perform system tasks for daemon loading • mingetty program: Displays login prompt on character-based terminals • /etc/rc.d/rc.local file: Performs post-system-startup tasks Linux+ Guide to Linux Certification, 2e

  28. The /etc/inittab File (continued) • /etc/rc.d/rc command: Executes all files starting with S or K in /etc/rc.d/rc*.d/ • Runlevel must be specified • e.g., /etc/rc.d/rc 5 will execute files in /etc/rc.d/rc5.d/ • Symbolic links to scripts that start daemons • S means “Start,” K means “Kill” Linux+ Guide to Linux Certification, 2e

  29. The /etc/inittab File (continued) Figure 9-9: The Linux initialization process Linux+ Guide to Linux Certification, 2e

  30. Configuring Daemon Startup • Most symbolic links in /etc/rc.d/rc*.d point to daemon executable files in /etc/rc.d/init.d • Most daemons accept arguments start, stop, restart • To add daemons to be automatically started: • Add executable to /etc/rc.d/init.d • Create appropriate links to /etc/rc.d/rc*.d • ntsysv utility: Modifies file entries in /etc/rc.d/rc*.d directories Linux+ Guide to Linux Certification, 2e

  31. Configuring Daemon Startup (continued) Figure 9-10: Results of ntsysv―level 5 command Linux+ Guide to Linux Certification, 2e

  32. The X Windows System: Linux GUI Components Figure 9-11: Components of the Linux GUI Linux+ Guide to Linux Certification, 2e

  33. X Windows • X Windows: Core component of Linux GUI • X client: Requests graphics from X server and displays them • Does not need to run on same computer as X Windows • X server: Draws graphics • XFree86: OSS version of X Windows • Originally intended for Intelx86 platform Linux+ Guide to Linux Certification, 2e

  34. Windows Managers and Desktop Environments • Window manager: Modifies look and feel of X Windows • Desktop environment: Works with a window manager to provide standard GUI environment • Uses standard programs and development tools • KDE and GNOME are most common Linux+ Guide to Linux Certification, 2e

  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 Red Hat Linux • Sawfish Window Manager • GTK+ toolkit • Xfce Desktop Environment: Consumes less hardware resources than KDE or GNOME Linux+ Guide to Linux Certification, 2e

  36. Windows Managers and Desktop Environments (continued) Figure 9-12: The KDE desktop Linux+ Guide to Linux Certification, 2e

  37. Windows Managers and Desktop Environments (continued) Figure 9-13: The GNOME desktop Linux+ Guide to Linux Certification, 2e

  38. Windows Managers and Desktop Environments (continued) Figure 9-14: The Xfce desktop Linux+ Guide to Linux Certification, 2e

  39. Windows Managers and Desktop Environments (continued) Figure 9-15: The Tab Window Manager Linux+ Guide to Linux Certification, 2e

  40. Starting and Stopping X Windows • runlevel 5 starts gdm • Displays graphical login screen • Allows user to choose the desktop environment or Window Manager • /etc/X11/gdm/gdm.conf: Contains gdm configuration data • For runlevel 3: • Start gdm manually • Or, use startx command Linux+ Guide to Linux Certification, 2e

  41. Starting and Stopping X Windows (continued) Figure 9-16: The GNOME Display Manager Linux+ Guide to Linux Certification, 2e

  42. Starting and Stopping X Windows (continued) • startx command: start X Windows and Window Manager or desktop environment specified in .Xclients file in home directory • Usually points to .Xclients-default file • Edit .Xclients-defaults file to start other desktops or Window Managers on X Windows • Desktop Switching Tool: Change settings used in the .Xclients-default file from KDE or GNOME Linux+ Guide to Linux Certification, 2e

  43. Starting and Stopping X Windows (continued) Figure 9-17: The Desktop Switching Tool Linux+ Guide to Linux Certification, 2e

  44. Configuring X Windows • X Windows interfaces with video hardware • Requires information regarding keyboard, mouse, monitor, and video adapter card • Required video adapter card information: • Model • Amount of RAM • Chipset • Required monitor information: • Maximum resolution supported • Horizontal sync (hsync) range • Vertical sync (vsync) range Linux+ Guide to Linux Certification, 2e

  45. Configuring X Windows (continued) • Mouse, keyboard, monitor, and video adapter card information stored in a file • /etc/X11/xorg.conf: X.org implementation of X Windows • /etc/X11/XF86Config: XFree86 implementation of X Windows • mouseconfig and system-config-mouse commands: Configure mouse Linux+ Guide to Linux Certification, 2e

  46. Configuring X Windows (continued) Figure 9-18: Mouse configuration using mouseconfig Linux+ Guide to Linux Certification, 2e

  47. Configuring X Windows (continued) • system-config-keyboard command: Configure keyboard • system-config-display command: Configure video adapter card and monitor • xvidtune utility: Fine-tune the vsync and hsync of the video card Linux+ Guide to Linux Certification, 2e

  48. Configuring X Windows (continued) Figure 9-19: Keyboard configuration using system-config-keyboard Linux+ Guide to Linux Certification, 2e

  49. Configuring X Windows (continued) Figure 9-20: Configuring resolution and color depth using system-config-display Linux+ Guide to Linux Certification, 2e

  50. Configuring X Windows (continued) Figure 9-21: Configuring video card and monitor hardware using system-config-display Linux+ Guide to Linux Certification, 2e

More Related