1.9. レスキュー環境からの sos レポートの生成


Red Hat Enterprise Linux (RHEL) ホストが適切に起動しない場合は、sos レポートを収集するために、ホストを起動して レスキュー環境 を作成してください。

レスキュー環境を使用すると、ターゲットシステムを /mnt/sysroot にマウントし、その内容にアクセスして、sos report コマンドを実行できます。

前提条件

  • ホストがベアメタルサーバーの場合は、マシンに物理的にアクセスできる。
  • ホストが仮想マシンの場合は、ハイパーバイザーにある仮想マシンの設定にアクセス権できる。
  • RHEL インストールを行うための ISO イメージファイル、インストール DVD、netboot CD、PXE (Preboot Execution Environment) 設定などの RHEL インストールソース。

手順

  1. インストールソースからホストを起動します。
  2. インストールメディアのブートメニューで、Troubleshooting を選択します。
  3. Troubleshooting メニューで Rescue a Red Hat Enterprise Linux system オプションを選択します。
  4. Rescue メニューで 1 を選択し、Enter キーを押して続行して、/mnt/sysroot ディレクトリーにシステムをマウントします。

    …​
    1) Continue
    2) Read-only mount
    3) Skip to shell
    4) Quit (Reboot)
    Please make a selection from the above: 1
  5. プロンプトが表示されたら、Enter キーを押してシェルを取得します。

    Rescue Shell
    
    Your system has been mounted under /mnt/sysroot.
    
    If you would like to make the root of your system the root of the activate system, run the command:
    
        chroot /mnt/sysroot
    Warning: The rescue shell will trigger SELinux autorelabel on the subsequent boot. Add "enforcing=0" on the kernel command line for autorelabel to work properly.
    When finished, please exit from the shell and your system will reboot.
    
    Please press ENTER to get a shell:
    bash-5.2#
  6. chroot コマンドを使用して、レスキューセッションの見かけ上のルートディレクトリーを /mnt/sysroot ディレクトリーに変更します。

    Rescue Shell
    …​
    Please press ENTER to get a shell:
    bash-5.2# chroot /mnt/sysimage/
  7. オプション: 初期の Rescue 環境ではネットワークが起動していない可能性があるため、必ず最初に設定してください。たとえば、ネットワークに静的 IP アドレスが必要で、ネットワーク経由で sos レポートを転送したい場合は、以下のようにネットワークを設定します。

    1. 使用するイーサネットデバイスを特定します。

      # ip link show
      …​
      2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
          link/ether 52:54:00:74:79:56 brd ff:ff:ff:ff:ff:ff
    2. ネットワークインターフェイスに IP アドレスを割り当て、デフォルトゲートウェイを設定します。たとえば、サブネット 255.255.255.0 (CIDR 24) を持つ IP アドレス 192.168.0.1 をデバイス enp1s0 に追加する場合は、次のように入力します。

      # ip address add <192.168.0.1/24> dev <enp1s0>
      # ip route add default via <192.168.0.254>
    3. /etc/resolv.conf ファイルに nameserver エントリーを追加します。次に例を示します。

      nameserver <192.168.0.5>
  8. sos report コマンドを実行し、画面の指示に従います。--upload オプションを追加すると、sos レポートの生成直後にレポートを Red Hat に転送できます。

    bash-5.2# sos report
    sos report (version 4.8.2)
    
    This command will collect system configuration and diagnostic
    information from this Fedora Linux system.
    
    For more information on the Fedora Project visit:
    
            Community Website : https://fedoraproject.org/
            Community Forums  : https://discussion.fedoraproject.org/
    
    The generated archive may contain data considered sensitive and its
    content should be reviewed by the originating organization before being
    passed to any third party.
    
    No changes will be made to system configuration.
    
    Press ENTER to continue, or CTRL-C to quit.
  9. オプション: Red Hat でテクニカルサポートケースをすでに作成している場合には、ケース番号を入力して sos レポートファイルの名前に追加します。--upload を指定しており、ホストがインターネットに接続されている場合は対象のケースにアップロードされます。ケース番号がない場合は、このフィールドを空白にしておきます。ケース番号の入力は任意であるため、sos ユーティリティーの動作には影響はありません。

    sos report (version 4.8.2)
    …​
    
    Press ENTER to continue, or CTRL-C to quit.
    Optionally, please enter the case id that you are generating this report for []:
  10. コンソール出力の末尾に表示されている sos レポートファイルの名前を書き留めておきます。

    Finished running plugins
    Creating compressed archive…​
    
    Your sosreport has been generated and saved in:
    /var/tmp/secured-sosreport-unused-2025-05-14-lofqhen.tar.xz
    
    Size    9.30MiB
    Owner   root
    sha256     bf303917b689b13f0c059116d9ca55e341d5fadcd3f1473bef7299c4ad2a7f4f
    
    Please send this file to your support representative.
    bash-5.2#
  11. ホストがインターネットに接続されていない場合は、scp などのファイル転送ユーティリティーを使用して、ネットワーク上の別のホストに sos レポートを転送して Red Hat テクニカルサポートケースにアップロードします。

検証

  • sos ユーティリティーによって、/var/tmp/ ディレクトリーにアーカイブが作成されたことを確認します。

    $ ls -l /var/tmp/sosreport*
    -rw-r—​r--. 1 root root       65 Mar 14  2025 /var/tmp/sosreport-example.hostname-2025-05-14-lofqhen.tar.xz.sha256
    -rw-------. 1 root root 17036176 Mar 14  2025 /var/tmp/sosreport-example.hostname-2025-05-14-lofqhen.tar.xz5-14-lofqhen.tar.xz
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る