Contents
This chapter describes a range of potential problems and their solutions. Even if your situation is not precisely listed here, there may be one similar enough to offer hints to the solution of your problem.
Linux reports things in a very detailed way. There are several places to
look when you encounter problems with your system, most of which are
standard to Linux systems in general, and some of which are relevant to
openSUSE systems. The two most important system logs are
/var/log/boot.msg
and
/var/log/messages
.
A list of the most frequently checked log files follows with the
description of their typical purpose. Paths containing
~
refer to the current user's home directory.
Table 9.1. Log Files
Log File |
Description |
---|---|
|
Messages from the desktop applications currently running. |
|
Log files from AppArmor, see Part “Confining Privileges with Novell AppArmor” (↑Security Guide) for detailed information. |
|
Log file from Audit to track any access to files, directories, or resources of your system, and trace system calls. See Part “The Linux Audit Framework” (↑Security Guide) for detailed information. |
|
Messages from the kernel reported during the boot process. |
|
Messages from the mail system. |
|
Ongoing messages from the kernel and system log daemon (when running). |
|
Log file from NetworkManager to collect problems with network connectivity |
|
Directory containing Samba server and client log messages. |
|
Hardware messages from the SaX display and KVM system. |
|
All messages from the kernel and system log daemon with the “warning” level or higher. |
|
Binary file containing user login records for the current machine session. View it with last. |
|
Various start-up and runtime logs from the X Window system. It is useful for debugging failed X start-ups. |
|
Directory containing YaST's actions and their results. |
|
Log file of zypper. |
Apart from log files, your machine also supplies you with information
about the running system. See
Table 9.2: System Information With the /proc
File System
Table 9.2. System Information With the /proc
File System
File |
Description |
---|---|
|
Contains processor information, including its type, make, model, and performance. |
|
Shows which DMA channels are currently being used. |
|
Shows which interrupts are in use, and how many of each have been in use. |
|
Displays the status of I/O (input/output) memory. |
|
Shows which I/O ports are in use at the moment. |
|
Displays memory status. |
|
Displays the individual modules. |
|
Displays devices currently mounted. |
|
Shows the partitioning of all hard disks. |
|
Displays the current version of Linux. |
Apart from the /proc
file system, the Linux kernel
exports information with the sysfs
module, an
in-memory filesystem. This module represents kernel objects, their
attributes and relationships. For more information about
sysfs
, see the context of udev in
Chapter Dynamic Kernel Device Management with udev (↑Reference).
Table 9.3
contains an overview of the most common directories under
/sys
.
Table 9.3. System Information With the /sys
File System
File |
Description |
---|---|
|
Contains subdirectories for each block device discovered in the system. Generally, these are mostly disk type devices. |
|
Contains subdirectories for each physical bus type. |
|
Contains subdirectories grouped together as a functional types of devices (like graphics, net, printer, etc.) |
|
Contains the global device hierarchy. |
Linux comes with a number of tools for system analysis and monitoring. See Chapter System Monitoring Utilities (↑Reference) for a selection of the most important ones used in system diagnostics.
Each of the following scenarios begins with a header describing the problem followed by a paragraph or two offering suggested solutions, available references for more detailed solutions, and cross-references to other scenarios that are related.
Installation problems are situations when a machine fails to install. It may fail entirely or it may not be able to start the graphical installer. This section highlights some of the typical problems you may run into, and offers possible solutions or workarounds for these kinds of situations.
If you encounter any problems using the openSUSE installation media, check the integrity of your installation media. Boot from the media and choose
from the boot menu. In a running system, start YaST and choose + . Media problems are more probable with the media you burn yourself. Burning the media at a low speed (4x) helps avoiding problems.Display detected hardware and technical data using
+ in YaST. Click any node of the tree for more information about a device. This module is especially useful, when submitting a support request for which you need information about your hardware.Save the displayed hardware information to a file by clicking
. Select the desired directory and filename then click to create the file.If your computer does not contain a bootable DVD-ROM drive or if the one you have is not supported by Linux, there are several options you can install your machine without a built-in DVD drive:
If it is supported by your BIOS and the installation kernel, boot from external DVD drives or USB storage devices.
If a machine lacks a DVD drive, but provides a working ethernet connection, perform a completely network-based installation. See Section “Remote Installation via VNC—PXE Boot and Wake on LAN” (Chapter 1, Remote Installation, ↑Reference) and Section “Remote Installation via SSH—PXE Boot and Wake on LAN” (Chapter 1, Remote Installation, ↑Reference) for details.
Linux supports most existing DVD drives. If the system has neither a DVD drive nor a floppy disk, it is still possible that an external DVD drive, connected through USB, FireWire, or SCSI, can be used to boot the system. This depends mainly on the interaction of the BIOS and the hardware used. Sometimes a BIOS update may help if you encounter problems.
When installing from a KDE or GNOME Live CD, you can also create a “Live USB stick” to boot from. Refer to http://en.opensuse.org/Live_USB_stick for detailed instructions.
One reason why a machine does not boot the installation media can be an incorrect boot sequence setting in BIOS. The BIOS boot sequence must have DVD drive set as the first entry for booting. Otherwise the machine would try to boot from another medium, typically the hard disk. Guidance for changing the BIOS boot sequence can be found the documentation provided with your motherboard, or in the following paragraphs.
The BIOS is the software that enables the very basic functions of a computer. Motherboard vendors provide a BIOS specifically made for their hardware. Normally, the BIOS setup can only be accessed at a specific time—when the machine is booting. During this initialization phase, the machine performs a number of diagnostic hardware tests. One of them is a memory check, indicated by a memory counter. When the counter appears, look for a line, usually below the counter or somewhere at the bottom, mentioning the key to press to access the BIOS setup. Usually the key to press is one of Del, F1, or Esc. Press this key until the BIOS setup screen appears.
Procedure 9.1. Changing the BIOS Boot Sequence
Enter the BIOS using the proper key as announced by the boot routines and wait for the BIOS screen to appear.
To change the boot sequence in an AWARD BIOS, look for the Enter.
entry. Other manufacturers may have a different name for this, such as . When you have found the entry, select it and confirm with
In the screen that opens, look for a subentry called C,A
or A,C
.
In the former case, the machine first searches the hard disk (C) then
the floppy drive (A) to find a bootable medium. Change the settings by
pressing PgUp or PgDown until the
sequence is A,CDROM,C
.
Leave the BIOS setup screen by pressing Esc. To save the changes, select , or press F10. To confirm that your settings should be saved, press Y.
Procedure 9.2. Changing the Boot Sequence in a SCSI BIOS (Adaptec Host Adapter)
Open the setup by pressing Ctrl+A.
Select
. The connected hardware components are now displayed.Make note of the SCSI ID of your DVD drive.
Exit the menu with Esc.
Open Enter.
. Under , select and pressEnter the ID of the DVD drive and press Enter again.
Press Esc twice to return to the start screen of the SCSI BIOS.
Exit this screen and confirm with
to boot the computer.Regardless of what language and keyboard layout your final installation will be using, most BIOS configurations use the US keyboard layout as depicted in the following figure:
Some hardware types, mainly very old or very recent ones, fail to install. In many cases, this may happen because support for this type of hardware is missing in the installation kernel, or due to certain functionality included in this kernel, such as ACPI, that can still cause problems on some hardware.
If your system fails to install using the standard
mode from the first installation boot screen, try the following:With the DVD still in the drive, reboot the machine with Ctrl-Alt-Del or using the hardware reset button.
When the boot screen appears, press F5, use the arrow keys of your keyboard to navigate to and press Enter to launch the boot and installation process. This option disables the support for ACPI power management techniques.
Proceed with the installation as described in Chapter 1, Installation with YaST.
If this fails, proceed as above, but choose
instead. This option disables ACPI and DMA support. Most hardware will boot with this option.
If both of these options fail, use the boot options prompt to pass any
additional parameters needed to support this type of hardware to the
installation kernel. For more information about the parameters available
as boot options, refer to the kernel documentation located in
/usr/src/linux/Documentation/kernel-parameters.txt
.
![]() | Obtaining Kernel Documentation |
---|---|
Install the |
There are various other ACPI-related kernel parameters that can be entered at the boot prompt prior to booting for installation:
acpi=off
This parameter disables the complete ACPI subsystem on your computer. This may be useful if your computer cannot handle ACPI at all or if you think ACPI in your computer causes trouble.
acpi=force
Always enable ACPI even if your computer has an old BIOS dated before
the year 2000. This parameter also enables ACPI if it is set in
addition to acpi=off
.
acpi=noirq
Do not use ACPI for IRQ routing.
acpi=ht
Run only enough ACPI to enable hyper-threading.
acpi=strict
Be less tolerant of platforms that are not strictly ACPI specification compliant.
pci=noacpi
Disable PCI IRQ routing of the new ACPI system.
pnpacpi=off
This option is for serial or parallel problems when your BIOS setup contains wrong interrupts or ports.
notsc
Disable the time stamp counter. This option can be used to work around timing problems on your systems. It is a recent feature, if you see regressions on your machine, especially time related or even total hangs, this option is worth a try.
nohz=off
Disable the nohz feature. If your machine hangs, this option may help. Otherwise it is of no use.
Once you have determined the right parameter combination, YaST automatically writes them to the boot loader configuration to make sure that the system boots properly next time.
If unexplainable errors occur when the kernel is loaded or during the installation, select
in the boot menu to check the memory. If returns an error, it is usually a hardware error.After you insert the medium into your drive and reboot your machine, the installation screen comes up, but after you select
, the graphical installer does not start.There are several ways to deal with this situation:
Try to select another screen resolution for the installation dialogs.
Select
for installation.Do a remote installation via VNC using the graphical installer.
Procedure 9.3. Change Screen Resolution for Installation
Boot for installation.
Press F3 to open a menu from which to select a lower resolution for installation purposes.
Procedure 9.4. Installation in Text Mode
Boot for installation.
Press F3 and select .
Procedure 9.5. VNC Installation
Boot for installation.
Enter the following text at the boot options prompt:
vnc=1 vncpassword=some_password
Replace some_password
with the password to
use for VNC installation.
Select Enter to start the installation .
then pressInstead of starting right into the graphical installation routine, the system continues to run in a text mode, then halts, displaying a message containing the IP address and port number at which the installer can be reached via a browser interface or a VNC viewer application.
If using a browser to access the installer, launch the browser and enter the address information provided by the installation routines on the future openSUSE machine and hit Enter:
http://ip_address_of_machine
:5801
A dialog opens in the browser window prompting you for the VNC password. Enter it and proceed with the installation as described in Chapter 1, Installation with YaST.
![]() | |
Installation via VNC works with any browser under any operating system, provided Java support is enabled. |
Provide the IP address and password to your VNC viewer when prompted. A window opens, displaying the installation dialogs. Proceed with the installation as usual.
You inserted the medium into the drive, the BIOS routines are finished, but the system does not start with the graphical boot screen. Instead it launches a very minimalistic text-based interface. This may happen on any machine not providing sufficient graphics memory for rendering a graphical boot screen.
Although the text boot screen looks minimalistic, it provides nearly the same functionality as the graphical one:
Unlike the graphical interface, the different boot options cannot be selected using the cursor keys of your keyboard. The boot menu of the text mode boot screen offers some keywords to enter at the boot prompt. These keywords map to the options offered in the graphical version. Enter your choice and hit Enter to launch the boot process.
After selecting a boot option, enter the appropriate keyword at the boot prompt or enter some custom boot options as described in Section 9.2.5, “Fails to Boot”. To launch the installation process, press Enter.
Use the F keys to determine the screen resolution for installation. If you need to boot in text mode, choose F3.
Boot problems are situations when your system does not boot properly (does not boot to the expected runlevel and login screen).
If the hardware is functioning properly, it is possible that the boot loader is corrupted and Linux cannot start on the machine. In this case, it is necessary to reinstall the boot loader. To reinstall the boot loader, proceed as follows:
Insert the installation media into the drive.
Reboot the machine.
Select
from the boot menu.Select a language.
Accept the license agreement.
In the
screen, select and set the installation mode to .Once in the YaST System Repair module, select
then select .Restore the original settings and reinstall the boot loader.
Leave YaST System Repair and reboot the system.
Other reasons for the machine not booting may be BIOS-related:
Check your BIOS for references to your hard drive. GRUB may simply not be started if the hard drive itself cannot be found with the current BIOS settings.
Check whether your system's boot order includes the hard disk. If the hard disk option was not enabled, your system may install properly, but fails to boot when access to the hard disk is required.
If the machine comes up, but does not boot into the graphical login
manager, anticipate problems either with the choice of the default
runlevel or the configuration of the X Window System. To check the
runlevel configuration, log in as the
root
user and check whether
the machine is configured to boot into runlevel 5 (graphical desktop). A
quick way to check this is to examine the contents of
/etc/inittab
, as follows:
tux@mercury:~> grep "id:" /etc/inittab id:5:initdefault:
The returned line indicates that the machine's default runlevel
(initdefault
) is set to 5
and that
it should boot to the graphical desktop. If the runlevel is set to any
other number, use the YaST Runlevel Editor module to set it to
5
.
![]() | |
Do not edit the runlevel configuration manually. Otherwise SuSEconfig
(run by YaST) will overwrite these changes on its next run. If you
need to make manual changes here, disable future SuSEconfig changes by
setting |
If the runlevel is set to 5
, your desktop or X
Windows software is probably misconfigured or corrupted. Examine the log
files at /var/log/Xorg.*.log
for detailed messages
from the X server as it attempted to start. If the desktop fails during
start, it may log error messages to
/var/log/messages
. If these error messages hint at
a configuration problem in the X server, try to fix these issues. If the
graphical system still does not come up, consider reinstalling the
graphical desktop.
![]() | Starting X Window System Manually |
---|---|
One quick test: the startx command should force the X Window System to start with the configured defaults if the user is currently logged in on the console. If that does not work, it should log errors to the console. |
Login problems are those where your machine does, in fact, boot to the expected welcome screen or login prompt, but refuses to accept the username and password, or accepts them but then does not behave properly (fails to start the graphic desktop, produces errors, drops to a command line, etc.).
This usually occurs when the system is configured to use network
authentication or directory services and, for some reason, is unable to
retrieve results from its configured servers. The
root
user, as the only local
user, is the only user that can still log in to these machines. The
following are some common reasons why a machine appears functional but
is unable to process logins correctly:
The network is not working. For further directions on this, turn to Section 9.5, “Network Problems”.
DNS is not working at the moment (which prevents GNOME or KDE from working and the system from making validated requests to secure servers). One indication that this is the case is that the machine takes an extremely long time to respond to any action. Find more information about this topic in Section 9.5, “Network Problems”.
If the system is configured to use Kerberos, the system's local time may have drifted past the accepted variance with the Kerberos server time (this is typically 300 seconds). If NTP (network time protocol) is not working properly or local NTP servers are not working, Kerberos authentication ceases to function because it depends on common clock synchronization across the network.
The system's authentication configuration is misconfigured. Check the PAM configuration files involved for any typographical errors or misordering of directives. For additional background information about PAM and the syntax of the configuration files involved, refer to Chapter Authentication with PAM (↑Security Guide).
The home partition is encrypted. Find more information about this topic in Section 9.4.3, “Login to Encrypted Home Partition Fails”.
In all cases that do not involve external network problems, the solution is to reboot the system into single-user mode and repair the configuration before booting again into operating mode and attempting to log in again. To boot into single-user mode:
This is by far the most common problem users encounter, because there are many reasons this can occur. Depending on whether you use local user management and authentication or network authentication, login failures occur for different reasons.
Local user management can fail for the following reasons:
The user may have entered the wrong password.
The user's home directory containing the desktop configuration files is corrupted or write protected.
There may be problems with the X Window System authenticating this particular user, especially if the user's home directory has been used with another Linux distribution prior to installing the current one.
To locate the reason for a local login failure, proceed as follows:
Check whether the user remembered his password correctly before you start debugging the whole authentication mechanism. If the user may not remember his password correctly, use the YaST User Management module to change the user's password. Pay attention to the Caps Lock key and unlock it, if necessary.
Log in as root
and check
/var/log/messages
for error messages of the login
process and of PAM.
Try to log in from a console (using Ctrl+Alt+F1). If this is successful, the blame cannot be put on PAM, because it is possible to authenticate this user on this machine. Try to locate any problems with the X Window System or the desktop (GNOME or KDE). For more information, refer to Section 9.4.4, “Login Successful but GNOME Desktop Fails” and Section 9.4.5, “Login Successful but KDE Desktop Fails”.
If the user's home directory has been used with another Linux
distribution, remove the Xauthority
file in the
user's home. Use a console login via Ctrl+Alt+F1
and run rm .Xauthority as this user. This should
eliminate X authentication problems for this user. Try graphical login
again.
If graphical login still fails, do a console login with Ctrl+Alt+F1.
Try to start an X session on another display—the first one
(:0
) is already in use:
startx -- :1
This should bring up a graphical screen and your desktop. If it does
not, check the log files of the X Window System
(/var/log/Xorg.
)
or the log file for your desktop applications
(displaynumber
.log.xsession-errors
in the user's home directory)
for any irregularities.
If the desktop could not start because of corrupt configuration files, proceed with Section 9.4.4, “Login Successful but GNOME Desktop Fails” or Section 9.4.5, “Login Successful but KDE Desktop Fails”.
The following are some common reasons why network authentication for a particular user may fail on a specific machine:
The user may have entered the wrong password.
The username exists in the machine's local authentication files and is also provided by a network authentication system, causing conflicts.
The home directory exists but is corrupt or unavailable. Perhaps it is write protected or is on a server that is inaccessible at the moment.
The user does not have permission to log in to that particular host in the authentication system.
The machine has changed hostnames, for whatever reason, and the user does not have permission to log in to that host.
The machine cannot reach the authentication server or directory server that contains that user's information.
There may be problems with the X Window System authenticating this particular user, especially if the user's home has been used with another Linux distribution prior to installing the current one.
To locate the cause of the login failures with network authentication, proceed as follows:
Check whether the user remembered their password correctly before you start debugging the whole authentication mechanism.
Determine the directory server which the machine relies on for authentication and make sure that it is up and running and properly communicating with the other machines.
Determine that the user's username and password work on other machines to make sure that his authentication data exists and is properly distributed.
See if another user can log in to the misbehaving machine. If another
user can log in without difficulty or if
root
can log in, log in and
examine the /var/log/messages
file. Locate the
time stamps that correspond to the login attempts and determine if PAM
has produced any error messages.
Try to log in from a console (using Ctrl+Alt+F1). If this is successful, the problem is not with PAM or the directory server on which the user's home is hosted, because it is possible to authenticate this user on this machine. Try to locate any problems with the X Window System or the desktop (GNOME or KDE). For more information, refer to Section 9.4.4, “Login Successful but GNOME Desktop Fails” and Section 9.4.5, “Login Successful but KDE Desktop Fails”.
If the user's home directory has been used with another Linux
distribution, remove the Xauthority
file in the
user's home. Use a console login via Ctrl+Alt+F1
and run rm .Xauthority as this user. This should
eliminate X authentication problems for this user. Try graphical login
again.
If graphical login still fails, do a console login with Ctrl+Alt+F1.
Try to start an X session on another display—the first one
(:0
) is already in use:
startx -- :1
This should bring up a graphical screen and your desktop. If it does
not, check the log files of the X Window System
(/var/log/Xorg.
)
or the log file for your desktop applications
(displaynumber
.log.xsession-errors
in the user's home directory)
for any irregularities.
If the desktop could not start because of corrupt configuration files, proceed with Section 9.4.4, “Login Successful but GNOME Desktop Fails” or Section 9.4.5, “Login Successful but KDE Desktop Fails”.
It is recommended to use an encrypted home partition for laptops. If you cannot log in to your laptop, the reason is usually simple: your partition could not be unlocked.
During the boot time, you have to enter the passphrase to unlock your encrypted partition. If you do not enter it, the boot process continues, leaving the partition locked.
To unlock your encrypted partition, proceed as follows:
Switch to the text console with Ctrl+Alt+F1.
Become root
.
Restart the unlocking process again with:
/etc/init.d/boot.crypto restart
Enter your passphrase to unlock your encrypted partition.
Exit the text console and switch back to the login screen with Alt+F7.
Log in as usual.
If this is the case, it is likely that your GNOME configuration files have become corrupted. Some symptoms may include the keyboard failing to work, the screen geometry becoming distorted, or even the screen coming up as a bare gray field. The important distinction is that if another user logs in, the machine works normally. It is then likely that the problem can be fixed relatively quickly by simply moving the user's GNOME configuration directory to a new location, which causes GNOME to initialize a new one. Although the user is forced to reconfigure GNOME, no data is lost.
Switch to a text console by pressing Ctrl+Alt+F1.
Log in with your user name.
Move the user's GNOME configuration directories to a temporary location:
mv .gconf .gconf-ORIG-RECOVER mv .gnome2 .gnome2-ORIG-RECOVER
Log out.
Log in again, but do not run any applications.
Recover your individual application configuration data (including the
Evolution e-mail client data) by copying the
~/.gconf-ORIG-RECOVER/apps/
directory back into
the new ~/.gconf
directory as follows:
cp -a .gconf-ORIG-RECOVER/apps .gconf/
If this causes the login problems, attempt to recover only the critical application data and reconfigure the remainder of the applications.
There are several reasons why a KDE desktop would not allow users to login. Corrupted cache data can cause login problems as well as corrupt KDE desktop configuration files.
Cache data is used at desktop start-up to increase performance. If this data is corrupted, start-up is slowed down or fails entirely. Removing them forces the desktop start-up routines to start from scratch. This takes more time than a normal start-up, but data is intact after this and the user can login.
To remove the cache files of the KDE desktop, issue the following
command as root
:
rm -rf /tmp/kde-user
/tmp/ksocket-user
Replace user
with your username. Removing
these two directories just removes the corrupted cache files. No real
data is harmed using this procedure.
Corrupted desktop configuration files can always be replaced with the initial configuration files. If you want to recover the user's adjustments, carefully copy them back from their temporary location after the configuration has been restored, using the default configuration values.
To replace a corrupted desktop configuration with the initial configuration values, proceed as follows:
Switch to a text console by pressing Ctrl+Alt+F1.
Log in with your username.
Move the KDE configuration directory and the
.skel
files to a temporary location:
For KDE3 use these commands:
mv .kde .kde-ORIG-RECOVER
mv .skel .skel-ORIG-RECOVER
For KDE4 use these commands:
mv .kde4 .kde4-ORIG-RECOVER
mv .skel .skel-ORIG-RECOVER
Log out.
Log in again.
After the desktop has started successfully, copy the user's own configurations back into place:
cp -a KDEDIR
/share .kde/share
Replace KDEDIR
with the directory from
Step 3.
![]() | |
If the user's own adjustments caused the login to fail and continue
to do so, repeat the procedure as described above, but do not copy
the |
Many problems of your system may be network-related, even though they do not seem to be at first. For example, the reason for a system not allowing users to log in may be a network problem of some kind. This section introduces a simple check list you can apply to identify the cause of any network problem encountered.
Procedure 9.6. How to Identify Network Problems
When checking the network connection of your machine, proceed as follows:
If you use an ethernet connection, check the hardware first. Make sure that your network cable is properly plugged into your computer and router (or hub, etc.). The control lights next to your ethernet connector are normally both be active.
If the connection fails, check whether your network cable works with another machine. If it does, your network card causes the failure. If hubs or switches are included in your network setup, they may be faulty, as well.
If using a wireless connection, check whether the wireless link can be established by other machines. If not, contact the wireless network's administrator.
Once you have checked your basic network connectivity, try to find out which service is not responding. Gather the address information of all network servers needed in your setup. Either look them up in the appropriate YaST module or ask your system administrator. The following list gives some of the typical network servers involved in a setup together with the symptoms of an outage.
A broken or malfunctioning name service affects the network's functionality in many ways. If the local machine relies on any network servers for authentication and these servers cannot be found due to name resolution issues, users would not even be able to log in. Machines in the network managed by a broken name server would not be able to “see” each other and communicate.
A malfunctioning or completely broken NTP service could affect Kerberos authentication and X server functionality.
If any application needs data stored in an NFS mounted directory, it
will not be able to start or function properly if this service was
down or misconfigured. In the worst case scenario, a user's personal
desktop configuration would not come up if their home directory
containing the .gconf
or
.kde
subdirectories could not be found due to a
faulty NFS server.
If any application needs data stored in a directory on a faulty Samba server, it will not be able to start or function properly.
If your openSUSE system relies on a faulty NIS server to provide the user data, users will not be able to log in to this machine.
If your openSUSE system relies on a faulty LDAP server to provide the user data, users will not be able to log in to this machine.
Authentication will not work and login to any machine fails.
Users cannot print.
Check whether the network servers are running and whether your network setup allows you to establish a connection:
![]() | |
The debugging procedure described below only applies to a simple network server/client setup that does not involve any internal routing. It assumes both server and client are members of the same subnet without the need for additional routing. |
Use ping IP address
or
hostname
(replace
hostname
with the hostname of the server)
to check whether each one of them is up and responding to the
network. If this command is successful, it tells you that the host
you were looking for is up and running and that the name service for
your network is configured correctly.
If ping fails with destination host unreachable
,
either your system or the desired server is not properly configured
or down. Check whether your system is reachable by running
ping IP address
or
your_hostname
from another
machine. If you can reach your machine from another machine, it is
the server that is not running at all or not configured correctly.
If ping fails with unknown host
, the name service
is not configured correctly or the hostname used was incorrect. For
further checks on this matter, refer to
Step 4.b.
If ping still fails, either your network card is not configured
correctly or your network hardware is faulty.
Use host hostname
to
check whether the hostname of the server you are trying to connect to
is properly translated into an IP address and vice versa. If this
command returns the IP address of this host, the name service is up
and running. If the host command fails, check all
network configuration files relating to name and address resolution
on your host:
/etc/resolv.conf
This file is used to keep track of the name server and domain you are currently using. It can be modified manually or automatically adjusted by YaST or DHCP. Automatic adjustment is preferable. However, make sure that this file has the following structure and all network addresses and domain names are correct:
searchfully_qualified_domain_name
nameserveripaddress_of_nameserver
This file can contain more than one name server address, but at least one of them must be correct to provide name resolution to your host. If needed, adjust this file using the YaST Network Setting module (Hostname/DNS tab).
If your network connection is handled via DHCP, enable DHCP to change hostname and name service information by selecting
and in the YaST DNS and Hostname module./etc/nsswitch.conf
This file tells Linux where to look for name service information. It should look like this:
... hosts: files dns networks: files dns ...
The dns
entry is vital. It tells Linux to use an
external name server. Normally, these entries are automatically
managed by YaST, but it would be prudent to check.
If all the relevant entries on the host are correct, let your system administrator check the DNS server configuration for the correct zone information. For detailed information about DNS, refer to Chapter The Domain Name System (↑Reference). If you have made sure that the DNS configuration of your host and the DNS server are correct, proceed with checking the configuration of your network and network device.
If your system cannot establish a connection to a network server and you have excluded name service problems from the list of possible culprits, check the configuration of your network card.
Use the command ifconfig
network_device
(executed as
root
) to check whether this
device was properly configured. Make sure that both inet
address
and Mask
are configured correctly.
An error in the IP address or a missing bit in your network mask
would render your network configuration unusable. If necessary,
perform this check on the server as well.
If the name service and network hardware are properly configured and
running, but some external network connections still get long
time-outs or fail entirely, use traceroute
fully_qualified_domain_name
(executed as root
) to track
the network route these requests are taking. This command lists any
gateway (hop) that a request from your machine passes on its way to
its destination. It lists the response time of each hop and whether
this hop is reachable at all. Use a combination of traceroute and
ping to track down the culprit and let the administrators know.
Once you have identified the cause of your network trouble, you can resolve it yourself (if the problem is located on your machine) or let the system administrators of your network know about your findings so they can reconfigure the services or repair the necessary systems.
If you have a problem with network connectivity, narrow it down as described in Procedure 9.6, “How to Identify Network Problems”. If NetworkManager seems to be the culprit, proceed as follows to get logs providing hints on why NetworkManager fails:
Open a shell and log in as
root
.
Restart the NetworkManager:
rcnetwork restart -o nm
Open a web page, for example, http://www.opensuse.org as normal user to see, if you can connect.
Collect any information about the state of NetworkManager in
/var/log/NetworkManager
.
For more information about NetworkManager, refer to Chapter 5, Using NetworkManager.
Data problems are when the machine may or may not boot properly but, in either case, it is clear that there is data corruption on the system and that the system needs to be recovered. These situations call for a backup of your critical data, enabling you to recover the system state from before your system failed. openSUSE offers dedicated YaST modules for system backup and restoration as well as a rescue system that can be used to recover a corrupted system from the outside.
Sometimes you need to perform a backup from an entire partition or even hard disk. Linux comes with the dd tool which can create a exact copy of your disc. Combined with gzip you save some space.
Procedure 9.7. Backing and Restoring up Harddiscs
Start a Shell as user root
.
Select your source device. Typically this is something like
/dev/sda
(labeled as
SOURCE
).
Decide where you want to store your image (labeled as
BACKUP_PATH
). It must be different from
your source device. In other words: if you make a backup from
/dev/sda
, your image file need not to be stored
under /dev/sda
.
Run the commands to create a compressed image file:
dd if=/dev/SOURCE
| gzip > /BACKUP_PATH
/image.gz
Restore the hard disk with the following commands:
gzip -dc /BACKUP_PATH
/image.gz | dd of=/dev/SOURCE
If you only need a partition to backup, replace the
SOURCE
placeholder with your respective
partition. In this case, your image file can lie on the same hard disk,
but on a different partition.
System backups can be easily managed using the YaST System Backup module:
As root
, start YaST and select + .
Create a backup profile holding all details needed for the backup, filename of the archive file, scope, and type of the backup:
Select
+ .Enter a name for the archive.
Enter the path to the location of the backup if you want to keep a local backup. For your backup to be archived on a network server (via NFS), enter the IP address or name of the server and the directory that should hold your archive.
Determine the archive type and click
.Determine the backup options to use, such as whether files not belonging to any package should be backed up and whether a list of files should be displayed prior to creating the archive. Also determine whether changed files should be identified using the time-consuming MD5 mechanism.
Use
to enter a dialog for the backup of entire hard disk areas. Currently, this option only applies to the Ext2 file system.Finally, set the search constraints to exclude certain system areas from the backup area that do not need to be backed up, such as lock files or cache files. Add, edit, or delete items until your needs are met and leave with
.Once you have finished the profile settings, you can start the backup right away with
or configure automatic backup. It is also possible to create other profiles tailored for various other purposes.To configure automatic backup for a given profile, proceed as follows:
Select
from the menu.Select
.Determine the backup frequency. Choose
, , or .Determine the backup start time. These settings depend on the backup frequency selected.
Decide whether to keep old backups and how many should be kept. To receive an automatically generated status message of the backup process, check
.Click
to apply your settings and have the first backup start at the time specified.Use the YaST System Restoration module to restore the system configuration from a backup. Restore the entire backup or select specific components that were corrupted and need to be reset to their old state.
Start
+ + .Enter the location of the backup file. This could be a local file, a network mounted file, or a file on a removable device, such as a floppy or a DVD. Then click
.The following dialog displays a summary of the archive properties, such as the filename, date of creation, type of backup, and optional comments.
Review the archived content by clicking
. Clicking returns you to the dialog.opens a dialog in which to fine-tune the restore process. Return to the dialog by clicking .
Click
to open the view of packages to restore. Press to restore all files in the archive or use the various , , and buttons to fine-tune your selection. Only use the option if the RPM database is corrupted or deleted and this file is included in the backup.After you click
, the backup is restored. Click to leave the module after the restore process is completed.There are several reasons why a system could fail to come up and run properly. A corrupted file system following a system crash, corrupted configuration files, or a corrupted boot loader configuration are the most common ones.
openSUSE offers two different methods to resolve these situations. You can either use the YaST System Repair functionality or boot the rescue system. The following sections cover both types of system repair methods.
![]() | Keyboard and Language Settings |
---|---|
If you change the language settings after booting, your keyboard is adapted as well. |
Before launching the YaST System Repair module, determine in which mode to run it to best fit your needs. Depending on the severity and cause of your system failure (and your expertise), there are three different modes to choose from:
If your system failed due to an unknown cause and you basically do not know which part of the system is to blame for the failure, use Section 9.6.4.1.1, “Automatic Repair”.
. An extensive automated check will be performed on all components of your installed system. For a detailed description of this procedure, refer toIf your system failed and you already know which component is to blame, you can cut the lengthy system check with Section 9.6.4.1.2, “Customized Repair”.
short by limiting the scope of the system analysis to those components. For example, if the system messages prior to the failure seem to indicate an error with the package database, you can limit the analysis and repair procedure to checking and restoring this aspect of your system. For a detailed description of this procedure, refer toIf you already have a clear idea of what component failed and how this should be fixed, you can skip the analysis runs and directly apply the tools necessary for the repair of the relevant component. For details, refer to Section 9.6.4.1.3, “Expert Tools”.
Choose one of the repair modes as described above and proceed with the system repair as outlined in the following sections.
To start the automatic repair mode of YaST System Repair, proceed as follows:
Insert the installation medium of openSUSE into your DVD drive.
Reboot the system.
On the boot screen, select
.Confirm the license agreement and click
.Select
.YaST now launches an extensive analysis of the installed system. The progress of the procedure is displayed at the bottom of the screen with two progress bars. The upper bar shows the progress of the currently running test. The lower bar shows the overall progress of the analysis. The log window in the top section tracks the currently running test and its result. See Figure 9.2, “Automatic Repair Mode”.
The following main test runs are performed with every run. They contain, in turn, a number of individual subtests:
Checks the validity and coherence of the partition tables of all detected hard disks.
The swap partitions of the installed system are detected, tested, and offered for activation, where applicable. This offer should be accepted for the sake of a higher system repair speed.
All detected file systems are subjected to a file system–specific check.
The entries in the file are checked for completeness and consistency. All valid partitions are mounted.
This checks whether all packages necessary for the operation of a minimal installation are present. While it is optionally possible to also analyze the base packages, this takes a long time because of their vast number.
The boot loader configuration of the installed system (GRUB or LILO) is checked for completeness and coherence. Boot and root devices are examined and the availability of the initrd modules is checked.
Whenever an error is encountered, the procedure stops and a dialog opens outlining the details and possible solutions.
Read the screen messages carefully before accepting the proposed fix. If you decide to decline a proposed solution, your system remains unchanged.
After the repair process has been terminated successfully, click
and and remove the installation media. The system automatically reboots.To launch the
mode and selectively check certain components of your installed system, proceed as follows:Insert the installation medium of openSUSE into your DVD drive.
Reboot the system.
At the boot screen, select
.Confirm the license agreement and click
.Select
.Choosing
shows a list of test runs that are all marked for execution at first. The total range of tests matches that of automatic repair. If you already know where no damage is present, unmark the corresponding tests. Clicking starts a narrower test procedure that probably has a significantly shorter running time.Not all test groups can be applied individually. The analysis of the fstab entries is always bound to an examination of the file systems, including existing swap partitions. YaST automatically resolves such dependencies by selecting the smallest number of necessary test runs. YaST does not support encrypted partitions. If you have one, YaST informs you about it.
Whenever an error is encountered, the procedure stops and a dialog opens outlining the details and possible solutions.
Read the screen messages carefully before accepting the proposed fix. If you decide to decline a proposed solution, your system remains unchanged.
After the repair process has been terminated successfully, click
and and remove the installation media. The system automatically reboots.If you are knowledgeable with openSUSE and already have a very clear idea of what needs to be repaired in your system, directly apply the tools, skipping the system analysis.
To make use of the
feature of the YaST System Repair module, proceed as follows:Insert the installation medium of openSUSE into your DVD drive.
Reboot the system.
At the boot screen, select
.Confirm the license agreement and click
.Select
and choose a repair option.After the repair process has been terminated successfully, click
and and remove the installation media. The system automatically reboots.The
provides the following options to repair your faulty system:This starts the YaST boot loader configuration module. Find details in Section “Configuring the Boot Loader with YaST” (Chapter 17, The Boot Loader GRUB, ↑Reference).
Try to boot an already-installed Linux system.
This starts the expert partitioning tool in YaST.
This checks the file systems of your installed system. You are first offered a selection of all detected partitions and can then choose the ones to check.
It is possible to attempt to reconstruct damaged partition tables. A list of detected hard disks is presented first for selection. Clicking
starts the examination. This can take a while depending on the speed of your computer and the size and speed of the hard disk.![]() | |
The reconstruction of a partition table is tricky. YaST attempts to recognize lost partitions by analyzing the data sectors of the hard disk. The lost partitions are added to the rebuilt partition table when recognized. This is, however, not successful in all imaginable cases. |
This option saves important system files to a floppy disk. If one of these files becomes damaged, it can be restored from disk.
This checks the consistency of the package database and the availability of the most important packages. Any damaged installed packages can be reinstalled with this tool.
openSUSE contains a rescue system. The rescue system is a small Linux system that can be loaded into a RAM disk and mounted as root file system, allowing you to access your Linux partitions from the outside. Using the rescue system, you can recover or modify any important aspect of your system:
Manipulate any type of configuration file.
Check the file system for defects and start automatic repair processes.
Access the installed system in a “change root” environment.
Check, modify, and reinstall the boot loader configuration.
Resize partitions using the parted command. Find more information about this tool at the GNU Parted website http://www.gnu.org/software/parted/parted.html.
The rescue system can be loaded from various sources and locations. The simplest option is to boot the rescue system from the original installation medium:
Insert the installation medium into your DVD drive.
Reboot the system.
At the boot screen, press F4 and choose . Then choose from the main menu.
Enter root
at the Rescue:
prompt.
A password is not required.
If your hardware setup does not include a DVD drive, you can boot the
rescue system from a network source (including the
openSUSE FTP server). The following example applies to a
remote boot scenario—if using another boot medium, such as a DVD,
modify the info
file accordingly and boot as you
would for a normal installation.
Enter the configuration of your PXE boot setup and add the lines
install=
and protocol
://instsource
rescue=1
. If you need to start the repair
system, use repair=1
instead. As with a normal
installation, protocol
stands for any of the
supported network protocols (NFS, HTTP, FTP, etc.) and
instsource
for the path to your network
installation source.
Boot the system using “Wake on LAN”, as described in Section “Wake on LAN” (Chapter 1, Remote Installation, ↑Reference).
Enter root
at the Rescue:
prompt.
A password is not required.
Once you have entered the rescue system, you can make use of the virtual consoles that can be reached with Alt+F1 to Alt+F6.
A shell and many other useful utilities, such as the mount program, are
available in the /bin
directory. The
sbin
directory contains important file and network
utilities for reviewing and repairing the file system. This directory
also contains the most important binaries for system maintenance, such as
fdisk, mkfs, mkswap, mount, mount, init, and shutdown, and ifconfig, ip,
route, and netstat for maintaining the network. The directory
/usr/bin
contains the vi editor, find, less, and
ssh.
To see the system messages, either use the command
dmesg or view the file
/var/log/messages
.
As an example for a configuration that might be fixed using the rescue system, imagine you have a broken configuration file that prevents the system from booting properly. You can fix this using the rescue system.
To manipulate a configuration file, proceed as follows:
Start the rescue system using one of the methods described above.
To mount a root file system located under
/dev/sda6
to the rescue system, use the following
command:
mount /dev/sda6 /mnt
All directories of the system are now located under
/mnt
Change the directory to the mounted root file system:
cd /mnt
Open the problematic configuration file in the vi editor. Adjust and save the configuration.
Unmount the root file system from the rescue system:
umount /mnt
Reboot the machine.
Generally, file systems cannot be repaired on a running system. If you
encounter serious problems, you may not even be able to mount your root
file system and the system boot may end with a “kernel
panic”. In this case, the only way is to repair the system from
the outside. It is strongly recommended to use the YaST System Repair
for this task (see Section 9.6.4.1, “Using YaST System Repair” for
details). However, if you need to do a manual file system check or
repair, boot the rescue system. It contains the utilities to check and
repair the ext2
, ext3
,
ext4
, reiserfs
,
xfs
, dosfs
, and
vfat
file systems.
If you need to access the installed system from the rescue system to, you need to do this in a change root environment. For example, to modify the boot loader configuration, or to execute a hardware configuration utility.
To set up a change root environment based on the installed system, proceed as follows:
First mount the root partition from the installed system and the device file system (change the device name to your current settings):
mount /dev/sda6 /mnt mount --bind /dev /mnt/dev
Now you can “change root” into the new environment:
chroot /mnt
Then mount /proc
and /sys
:
mount /proc mount /sys
Finally, mount the remaining partitions from the installed system:
mount -a
Now you have access to the installed system. Before rebooting the
system, unmount the partitions with umount
-a
and leave the “change root”
environment with exit.
![]() | Limitations |
---|---|
Although you have full access to the files and applications of the installed system, there are some limitations. The kernel that is running is the one that was booted with the rescue system, not with the change root environment. It only supports essential hardware and it is not possible to add kernel modules from the installed system unless the kernel versions are exactly the same (which is unlikely). So you cannot access a sound card, for example. It is also not possible to start a graphical user interface. Also note that you leave the “change root” environment when you switch the console with Alt+F1 to Alt+F6. |
Sometimes a system cannot boot because the boot loader configuration is corrupted. The start-up routines cannot, for example, translate physical drives to the actual locations in the Linux file system without a working boot loader.
To check the boot loader configuration and reinstall the boot loader, proceed as follows:
Perform the necessary steps to access the installed system as described in Section 9.6.4.2.3, “Accessing the Installed System”.
Check whether the following files are correctly configured according to the GRUB configuration principles outlined in Chapter The Boot Loader GRUB (↑Reference) and apply fixes if necessary.
/etc/grub.conf
/boot/grub/device.map
/boot/grub/menu.lst
/etc/sysconfig/bootloader
Reinstall the boot loader using the following command sequence:
grub --batch < /etc/grub.conf
Unmount the partitions, log out from the “change root” environment, and reboot the system:
umount -a exit reboot