CyberKeeda In Social Media

How to generate sosreport from the Linux rescue environment




While logging a case to Redhat, they usually ask for sosreport which is mandatory stuff required by Redhat team to fix your isssue.

Usually one can easily generate sosreport by excuting a simple command as

#sosreport

And one can collect generated sosreport from tmp directory, but if one is getting challenges while any of the below mentioned point

  • How to run sosreport in rescue mode?
  • How to generate sosreport for system that can not boot?
  • Red Hat Enterprise Linux system does not boot.
  • How to collect system information and logs for Technical Support to troubleshoot?
  • System hung or had a kernel panic and now it hangs or gives me an error on reboot, how can I create a sosreport?

Resolution.

o generate the sosreport output from the rescue environment, boot the system with the installation disc of the corresponding version of Red Hat Enterprise Linux and follow this procedure:
  1. Enter linux rescue into the boot prompt.
    NOTE: In RHEL6 press [Tab] to get to the boot prompt, then append linux rescue and the end of the vmlinuz line.
    NOTE: If the system is multipathed, the linux rescue mpath should be used.
  2. Once the rescue environment finishes booting, choose a language to use.
  3. Choose a keyboard layout to use.
  4. Wait for network interfaces to be located, and activate them, so that requested data can be transferred to another host.
  5. The rescue environment will try to find the current Red Hat Enterprise Linux installation on the system. You will be prompted with the following options:
    • "Continue": continue mounting all of its partitions under /mnt/sysimage/ in Read & Write mode
    • "Read-Only": continue mounting all of its partitions under /mnt/sysimage/ in Read Only mode
    • "Skip": skip the mounting of the discovered Red Hat Enterprise Linux installation and proceed with manual mounting
    NOTE: Select "Continue".
    If you select "skip", you will have to manually mount your filesystem before performing the next step
  6. Execute the following commands to continue generating sosreport:

# chroot /mnt/sysimage # sosreport

  1. If you are running RHEL 4.6 or higher and the sosreport command fails, you can try the sysreport command, as it should still be available. Note that this command will not be available on RHEL 5 systems or later.
    The sosreport command can take some time to generate a report. It collects a significant amount of information that may help Red Hat technicians resolve your issue.
  2. Once sosreport generation completes, it will provide the output in the /tmp directory while the user is in the chrootenvironment. Exit the chroot environment and locate the sosreport generated in the /mnt/sysimage/tmp directory.
Warning: During the running of the command sosreport you will be prompted for your name and case number. Use only letters and/or numbers when filling out this field. Adding other characters could damage the system or render the report unusable.
Note: While rescue mode will attempt to bind the mount points to /mnt/sysimage sometimes this fails and the following error is seen when attempting to run the sosreport:
error on sosreport: no such file or directory /dev/urandom

If this error is seen type the following commands to first exit the chroot'ed environment and mount the necessary data:

# exit <-- this will exit the chroot'ed environment# mount -o bind /dev /mnt/sysimage/dev# mount -o bind /sys /mnt/sysimage/sys# mount -o bind /proc /mnt/sysimage/proc# chroot /mnt/sysimage

and then run the sosreport as stated above.

No comments:

Post a Comment

Designed By Jackuna