「一般的なトラブルシューティング」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
2行目: 2行目:
 
[[Category:システムリカバリ]]
 
[[Category:システムリカバリ]]
 
[[en:General troubleshooting]]
 
[[en:General troubleshooting]]
[[es:General Troubleshooting]]
+
[[es:General troubleshooting]]
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|バグ報告ガイドライン}}
 
{{Related|バグ報告ガイドライン}}
21行目: 21行目:
 
The following gives a number of questions for you whenever dealing with a malfunctioning system. Under each question there are notes explaining how you should be answering each question, followed by some light examples on how to easily gather data output and what tools can be used to review logs and the journal.
 
The following gives a number of questions for you whenever dealing with a malfunctioning system. Under each question there are notes explaining how you should be answering each question, followed by some light examples on how to easily gather data output and what tools can be used to review logs and the journal.
   
  +
# 何が問題ですか?
# What is the issue(s)?
 
 
#: Be ''as precise as possible''. This will help you not get confused and/or side-tracked when looking up specific information.
 
#: Be ''as precise as possible''. This will help you not get confused and/or side-tracked when looking up specific information.
  +
# エラーメッセージは存在しますか?
# Are there error messages? (if any)
 
 
#: Copy and paste ''full outputs'' that contain '''error messages''' related to your issue into a separate file, such as {{ic|$HOME/issue.log}}. For example, to forward the output of the following [[mkinitcpio]] command to {{ic|$HOME/issue.log}}:
 
#: Copy and paste ''full outputs'' that contain '''error messages''' related to your issue into a separate file, such as {{ic|$HOME/issue.log}}. For example, to forward the output of the following [[mkinitcpio]] command to {{ic|$HOME/issue.log}}:
 
#: {{bc|$ mkinitcpio -p linux >> $HOME/issue.log''}}
 
#: {{bc|$ mkinitcpio -p linux >> $HOME/issue.log''}}
  +
# 問題を再現できますか?
# Can you reproduce the issue?
 
 
#: If so, give ''exact'' '''step-by-step''' instructions/commands needed to do so.
 
#: If so, give ''exact'' '''step-by-step''' instructions/commands needed to do so.
 
# When did you first encounter these issues and what was changed between then and when the system was operating without error?
 
# When did you first encounter these issues and what was changed between then and when the system was operating without error?
#:If it occurred right after an update then, list '''all packages that were updated'''. Include ''version numbers'', also, paste the entire update from [[pacman]].log ({{ic|/var/log/pacman.log}}). Also take note of the statuses of ''any'' service(s) needed to support the malfunctioning application(s) using [[systemd]]'s systemctl tools. For example, to forward the output of the following [[Systemd#Basic_systemctl_usage|systemd]] command to {{ic|$HOME/issue.log}}:
+
#:If it occurred right after an update then, list '''all packages that were updated'''. Include ''version numbers'', also, paste the entire update from [[pacman]].log ({{ic|/var/log/pacman.log}}). Also take note of the statuses of ''any'' service(s) needed to support the malfunctioning application(s) using [[systemd]]'s systemctl tools. For example, to forward the output of the following [[Systemd#systemctl の基本的な使い方|systemd]] command to {{ic|$HOME/issue.log}}:
 
#: {{bc|$ systemctl status dhcpcd@eth0.service >> $HOME/issue.log}}
 
#: {{bc|$ systemctl status dhcpcd@eth0.service >> $HOME/issue.log}}
 
#: {{Note|Using {{ic|'''>>'''}} will ensure any previous text in {{ic|$HOME/issue.log}} will not be overwritten.}}
 
#: {{Note|Using {{ic|'''>>'''}} will ensure any previous text in {{ic|$HOME/issue.log}} will not be overwritten.}}
51行目: 51行目:
 
== セッションのパーミッション ==
 
== セッションのパーミッション ==
   
