Difference between revisions of "General troubleshooting"

From ArchWiki
Jump to: navigation, search
(clarify)
Line 19: Line 19:
  
 
Once you are able to accurately fill in the variables, you will have a more concrete understanding of the situation than if you try to deal with the problem more abstractly.
 
Once you are able to accurately fill in the variables, you will have a more concrete understanding of the situation than if you try to deal with the problem more abstractly.
 +
 +
==Session permissions==
 +
 +
{{Note|You must be using [[systemd]] as your init system for local sessions to work - which includes ACLs for various devices (see {{ic|/usr/lib/udev/rules.d/70-uaccess.rules}}) along with polkit permissions.}}
 +
 +
First, make sure you have a valid local session within X:
 +
 +
$ loginctl show-session $XDG_SESSION_ID
 +
 +
This should contain {{ic|1=Remote=no}} and {{ic|1=Active=yes}} in the output. See [[xinitrc#Preserving the session]] for troubleshooting if it does not.
 +
 +
A dbus session should also be started along with X, in a way that exports a single {{ic|DBUS_SESSION_BUS_ADDRESS}} for every application in your session. The simplest way to do this is if you don't use a desktop environment is to copy the code from {{ic|/etc/skel/.xinitrc}} that runs files in {{ic|/etc/X11/xinit/xinitrc.d}} to your {{ic|~/.xinitrc}}, and avoid using {{ic|dbus-launch}} or {{ic|ck-launch-session}}.
  
 
==Single user mode==
 
==Single user mode==

Revision as of 07:14, 1 November 2012

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:General troubleshooting#)

This article explains some methods for general troubleshooting. For application specific issues, please reference the particular wiki page for that program.

Collect information

Before you can solve a problem, you must be aware of what the problem is. Try to find:

  • What are the symptoms?
  • Is there any error message?
  • Under what conditions does the problem appear?
  • What has changed in the time between now and when everything last worked perfectly?

you should try to understand the problem as specifically as possible; instead of saying:

Program A doesn't work

you should think of it as

Program A produces Result B when I try to perform Task C under Condition D.

Once you are able to accurately fill in the variables, you will have a more concrete understanding of the situation than if you try to deal with the problem more abstractly.

Session permissions

Note: You must be using systemd as your init system for local sessions to work - which includes ACLs for various devices (see /usr/lib/udev/rules.d/70-uaccess.rules) along with polkit permissions.

First, make sure you have a valid local session within X:

$ loginctl show-session $XDG_SESSION_ID

This should contain Remote=no and Active=yes in the output. See xinitrc#Preserving the session for troubleshooting if it does not.

A dbus session should also be started along with X, in a way that exports a single DBUS_SESSION_BUS_ADDRESS for every application in your session. The simplest way to do this is if you don't use a desktop environment is to copy the code from /etc/skel/.xinitrc that runs files in /etc/X11/xinit/xinitrc.d to your ~/.xinitrc, and avoid using dbus-launch or ck-launch-session.

Single user mode

If you cannot boot due to errors caused by a daemon, display manager or Xorg, you may be able use the single user runlevel:

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:General troubleshooting#)
  1. Boot to single user mode by appending 1 or s to kernel line in grub.
  2. Then edit the daemons array in rc.conf and remove the daemon which caused the problem.
  3. telinit 3 to go back to multi user mode .
  4. Then try to track down the issue by running the daemon manually.

file: could not find any magic files!

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements.Tango-edit-clear.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:General troubleshooting#)

Once after update or installation some package you geting this error:

# file: could not find any magic files!

And after this your system can be completely broken. Any time you try to reinstall or recompile for example:

# mkinitcpio -p linux
==> Building image from preset: 'default'
 -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
file: could not find any magic files!
==> ERROR: invalid kernel specifier: `/boot/vmlinuz-linux'
==> Building image from preset: 'fallback'
 -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
file: could not find any magic files!
@==> ERROR: invalid kernel specifier: `/boot/vmlinuz-linux'

Solution

Tipicaly some program installed before add in folder /etc/ld.so.conf.d/ new config file or make changes in /etc/ld.so.conf

1. Chroot to the system from Boot CD or Boot Flash Drive. 2. Take a look carefully at this two point, remove invalid file or line 3. Reboot the system again 4. Reinstall package file with the command:

# pacman -S file

See also