Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2007-02-22 19:13:18
Size: 8913
Comment:
Revision 6 as of 2008-01-20 21:32:06
Size: 8857
Editor: FranklinPiat
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#language en
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[:DebianWiki/EditorGuide#translation:Translation(s)]: none-~||<style="text-align: right;border: 0px hidden"> (!) [:/Discussion:Discussion]||
----
Line 2: Line 5:

## If your page gets really long, uncomment this Table of Contents
 [[TableOfContents(2)]]
Line 50: Line 56:
If you're in sarge or later, you can also enable logging of the userspace messages that occur during system start-up. You do this by editing {{{/etc/default/bootlogd}}}. Then, when you reboot, you'll have the userspace messages logged in {{{/var/log/boot}}}. (This is not enabled by default because it may also log everything that you do in single user mode. Be careful.) Note that this feature is not available in woody or earlier releases. Once the userspace boot messages are gone from the console in woody, they're gone forever. If you're in sarge or later, you can also enable logging of the userspace messages that occur during system start-up. See ["bootlogd"].
Line 68: Line 74:
Fill in {{{packagename}}} with the name of a pacakge; or fill in {{{bugnumber}}} with a bug number (they're 6 digits right now). Also note that when the channel topic in #debian says something like "FIXED: foobar (#999999)", that means the bug involved was #999999 in the BTS, and you should go to {{{http://bugs.debian.org/999999}}} to see it. Fill in {{{packagename}}} with the name of a package; or fill in {{{bugnumber}}} with a bug number (they're 6 digits right now). Also note that when the channel topic in #debian says something like "FIXED: foobar (#999999)", that means the bug involved was #999999 in the BTS, and you should go to {{{http://bugs.debian.org/999999}}} to see it.
Line 74: Line 80:

----
 CategorySystemRescue

[:DebianWiki/EditorGuide#translation:Translation(s)]: none

(!) [:/Discussion:Discussion]


The best way you can learn about your Debian system is to fix your own problems whenever possible. A lot of people have trouble figuring out where to get started looking for answers. Here are some of the first things you should look for.

  • ?TableOfContents(2)

Reading error messages

Most programs produce meaningful error messages when something goes wrong. You should read these errors and make an honest attempt to understand what they mean. Always start reading from the beginning of the output, because the first error message is often the cause of subsequent errors. (Errors at the end of the output may not be meaningful or relevant once the first error has been corrected.)

There are certain key phrases you should look for in any Unix error message; these are the English (or other native language) translations of the various [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man3/errno.3.html&srch=errno errno(3)] values that are returned by system calls. For example:

someprogram: foobar: No such file or directory

This means that someprogram tried to open a file named foobar, but it couldn't because that file does not exist. Or perhaps it's trying to create foobar but it can't because the directory that it needed to write to doesn't exist yet. Creating the directory for it may fix the problem.

blah blah blah: No such device

This particular error means that a program tried to talk to a device (a file in the /dev directory). The file in the /dev directory exists, but the kernel has no driver to implement this device. This is a kernel-level problem, unless the program simply tried to open the wrong device. In most cases, you'll need to load the driver, or get a different kernel, etc.

some file: Permission denied

This one means that your program tried to open a file but it couldn't because of the file or directory permssions (the ones you can see with ls -l). Take a look at the permissions and verify that they are correct. Run the [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man1/id.1.html&srch=id id(1)] command to verify that you're in the right group or are logged in as the right user.

blah blah blah: Operation not permitted

This looks superficially similar to the previous error, but it's actually quite different. Whereas the previous one means the file system permissions stopped you, this one means you tried to make some system call that you aren't allowed to make. For example, you tried to set the system clock when you weren't root. This is the more generic "you aren't allowed to do that" message, and has many many different possible causes.

What Does The Log Say?

Some programs don't produce errors directly on the screen, especially daemons or other background processes. In this case, there will almost always be some sort of log file written to the file system, which will contain useful (or not-so-useful) errors. The location of the logfile varies depending on which program it is, and many other factors.

If it's a system daemon that runs at boot time, then it probably logs using [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man3/syslog.3.html&srch=syslog syslog(3)]. The location of the actual logfiles will therefore be specified in [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man5/syslog.conf.5.html&srch=syslog.conf syslog.conf(5)]. Most of them are in the /var/log directory, though, and if you don't happen to know which one it is, you can frequently use this trick to see the files in chronological order by modification time (mtime):

ls -lart /var/log

The most recently modified files will be at the bottom of the screen.

[http://www.xfree86.org/ XFree86] version 4.x has its own log file, /var/log/XFree86.0.log, which you should consult if you have any problems with the X server (including the infamous "No screens found" when trying to start X).

If you're doing something with your window manager or other X client programs, then their output probably won't be visible to you immediately. The location of their output will depend on how you started X. If you used [http://www.xfree86.org/4.4.0/startx.1.html startx(1)] from a console, the output probably appeared on that console (try Ctrl-Alt-F1 to get back to it, then Alt-F7 (usually) to get back to X). If you logged in with [http://www.xfree86.org/4.4.0/xdm.1.html xdm(8)], then xdm creates a file called .xsession-errors in your home directory, and you should look there. gdm(8) uses .gnome-errors. The other "*dm" programs may have similar files.

Finally, the kernel reports information through a special channel (the ring buffer) which the [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man8/dmesg.8.html&srch=dmesg dmesg(8)] command reads. If you're doing anything involving drivers or devices, you should check dmesg to see if there are any errors that may be related to what you're doing. (It may also log some messages through [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man8/klogd.8.html&srch=klogd klogd(8)] which then sends them to [http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man8/sysklogd.8.html&srch=syslogd syslogd(8)], so you can check the files in /var/log also....)

If you're in sarge or later, you can also enable logging of the userspace messages that occur during system start-up. See ["bootlogd"].

Am I Missing Something?

A lot of the time, errors may be caused by the lack of packages that you were supposed to install, but haven't installed yet. This is quite often the case when you're compiling something, and you don't have the necessary *-dev package(s) installed. See the DevelopmentPage for details on these.

In many other cases, a package may have a "suggests" or "recommends" line for some other package. If you installed your package with [http://www.linuks.mine.nu/manstep/index.cgi?man=dselect dselect(8)], these probably got included for you, but if you used [http://www.linuks.mine.nu/manstep/index.cgi?man=apt-get apt-get(8)], then they were simply printed on the screen. You may have overlooked them. For example, the [http://packages.debian.org/gs gs] package (Ghostscript) recommends the [http://packages.debian.org/gsfonts gsfonts] package, but doesn't strictly depend on it. If your package looks like it's only half installed, then look in "[http://www.linuks.mine.nu/manstep/index.cgi?man=apt-cache apt-cache] search" or [http://www.linuks.mine.nu/manstep/index.cgi?man=aptitude aptitude(8)] or [http://www.linuks.mine.nu/manstep/index.cgi?man=dselect dselect(8)] for additional packages that have what you need.

Am I Alone?

Chances are that if you're having a problem, someone else has had it before you (unless you're running unstable...). In fact, the problem may have a known workaround or even a fix. That's why the Debian [http://bugs.debian.org/ Bug Tracking System] (BTS) is so important. You can use the [http://packages.debian.org/apt-listbugs apt-listbugs] package or the [http://www.linuks.mine.nu/manstep/index.cgi?man=reportbug reportbug(8)] command to search for known problems and their solutions, once you've narrowed your problem down to a specific Debian package. And if you don't find your answer there, you can report your bug so that it can get fixed.

You can also use the following shortcuts to jump straight into the BTS with a browser:

{{{http://bugs.debian.org/packagename http://bugs.debian.org/bugnumber}}}

Fill in packagename with the name of a package; or fill in bugnumber with a bug number (they're 6 digits right now). Also note that when the channel topic in #debian says something like "FIXED: foobar (#999999)", that means the bug involved was #999999 in the BTS, and you should go to http://bugs.debian.org/999999 to see it.

When in Doubt, Google It!

Even if the first error message looks like gibberish to you, it probably has meaning to someone, especially the programmer who wrote it. Try pasting your exact error message into [http://www.google.com/ Google].