{{Note|ローカルセッションを動作させるには init システムとして [[systemd|systemd]] を使う必要があります。systemd は polkit のパーミッションや様々なデバイスの ACL を使うのに必須です ({{ic|/usr/lib/udev/rules.d/70-uaccess.rules}} や [http://enotty.pipebreaker.pl/2012/05/23/linux-automatic-user-acl-management/] を参照)。}}
+
{{Note|ローカルセッションを動作させるには init システムとして [[systemd]] を使う必要があります。systemd は polkit のパーミッションや様々なデバイスの ACL を使うのに必須です ({{ic|/usr/lib/udev/rules.d/70-uaccess.rules}} や [http://enotty.pipebreaker.pl/2012/05/23/linux-automatic-user-acl-management/] を参照)。}}
   
 
まず、X の中に有効なローカルセッションがあることを確認してください:
 
まず、X の中に有効なローカルセッションがあることを確認してください:
59行目: 59行目:
 
このコマンドの出力に {{ic|1=Remote=no}} と {{ic|1=Active=yes}} が含まれていなければなりません。含まれていない場合は、X がログインを行った tty と同一の tty で動作していることを確認してください。logind セッションを維持するために tty が同一である必要があります。このことはデフォルトの {{ic|/etc/X11/xinit/xserverrc}} によって管理されています。
 
このコマンドの出力に {{ic|1=Remote=no}} と {{ic|1=Active=yes}} が含まれていなければなりません。含まれていない場合は、X がログインを行った tty と同一の tty で動作していることを確認してください。logind セッションを維持するために tty が同一である必要があります。このことはデフォルトの {{ic|/etc/X11/xinit/xserverrc}} によって管理されています。
   
D-Bus セッションも X と一緒に起動する必要があります。詳しくは [[D-Bus#ユーザーセッションの起動|D-Bus#ユーザーセッションの起動]] を見て下さい。
+
D-Bus セッションも X と一緒に起動する必要があります。詳しくは [[D-Bus#ユーザーセッションの起動]] を見て下さい。
   
基本的な [[polkit|polkit]] のアクションはそれ以上の設定を必要としませんが、ローカルセッションだけでなく他の認証を必要とする polkit アクションも存在します。認証するには polkit 認証エージェントを実行する必要があります。詳しくは [[polkit#認証エージェント|polkit#認証エージェント]] を見て下さい。
+
基本的な [[polkit]] のアクションはそれ以上の設定を必要としませんが、ローカルセッションだけでなく他の認証を必要とする polkit アクションも存在します。認証するには polkit 認証エージェントを実行する必要があります。詳しくは [[polkit#認証エージェント]] を見て下さい。
   
 
== シングルユーザーモード ==
 
== シングルユーザーモード ==
   
  +
デーモンによるエラーや、fstab の記述が間違っている、またはディスプレイマネージャや Xorg に問題が発生していて、起動できない場合、シングルユーザー[[systemd#ターゲット|ランレベル]]を使うことで問題を修正できることがあります。シングルユーザーモードでは起動後に root シェルだけを表示します。Arch は systemd を使っているため、カーネルパラメータに {{ic|1=systemd.unit=rescue.target}} を追加することでシングルユーザーモードにできます。何らかの理由でこのパラメータが使えない場合 (例: rescue ターゲットが他の問題があるターゲットに依存している)、カーネルパラメータに {{ic|1=init=/bin/sh}} を追加することで root シェルを起動できます。
If you cannot boot due to errors caused by a daemon, display manager or Xorg, you may be able use the single user [[Runlevels|runlevel]]:
 
#Boot to single-user mode. For GRUB 2:
 
##In the GRUB2 boot menu, select the Arch Linux entry, and press {{ic|e}} to edit it.
 
##Find the kernel line; it will start with {{ic|linux /boot/vmlinuz-linux...}}
 
##Appending {{ic|1}} or {{ic|s}} to this line
 
##Press F2 to start the boot process
 
#Then disable the [[systemd]] service that is causing the problem.
 
#Change to the multi-user mode systemd [[Systemd#Targets|target]].
 
#Then try to track down the issue by running the service manually.
 
   
 
== file: could not find any magic files! ==
 
== file: could not find any magic files! ==
94行目: 86行目:
 
Typically a previously installed application had placed a configuration file within {{ic|/etc/ld.so.conf.d/}} or it had made changes to {{ic|/etc/ld.so.conf}} which are now invalid.
 
Typically a previously installed application had placed a configuration file within {{ic|/etc/ld.so.conf.d/}} or it had made changes to {{ic|/etc/ld.so.conf}} which are now invalid.
 
#Boot into the Arch Linux Live CD / Installation Media.
 
#Boot into the Arch Linux Live CD / Installation Media.
#Mount your root ({{ic|'''/'''}}) partition to {{ic|/mnt}} and using [[Change root#Change_root|arch-chroot]], [[Change root|chroot]] into your system.
+
#Mount your root ({{ic|'''/'''}}) partition to {{ic|/mnt}} and using [[Change Root#Change_root|arch-chroot]], [[Change Root|chroot]] into your system.
{{Note|[[Change root#Change_root|arch-chroot]] leaves mounting the {{ic|/boot}} partition up to the user.}}
+
{{Note|[[Change Root#Change_root|arch-chroot]] leaves mounting the {{ic|/boot}} partition up to the user.}}
 
#Examine {{ic|/etc/ld.so.conf}} and remove any invalid lines found.
 
#Examine {{ic|/etc/ld.so.conf}} and remove any invalid lines found.
 
#Examine the files located inside the directory {{ic|/etc/ld.so.conf.d/}} and remove all invalid files.
 
#Examine the files located inside the directory {{ic|/etc/ld.so.conf.d/}} and remove all invalid files.
103行目: 95行目:
 
#Once booted, reinstall the package that was responsible for leaving your system inoperable using:
 
#Once booted, reinstall the package that was responsible for leaving your system inoperable using:
 
# pacman -S <package>
 
# pacman -S <package>
  +
  +
== fuser ==
  +
  +
''fuser'' はファイルやファイルシステム、TCP/UDP ポートなどのリソースを使ってプロセスを確認するためのコマンドラインユーティリティです。
  +
  +
''fuser'' は {{Pkg|psmisc}} パッケージに入っており、このパッケージは {{Grp|base}} グループの一部として既にインストールされているはずです。
  +
  +
== NTFS パーティションに書き込みできない ==
  +
標準では、NTFS ファイルシステムの読み込みしか出来ないようになっています。書き込みを行いたい場合は、{{Pkg|ntfs-3g}} パッケージをインストールしてください。
  +
  +
== Spellcheck を実行するとテキストが全部ミス判定されてしまう ==
  +
{{Pkg|aspell}} 辞書はインストールされていますか? {{ic|pacman -Ss aspell}} を実行して、入手可能な辞書を確認してください。
  +
  +
インストールされている辞書は {{ic|aspell dicts}} で確認できます:
  +
{{hc|$ aspell dicts|
  +
en
  +
en_GB
  +
...etc}}
  +
  +
aspell および辞書がインストールされていても問題が解決しない場合、{{ic|enchant}} が原因かもしれません。{{ic|/usr/share/enchant/enchant.ordering}} を確認し、目的の言語が期待した設定になっているか確認してください。
   
 
== 参照 ==
 
== 参照 ==

2015年8月12日 (水) 23:29時点における版

関連記事

この記事では一般的なトラブルシューティングの方法を説明しています。特定のアプリケーションの問題については、そのプログラムの wiki ページを参照してください。

注意事項

抱えている問題を解決するには、問題のシステムがどう機能しているのかを根本的に理解することが不可欠です。どうやって動いているのか、またエラーを起こさずに動作させるには何が必要なのか?質問に答えるのが用意ではないという場合、問題が発生している機能に関する Archwiki の記事を見ることを強く推奨します。問題のシステムを理解すれば、問題を突き止めるのが楽になるでしょう。

チェックリスト

The following gives a number of questions for you whenever dealing with a malfunctioning system. Under each question there are notes explaining how you should be answering each question, followed by some light examples on how to easily gather data output and what tools can be used to review logs and the journal.

  1. 何が問題ですか?
    Be as precise as possible. This will help you not get confused and/or side-tracked when looking up specific information.
  2. エラーメッセージは存在しますか?
    Copy and paste full outputs that contain error messages related to your issue into a separate file, such as $HOME/issue.log. For example, to forward the output of the following mkinitcpio command to $HOME/issue.log:
    $ mkinitcpio -p linux >> $HOME/issue.log
  3. 問題を再現できますか?
    If so, give exact step-by-step instructions/commands needed to do so.
  4. When did you first encounter these issues and what was changed between then and when the system was operating without error?
    If it occurred right after an update then, list all packages that were updated. Include version numbers, also, paste the entire update from pacman.log (/var/log/pacman.log). Also take note of the statuses of any service(s) needed to support the malfunctioning application(s) using systemd's systemctl tools. For example, to forward the output of the following systemd command to $HOME/issue.log:
    $ systemctl status dhcpcd@eth0.service >> $HOME/issue.log
    ノート: Using >> will ensure any previous text in $HOME/issue.log will not be overwritten.

問題の特定

問題を解決しようとするとき、以下のようなアプローチを取ってはいけません:

アプリケーション X が動作しない。

そうではなくて、正確に観察をしましょう:

A または B の状態のときにアプリケーション X を使って作業 Y を行うと Z というエラーが発生する。

他者のサポート

With all the information in front of you. You should have a good idea as to what is going on with the system. And you can now start working on a proper fix.

If you require any additional support, it can be found on the forums or IRC at irc.freenode.net #archlinux

セッションのパーミッション

ノート: ローカルセッションを動作させるには init システムとして systemd を使う必要があります。systemd は polkit のパーミッションや様々なデバイスの ACL を使うのに必須です (/usr/lib/udev/rules.d/70-uaccess.rules[1] を参照)。

まず、X の中に有効なローカルセッションがあることを確認してください:

$ loginctl show-session $XDG_SESSION_ID

このコマンドの出力に Remote=noActive=yes が含まれていなければなりません。含まれていない場合は、X がログインを行った tty と同一の tty で動作していることを確認してください。logind セッションを維持するために tty が同一である必要があります。このことはデフォルトの /etc/X11/xinit/xserverrc によって管理されています。

D-Bus セッションも X と一緒に起動する必要があります。詳しくは D-Bus#ユーザーセッションの起動 を見て下さい。

基本的な polkit のアクションはそれ以上の設定を必要としませんが、ローカルセッションだけでなく他の認証を必要とする polkit アクションも存在します。認証するには polkit 認証エージェントを実行する必要があります。詳しくは polkit#認証エージェント を見て下さい。

シングルユーザーモード

デーモンによるエラーや、fstab の記述が間違っている、またはディスプレイマネージャや Xorg に問題が発生していて、起動できない場合、シングルユーザーランレベルを使うことで問題を修正できることがあります。シングルユーザーモードでは起動後に root シェルだけを表示します。Arch は systemd を使っているため、カーネルパラメータに systemd.unit=rescue.target を追加することでシングルユーザーモードにできます。何らかの理由でこのパラメータが使えない場合 (例: rescue ターゲットが他の問題があるターゲットに依存している)、カーネルパラメータに init=/bin/sh を追加することで root シェルを起動できます。

file: could not find any magic files!

Example: After an every-day routine update or following the installation of a package you are given the following error:

# file: could not find any magic files!

This will most likely leave your system crippled. And, any attempts made to recompile/reinstall the package(s) responsible for the breakage will fail. Also, any attempts made to try to rebuild the initramfs will result in the following:

# 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'

解決方法

Typically a previously installed application had placed a configuration file within /etc/ld.so.conf.d/ or it had made changes to /etc/ld.so.conf which are now invalid.

  1. Boot into the Arch Linux Live CD / Installation Media.
  2. Mount your root (/) partition to /mnt and using arch-chroot, chroot into your system.
ノート: arch-chroot leaves mounting the /boot partition up to the user.
  1. Examine /etc/ld.so.conf and remove any invalid lines found.
  2. Examine the files located inside the directory /etc/ld.so.conf.d/ and remove all invalid files.
  3. Rebuild the initramfs.
# mkinitcpio -p linux
  1. Reboot back to your installed system.
  2. Once booted, reinstall the package that was responsible for leaving your system inoperable using:
# pacman -S <package>

fuser

fuser はファイルやファイルシステム、TCP/UDP ポートなどのリソースを使ってプロセスを確認するためのコマンドラインユーティリティです。

fuserpsmisc パッケージに入っており、このパッケージは base グループの一部として既にインストールされているはずです。

NTFS パーティションに書き込みできない

標準では、NTFS ファイルシステムの読み込みしか出来ないようになっています。書き込みを行いたい場合は、ntfs-3g パッケージをインストールしてください。

Spellcheck を実行するとテキストが全部ミス判定されてしまう

aspell 辞書はインストールされていますか? pacman -Ss aspell を実行して、入手可能な辞書を確認してください。

インストールされている辞書は aspell dicts で確認できます:

$ aspell dicts
 en
 en_GB
 ...etc

aspell および辞書がインストールされていても問題が解決しない場合、enchant が原因かもしれません。/usr/share/enchant/enchant.ordering を確認し、目的の言語が期待した設定になっているか確認してください。

参照