1.9. Generating an sos report from the rescue environment


If a Red Hat Enterprise Linux (RHEL) host does not boot properly, you can boot the host into a rescue environment to gather an sos report.

Using the rescue environment, you can mount the target system under /mnt/sysroot, access its contents, and run the sos report command.

Prerequisites

  • If the host is a bare metal server, you need physical access to the machine.
  • If the host is a virtual machine, you need access to the virtual machine’s settings in the hypervisor.
  • A RHEL installation source, such as an ISO image file, an installation DVD, a netboot CD, or a Preboot Execution Environment (PXE) configuration providing a RHEL installation tree.

Procedure

  1. Boot the host from an installation source.
  2. In the boot menu for the installation media, select the Troubleshooting option.
  3. In the Troubleshooting menu, select the Rescue a Red Hat Enterprise Linux system option.
  4. At the Rescue menu, select 1 and press the Enter key to continue and mount the system under the /mnt/sysroot directory.

    …​
    1) Continue
    2) Read-only mount
    3) Skip to shell
    4) Quit (Reboot)
    Please make a selection from the above: 1
  5. Press the Enter key to obtain a shell when prompted.

    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. Use the chroot command to change the apparent root directory of the rescue session to the /mnt/sysroot directory.

    Rescue Shell
    …​
    Please press ENTER to get a shell:
    bash-5.2# chroot /mnt/sysimage/
  7. Optional: Your network might not be up in the inital Rescue Environment, so make sure you set it up first. For example, if the network requires static IP addresses, and you want to transfer the sos report over the network, configure the network:

    1. Identify the Ethernet device you want to use:

      # 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. Assign an IP address to the network interface, and set the default gateway. For example, if you wanted to add the IP address of 192.168.0.1 with a subnet of 255.255.255.0, which is a CIDR of 24, to device enp1s0, enter:

      # ip address add <192.168.0.1/24> dev <enp1s0>
      # ip route add default via <192.168.0.254>
    3. Add a nameserver entry to the /etc/resolv.conf file, for example:

      nameserver <192.168.0.5>
  8. Run the sos report command and follow the on-screen instructions. You can add the --upload option to transfer the sos report to Red Hat immediately after generating it.

    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. Optional: If you have already opened a Technical Support case with Red Hat, enter the case number to embed it in the sos report file name, and it will be uploaded to that case if you specified the --upload option and your host is connected to the internet. If you do not have a case number, leave this field blank. Entering a case number is optional and does not affect the operation of the sos utility.

    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. Take note of the sos report file name displayed at the end of the console output.

    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. If your host does not have a connection to the internet, use a file transfer utility such as scp to transfer the sos report to another host on your network, then upload it to a Red Hat Technical Support case.

Verification

  • Verify that the sos utility created an archive in the /var/tmp/ directory.

    $ 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

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部