
- •About the Author
- •Credits
- •How This Book Is Organized
- •Part I: Linux Basics
- •Part II: Installation
- •Part III: Configuration
- •Part IV: Administration
- •Part V: Maintaining the Linux System
- •How Each Chapter Is Structured
- •How to Use This Book
- •Conventions Used in This Book
- •What is Linux?
- •The origin of UNIX
- •Who started Linux?
- •Understanding Open Source
- •Understanding Closed Source
- •Understanding Artistic License
- •Is Freeware really free?
- •Is Shareware never free?
- •A comparison and contrast of licensing methods
- •The Growth of Linux
- •Linux on a Personal Computer
- •Graphical installation
- •Hardware detection
- •Graphical user interface
- •Linux limitations on the PC
- •Linux succeeds on the PC
- •Linux on workstations
- •Linux on servers
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux Kernel
- •Kernel versions
- •Kernel availability
- •Linux Distributions
- •Beehive
- •BlueCat
- •Caldera OpenLinux
- •Debian
- •Corel
- •DragonLinux
- •Elfstone
- •Gentoo
- •Hard Hat Linux
- •KRUD
- •LinuxPPC
- •Mandrake
- •Phat Linux
- •Slackware
- •StormLinux
- •SuSE
- •TurboLinux
- •Yellow Dog Linux
- •Mini and Specialty Distributions
- •Astaro
- •KYZO
- •FlightLinux
- •NetMAX
- •Packages and Packaging Solutions
- •Red Hat Package Manager
- •Debian Package Management System
- •Tarball
- •Linux Resources
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux In the Real World
- •Word Processing
- •Spreadsheets and databases
- •Web browsing
- •File transfer
- •More, more, and more applications
- •The Server and DNS
- •A Linux Web server
- •Linux e-mail server
- •File servers
- •Proxy, news, and search servers
- •FTP servers
- •Firewalls
- •Determining Linux Roles and Services
- •Comparing Linux with other operating systems
- •Hardware compatibility
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Installing Linux
- •Final Preparations for Installation
- •Verification
- •Package selection
- •Final hardware verification
- •Pre-installation partitioning planning
- •Installing Linux
- •Text or GUI installation
- •Basic setup of Linux
- •Selecting the machine type
- •Partitioning the hard disk drive
- •Installing a boot manager
- •Creating the Boot Diskette
- •Networking
- •Additional installation information
- •Accounts and passwords
- •Additional packages to install
- •GUI installation
- •Obtaining video card information
- •Configuring the X windows system
- •Selecting the windows manager or desktop environment
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Answers to Assessment Questions
- •Scenarios
- •Alternative to the GUI Installation
- •Command Line installation
- •Install the Linux system
- •Network installations of Linux
- •Review of a Linux Installation
- •Installation media
- •Initial selections
- •Installation type or class
- •Disk partitioning and formatting
- •Installing LILO
- •Network configuration
- •User accounts
- •Authentication methods
- •Package selection and installation
- •A Dual-Boot Installation of Linux
- •Linux with Microsoft Windows
- •Linux with Microsoft Windows NT and 2000
- •Linux and Solaris
- •Linux and other operating systems
- •Installing Additional Software with gzip and tar
- •Installing Additional Software with RPM
- •Removing software with RPM
- •Upgrading software with RPM
- •Query the RPM software
- •Verify the RPM software
- •Verify the package files
- •Upgrading the Kernel
- •Upgrading a Linux Kernel
- •System Log Files
- •The Final Test of the Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What is the X Window System?
- •The X Window System
- •X Client and Server communications
- •X Window Manager
- •Configuring X Window Systems
- •Custom X Window System Programs
- •Manual Configuration of the X Window System
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic Network Services
- •TCP/IP Protocol Suite
- •Connection protocols needed
- •Other network protocols
- •Configuring Basic Network Services
- •Host name
- •IP addressing
- •DHCP
- •Netmask
- •Hardware resources
- •Routing and gateways
- •PPP, SLIP and PLIP connections
- •Server Tasks with
- •IP aliases for virtual hosts
- •Apache Web Server
- •Samba File Server
- •Home directories
- •Disk shares
- •Configuring Client Services
- •SMB/CIFS
- •NIS client configuration
- •NFS client configuration
- •Configuring Internet Services
- •Web browser
- •POP and SMTP
- •TFTP
- •SNMP
- •Remote Access
- •Rlogin
- •Telnet
- •OpenSSH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Adding Hardware
- •Memory
- •Swap
- •Adding a hard drive
- •Video and monitor
- •Printers
- •Configuration files
- •Setting environment variables
- •BASH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic User and Group Administration
- •What are users and groups?
- •Creating users
- •Change user information
- •Deleting users
- •Creating groups
- •Getting Around Linux
- •Navigating Linux
- •Common file and directory commands
- •Setting File and Directory Permissions
- •Mounting and Managing File Systems
- •Mount
- •Umount
- •Mounted file systems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Multi-User Environment
- •The creation of Virtual Consoles
- •The Linux Terminal Server Project
- •Configurations for remote systems
- •Monitoring remote connections
- •Common Shell Commands
- •Basic shell scripts
- •Caution using root access
- •Navigating the GUI interface
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Runlevels
- •init
- •Shutting down Linux
- •Managing Linux Services
- •Configuring Linux Printing
- •lpd daemon
- •/etc/printcap
- •Printing management
- •Using the vi Editor
- •vi operation modes
- •Editing text files
- •Using the
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disk and File System Management
- •Repairing Partitions
- •System Automation and Scheduling
- •cron
- •Core Dumps
- •Analyzing core dumps
- •GNU Debugger
- •Managing Networking Interfaces
- •Installing System Packages and Patches
- •Compressed archive
- •Debian Package Installer
- •Slackware Package Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Processes
- •Core services versus non-critical services
- •Process administration
- •Process control
- •Monitoring Log Files
- •Maintaining Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Security
- •Securing the Environment
- •Location
- •Environment
- •System Security
- •System/user files
- •Permissions
- •Log auditing
- •Backups
- •Linux Security Best Practices
- •Network security
- •Firewall
- •System security
- •Securing a Web server
- •Securing an FTP server
- •FTP program version
- •FTP configuration files
- •Process security
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disaster Recovery Planning
- •Types of data
- •Frequency and Scheduling
- •Storage and media types
- •Recovering data
- •Offsite storage
- •Linux Backup Tools and Commands
- •Third party tools
- •Tape devices
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Identifying the Problem
- •Methodology and Best Practices
- •Troubleshooting Resources
- •Documentation resources
- •Internet resources
- •System Log Files
- •Tools for Log Files
- •Output to another file
- •Locating files
- •Process Configuration and Management
- •Stopping, Starting, and Restarting Processes
- •Configuration Files
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Examining the Startup Process
- •Boot process steps
- •Analyzing Boot Process Errors
- •Common Boot Problems
- •Using System Status Tools
- •File System Check
- •System Resource Commands
- •Using the System Boot Disk
- •Types of boot disks
- •Creating a boot disk
- •Creating a rescue/utility disk
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Common User Problems
- •Login problems
- •File and directory permissions
- •Printing problems
- •Mail problems
- •Software Package Problems
- •Package dependencies
- •Software and version conflicts
- •Backup and Restore Errors
- •Backup hardware
- •Backup software
- •File restore errors
- •Application Failures
- •Log files
- •Process and daemon errors
- •Web server errors
- •Telnet
- •Mail services
- •Basic Networking Troubleshooting
- •Networking connectivity
- •Network hardware problems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Mainboard Components
- •BIOS
- •System memory
- •System Resources
- •I/O addresses
- •Direct memory access
- •Laptop Considerations
- •PCMCIA
- •Linux Peripheral Configuration
- •Installing and Configuring SCSI Devices
- •SCSI definitions
- •SCSI technologies
- •SCSI cabling and termination
- •SCSI device configuration
- •Linux SCSI devices
- •ATA/IDE Devices
- •IDE drive configuration
- •Linux ATA/IDE Drive configuration
- •Linux Support for Other Devices
- •IEEE 1394 (Firewire)
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What’s on the CD-ROM
- •System Requirements
- •Using the CD with Microsoft Windows
- •Using the CD with Linux
- •Microsoft Windows applications
- •Linux applications
- •Troubleshooting
- •Sample Exam
- •Exam Questions
- •Exam Answers
- •Taking a CompTIA Exam
- •How to register for an exam
- •What to expect at the testing center
- •Your exam results
- •If you don’t receive a passing score
- •About the Linux + Exam
- •Preparing for the Linux+ Exam
- •For More Information
- •Preamble
- •No Warranty
- •Glossary
- •Index

