- •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
Chapter 16 Linux Troubleshooting Basics 485
configuration file, remember to restart the particular process or application that you are working on.
8.Use as many resources as possible: When you are stumped, don’t be afraid to use as many outside resources as possible. If you have a maintenance contract with your software or hardware vendor, call them immediately. Utilize resources on the Internet, such as technical and vendor Web sites with searchable troubleshooting databases.
9.Document your solution: After you have solved your problem, document the solution in detail. You may need this information again in the future if the same problem appears, and you can avoid the additional troubleshooting time by referring to your own notes.
Troubleshooting Resources
6.15 Locate troubleshooting resources and update as allowable (e.g., Web, man pages, howtos, infopages, LUGs)
A wide variety of resources are available for the Linux user and system administrator when troubleshooting problems. From the inception of Linux (and due to its Open Source model), most companies have never provided any official software support for Linux. Linux users and experts support the system by communicating with each other the tips and tricks that make Linux run smoothly. Any problem that you may have with a Linux system, you can bet that someone, somewhere, has already encountered the same problem and has created and documented a solution. The documentation support for Linux is massive, and several resources are available to you when troubleshooting a problem.
Know what is the best troubleshooting resource for the situation.
Documentation resources
A vast amount of documentation for Linux is available for administrators, developers, and users, who have all shared information on Linux configuration, troubleshooting, and general operating issues. This section details the different types of documentation that you can access when troubleshooting your Linux system.
MAN pages
MAN pages, or manual pages, are the original Unix way to look up information on specific commands and processes on your system by consulting an online manual. By using a command’s MAN page, you can find out exactly what the command does, how to execute it, and all of the options that you can use with the command. The MAN page is split into different sections, each giving the command name and its function, a synopsis of the syntax for the command, and a description, which lists all of the available options for that command.
486 |
Part VI Troubleshooting and Maintaining System Hardware |
When troubleshooting, you often need to quickly check the options that you can use with a particular command — using the MAN page command is the fastest way to do so. To use the man command, simply type the name of the command that you want to look up:
man lilo
For example, here is a listing of the MAN page for the lilo command:
Name
lilo - install boot loader Synopsis
Main function:
/sbin/lilo - install boot loader
Auxiliary uses: /sbin/lilo -q - query map
/sbin/lilo -R - set default command line for next reboot /sbin/lilo -I - inquire path name of current kernel /sbin/lilo {-u|-U} - uninstall lilo
Description
lilo installs a boot loader that will be activated next time you boot. It has lots of options.
-v Increase verbosity. Giving one or more -v options will make lilo more verbose.
-q List the currently mapped files. lilo maintains a
file, by default /boot/map, containing the name and location of the kernel(s) to boot. This option will list the names therein.
-m map-file
Use specified map file instead of the default.
-C config-file
lilo reads its instructions about what files to map from its config file, by default /etc/lilo.conf. This option can be used to specify a non-default config file.
-d delay
If you have specified several kernels, and press Shift at boot-time, the boot loader will present you with a choice of which system to boot. After a timeout period the first kernel in the list is booted. This option specifies the timeout delay in deciseconds.
-D label
Use the kernel with the given label, instead of the first one in the list, as the default kernel to boot.
Chapter 16 Linux Troubleshooting Basics 487
-r root-directory
Before doing anything else, do a chroot to the indicated directory. Used for repairing a setup from a boot floppy.
-t Test only. Do not really write a new boot sector or
map file. Use together with -v to find out what lilo is about to do.
-c Enable map compaction. This will merge read requests from adjacent sectors. Speeds up the booting (especially from floppy).
-f disk-tab
Specify disk geometry parameter file. (The default is /etc/disktab.)
-i boot-sector
Specify a file to be used as the new boot sector. (The default is /boot/boot.b.)
-l Generate linear sector addresses instead of sector/head/cylinder addresses.
-P {fix|ignore}
Fix (or ignore) ‘corrupt’ partition tables, i.e., partition tables with linear and sector/head/ cylinder addresses that do not correspond.
-s save-file
When lilo overwrites the boot sector, it preserves the old contents in a file, by default /boot/boot.NNNN where NNNN depends on the device. This option specifies an alternate save file for the boot sector. (Or, together with the -u option, specifies from where to restore the boot sector.)
-S save-file
Normally, lilo will not overwrite an existing save file. This options says that overwriting is allowed.
-u device-name
Uninstall lilo, by copying the saved boot sector back. A time-stamp is checked.
-U device-name
Idem, but do not check the time-stamp.
-R command line
This option sets the default command for the boot loader the next time it executes. The boot loader will then erase this line: this is a once-only
488 |
Part VI Troubleshooting and Maintaining System Hardware |
command. It is typically used in reboot scripts, just before calling ‘shutdown -r’.
-I label
The label of the running kernel can be found in the environment variable BOOT_IMAGE after startup. This command will print the corresponding path name on stdout.
-V Print version number.
The above command line options correspond to the key words in the config file indicated below.
-b bootdev |
boot=bootdev |
|
|
-c |
compact |
|
-d dsec |
delay=dsec |
|
-D label |
default=label |
|
-i bootsector |
install=bootsector |
|
-f file |
disktab=file |
|
-l |
linear |
|
-m mapfile |
map=mapfile |
|
-P fix |
fix-table |
|
-P ignore |
ignore-table |
|
-s file |
backup=file |
|
-S file |
force-backup=file |
|
-v |
verbose=level |
See Also
lilo.conf(5).
The lilo distribution comes with very extensive documenta-
tion.
Author
Werner Almesberger (almesber@bernina.ethz.ch).
Linux Documentation Project
The Linux Documentation Project was created to store all available Linux-related documentation, and to offer a central source for all types of documentation that is easy to navigate and search. It is a repository for all types of documentation, such as HOWTOs, guides, MAN pages, and information for new Linux users. For more information, see the home page of the Linux Documentation Project, which is located at www.linuxdoc.org.
The following sections list the types of documents that can be found through the Linux Documentation Project.
HOWTO
The Linux HOWTOs are detailed “how to” documents for specific subjects. A large number of HOWTO documents detail how to configure everything from PPP, to firewalls, to writing CDs. They come in a variety of formats, such as plain text, HTML, PDF, Postscript, and SGML.