476 Chapter 15 Study Guide
7.Add the file to your list of files to extract from the archive: restore> add file.txt
8.Begin the restore process by using the extract command from the restore prompt:
restore> extract
9.After the operation completes, exit the restore process, and check to see if your file has been restored:
ls /home/root
Answers to Chapter Questions
Chapter Pre-test
1.The dump command is used to back up entire file systems and directories.
2.In case the system has crashed and needs to be restored, you will have copies of your original configuration files.
3.The cpio command is used to copy files in and out of an archive file.
4.You may overwrite the original file that has new data in it.
5.Offsite storage will protect your tape data in the event your location suffers a natural disaster, such as a fire or flood.
6.Critical user data should be backed up at least once a day. If the data is from a high-volume transactional database system, it should be backed up several times a day.
7.The tar command can create a tape archive file, which can combine several files and directories into one archive file.
8.The differential backup method backs up all files since the last full backup.
9.The restore command is used to restore files that were backed up using the dump command.
10.The incremental backup method backs up files that have changed since the last backup, which may have been a full, differential, or incremental backup.
Assessment Questions
1.A. By sending the tapes offsite, you protect them from physical damage that may occur if a natural disaster strikes the office building. For review, see the “Offsite storage” section.
2.C. The entire operating system can’t be restored from tape. It is best to reinstall the core operating system, and then restore system configuration files and user data from tape. For review, see the “System files” section.

Chapter 15 Study Guide 477
3.D. A differential backup will backup files that have changed since the last full backup. In an incremental scheme, files will be backed up that have changed since the last incremental backup. For review, see the “Backup types” section.
4.B. The administrator will need five tapes for the daily backups, four tapes for the weekly backups, twelve tapes for each of the monthly backups, and one tape for the end-of-the-year backup. For review, see the “Backup rotation methods” section.
5.C. A tape drive has the capacity for these requirements. Backing up to disk will use up too much space, and a CD-ROM and floppy are not nearly big enough to hold that amount of data. For review, see the “Storage and media types” section.
6.D. The command to rewind a tape from the command line is mt rewind. For review, see the “Tape devices” section.
7.A. Because the /etc is fairly small, it can easily fit on a floppy disk. For review, see the “System files” section.
8.B. Third party backup software offers these types of advanced features for users who need excellent reporting and management capabilities. For review, see the “Linux Backup Tools and Commands” section.
9.D. The correct command is tar -cvf /dev/tape /home. The -xvf option is used to extract files from an archive. For review, see the “Commands “ section.
10.C. An incremental backup will only back up files that have changed since the last backup. A differential backup will back up all files that have changed since the last full backup. For review, see the “Backup types” section.
11.A. The correct command is tar -cvf /mnt/backup. The /mnt/backup directory should be on another machine to be fully effective as a backup strategy. For review, see the “Commands” section.
12.D. Because third party backup programs use proprietary formats for backups, you need the same program to perform a restore. For review, see the “Third party tools” section.
13.A. Media errors usually indicate that the tape media is damaged, or that the tape drive heads need cleaning. For review, see the “Storage and media types” section.
14.D. An archive operation will take the files, back them up to a device, and then remove the files from the original server. This helps save disk space that’s taken up by outdated files that can be moved offsite. For review, see the “Backup types” section.
15.B. The easiest command to use to back up an entire file system is the dump command. Files can be restored from a dump operation by using the restore command. For review, see the “Commands” section.
16.C. The /etc directory contains most of the Linux system configuration files. Just using a floppy drive can easily back it up, but you can use any backup media. For review, see the “System files” section.
17.C. A full backup strategy will always perform a full backup of all files. This takes much more time and space than other methods, but is it the most

478 Chapter 15 Study Guide
complete method and allows for easy file restoration. For review, see the “Backup Types” section.
18.B. The find file.txt -print | cpio -p /dev/tape command will find the file file.txt within the tape archive, and print the output to the screen. For review, see the “Commands” section.
19.D. The restore command will restore files that have been backed up using the dump command. For review, see the “Commands” section.
20.C. The device name of the first SCSI tape drive is /dev/st0. The drives are numbered starting from zero. The drive type /dev/nst1 means that the tape drive is the second SCSI drive, and it is non-rewinding. For review, see the “Tape devices” section.
Scenarios
1.Because these databases consume a large amount of space, you will definitely use a tape backup method, which can handle large size backups quickly and efficiently.
Since the data needs to be retained for a long period of time, the best backup method to use is the Grandfather/Father/Son method, which implements both weekly and monthly backups. A yearly backup can also be enabled at the end of the year.
For backup software, you need a third party solution to offer the reporting and management tools that they need. Using command line backup tools, such as tar and dump, don’t give the functionality to create extensive reports on backup logs.
2.Because the dump command was used to back up the files, you must use the restore command to extract them. Find the right file on tape before invoking the command. Since it is the first file, you can mount the tape, and forward it to the first archive:
mt -f /dev/tape asf 0
This command chooses the first file on the tape because they are numbered beginning with zero. Then, invoke the restore command:
restore
At the restore prompt, you can simply use the cd command to change directory to the /home/ directory:
restore> cd /home
Now you can add the jsmith directory to the list that you want to extract, and then invoke the extract command.
restore> add jsmith restore> extract

Troubleshooting
and Maintaining
System
Hardware
As an administrator, one of your main responsibilities on the job will be troubleshooting. The chapters in this
part provide you with an overall troubleshooting procedure that you can apply to most situations. The first step in this process is to determine what the specific problem is.
Many tools and utilities are available to help you solve the problem — after you know what it is — and you will need to know how to use them. I explain how to use troubleshooting resources, such as existing documentation and vendor resources, to examine configuration files based on symptoms of a problem to help resolve the issue. This part also explores how to recognize common errors (for example, package dependencies, library errors, version conflicts), and how to identify backup and restore errors. You will also learn how to take appropriate action on boot errors and use network utilities to identify network and connectivity problems.
This part also explores basic knowledge and skills of core and peripheral hardware installation, configuration, and troubleshooting in a Linux environment, focusing on both generic hardware issues and Linux-specific hardware issues.
The end of this part will teach you how to identify basic terms, concepts, and functions of system components, including how each component should work during normal operation and during the boot process; configuring IRQs, BIOS, DMA, SCSI settings and cabling; and removing and replacing hardware accessories. You will also learn to identify basic networking concepts, procedures for diagnosing and troubleshooting ATA, SCSI, peripheral devices, and supported hardware. Finally, you will learn to troubleshoot core system hardware, and to identify and maintain mobile system hardware, such as PCMCIA and APM.
P A R T
VI
In This Part
Chapter 16
Linux Troubleshooting
Basics
Chapter 17
Troubleshooting the
Boot Process
Chapter 18
Troubleshooting
Software and
Networking
Chapter 19
Installing and
Maintaining System
Hardware


Linux
Troubleshooting
Basics
EXAM OBJECTIVES
6.1 Identify and locate the problem by determining whether the problem is hardware, operating system, application software, configuration, or the user
6.2 Describe troubleshooting best practices (i.e., methodology)
6.3 Examine and edit configuration files based on symptoms of a problem using system utilities
6.4 Examine, start, and stop processes based on the signs and symptoms of a problem
6.7 Inspect and determine cause of errors from system log files
6.14 Identify and use trouble shooting commands (e.g., locate, find, grep, ?, <, >, >>, cat, tail)
6.15 Locate troubleshooting resources and update as allowable (e.g., Web, man pages, howtos, infopages, LUGs)
16C H A P T E R

482 |
Part VI Troubleshooting and Maintaining System Hardware |
CHAPTER PRE-TEST
1.Where can you find the manual pages for commands on your system?
2.What is the purpose of the locate utility?
3.Why is it useful to tail the system log file?
4.Where are most hardware problems first detected in the boot process?
5.What is the name and location of the main system log file?
6.Where are the system configuration files located?
7.What is your first step in identifying a problem?
8.What is the purpose of using the | during a command?
9.Where can you find the most valuable collection of Linux documentation?
10.What command can you use to view current running processes?
Answers to these questions can be found at the end of the chapter.