How can I download or install kernel debuginfo packages for RHEL systems?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux
  • Red Hat Customer Portal
  • Red Hat Network (RHN)
  • Red Hat Satellite

Issue

  • How do I download kernel debuginfo packages?
  • How to download debug-info packages like kernel-debuginfo?
  • Why are debug info packages for Red Hat Enterprise Linux 6 (RHEL6) not available from the ftp site ftp.redhat.com?
  • Is there a customer-accessible place where a consolidated set of /usr/lib/debug for certain packages can be found?

Resolution

For Red Hat Enterprise Linux 9

  • Enable the debug repository to install the debuginfo package(s). The channel names are architecture specific, you can verify the architecture of your system with uname -m or use $(uname -m) in the package name. Example of the x86_64 architecture:
# subscription-manager repos --enable=rhel-9-for-$(uname -m)-baseos-debug-rpms 

# dnf install kernel-debuginfo-$(uname -r) 
===================================================================================================================
 Package                         Architecture  Version                 Repository                          Size
===================================================================================================================
Installing:
 kernel-debuginfo                x86_64        5.14.0-70.13.1.el9_0   rhel-9-for-x86_64-baseos-debug-rpms   554 M
 kernel-debuginfo-common-x86_64  x86_64        5.14.0-70.13.1.el9_0   rhel-9-for-x86_64-baseos-debug-rpms    65 M
  • OR use dnf command and install the required package(s).
# dnf install --enablerepo=rhel-9-for-$(uname -m)-baseos-debug-rpms kernel-debuginfo-$(uname -r)
  • OR execute debuginfo-install command to install these package(s).
# dnf install yum-utils
# debuginfo-install kernel-debuginfo-$(uname -r)

For Red Hat Enterprise Linux 8

  • First enable the debug channels. The channel names are architecture specific, you can verify the architecture of your system with uname -m or use $(uname -m) in the package name. For example for the x86_64 architecture:
# subscription-manager repos --enable=rhel-8-for-$(uname -m)-baseos-debug-rpms --enable=rhel-8-for-$(uname -m)-appstream-debug-rpms
  • Then install required kernel debuginfo package(s). Also here, the package name might need to be modified to reflect your architecture:
# yum install kernel-debuginfo-$(uname -r) kernel-debuginfo-common-$(uname -m)-$(uname -r)
===================================================================================================================
 Package                         Architecture  Version                 Repository                             Size
===================================================================================================================
Installing:
 kernel-debuginfo                x86_64        4.18.0-147.5.1.el8_1    rhel-8-for-x86_64-baseos-debug-rpms   417 M
 kernel-debuginfo-common-x86_64  x86_64        4.18.0-147.5.1.el8_1    rhel-8-for-x86_64-baseos-debug-rpms    54 M

For Red Hat Enterprise Linux 7

  • First get the channels available with debug packages
[root@rhelserver tmp]#   subscription-manager repos --list | grep -i server-debug-rpms

Repo ID:   jb-eap-6-for-rhel-7-server-debug-rpms
Repo ID:   jb-eap-7-for-rhel-7-server-debug-rpms
Repo ID:   rhel-7-server-debug-rpms
<redacted the rest of the output>

  • After you get Repo ID of the channel that you want to use, just enable it.
[root@rhelserver tmp]#  subscription-manager repos --enable=rhel-7-server-debug-rpms

At this point, you can install kernel debuginfo packages with:

[root@rhelserver tmp]#  yum install kernel-debuginfo kernel-debuginfo-common

In order to match the kernel-debuginfo with your kernel version you would instead run:
[root@rhelserver tmp]#  yum install kernel-debuginfo-$(uname -r)

or

[root@rhelserver tmp]#  yum install kernel-debuginfo-3.10.0-327.36.2.el7 kernel-debuginfo-common-3.10.0-327.36.2.el7

Alternatively, see the Appendix for directions on how to manually download debuginfo files from the Red Hat Customer Portal.

For Red Hat Enterprise Linux 5.8+ and 6

  • With the release of RHEL 6 the kernel debuginfo packages are no longer provided via the Red Hat public FTP site. They have instead moved to Red Hat Network (RHN) classic or Red Hat Satellite for download.

  • With the release of RHEL 5.8, all RHEL 5 kernel debuginfo packages will be available via Red Hat Network or Red Hat Satellite. Note: Satellite customers need to activate a Satellite Certificate generated after RHEL 5.8 release to be able to synchronize the debug channels.

  • Each base Red Hat channel now has a debug child channel. For example,

rhel-i386-client-6
   rhel-i386-client-6-debuginfo
rhel-i386-client-5
   rhel-i386-client-5-debuginfo
rhel-i386-server-6
   rhel-i386-server-6-debuginfo
rhel-x86_64-server-6
   rhel-x86_64-server-6-debuginfo
  • If the system is registered via subscription-manager, the associated repostory label ends in "debug-rpms". Enable it with yum-config-manager or subscription-manager, e.g.,
[root@rhelserver tmp]#   yum-config-manager --enable rhel-6-workstation-debug-rpms
[root@rhelserver tmp]#   subscription-manager repos --enable rhel-6-workstation-debug-rpms

[root@rhelserver tmp]#   yum-config-manager --enable rhel-6-server-debug-rpms
[root@rhelserver tmp]#   subscription-manager repos --enable rhel-6-server-debug-rpms
  • If the system is registered to RHN Classic, add the channel to the system profile in the Customer Portal, or with rhn-channel:
[root@rhelserver tmp]#   rhn-channel -a -c rhel-$(uname -i)-client-6-debuginfo -u <Red Hat login> -p <Password>

[root@rhelserver tmp]#   rhn-channel -a -c rhel-$(uname -i)-server-6-debuginfo -u <Red Hat login> -p <Password>
  • Note: if rhn-channel states that the channel does not exist, use the following command to verify the correct channel label in the list of available channels:
[root@rhelserver tmp]#   rhn-channel -L

to verify the correct channel name in the list of available channels.

Additionally, the RHN user interface has been changed to link to the debuginfo packages from the corresponding binary RPMs. For example:

https://rhn.redhat.com/rhn/software/packages/details/Overview.do?pid=590664

Note that the "Associated Debug Info Package(s)" link at the bottom goes straight to the debuginfo package instead of to ftp.redhat.com.

Alternatively, see the Appendix for directions on how to manually download debuginfo files from the Red Hat Customer Portal.

For Red Hat Enterprise Linux 5.7 and earlier

There are currently 3 options for getting debuginfo package for RHEL 5.7 and earlier:

  • Through RHN classic or Red Hat Satellite, see the recommended solution above.

  • RHEL 5 is preconfigured with the yum repository information necessary to easily download debuginfo packages. This information resides in /etc/yum.repos.d/rhel-debuginfo.repo. To download a particular debuginfo package, type

# debuginfo-install --enablerepo rhel-debuginfo <debuginfo-package>

or

# yum --enablerepo rhel-debuginfo install <debuginfo-package>

where debuginfo-package is the name of the debuginfo package to be downloaded and installed.

Notes: debuginfo-install is preferred, for resolving dependencies automatically. To use debuginfo-install, the yum-utils package need to be installed on the system.

The debuginfo-package may need to contain version information to ensure that the correct package is installed. For example, to prepare a system to analyze a vmcore file created by a system that was running the 2.6.18-8.el5 kernel, the command

# debuginfo-install --enablerepo rhel-debuginfo kernel

or

# yum --enablerepo rhel-debuginfo install kernel-debuginfo-2.6.18-8.el5

would automatically download and install the kernel-debuginfo package corresponding to the given version.

  • Alternatively, manually download debuginfo packages for RHEL 5.7 and earlier at this address depending on the architecture and release version ("Client" or "Server"):

https://ftp.redhat.com/pub/redhat/linux/enterprise/5{Client,Server}/en/os/{arch}/Debuginfo

Alternatively, see the Appendix for directions on how to manually download debuginfo files from the Red Hat Customer Portal.

For Red Hat Enterprise Linux 2.1, 3 and 4

  • For initial release, the debuginfo packages are available at this address depending on the specific flavor of RHEL:

https://ftp.redhat.com/pub/redhat/linux/enterprise/{2.1{AS,AW,ES,WS},3,4}/en/os/{arch}/Debuginfo/

  • For subsequent releases of RHEL 2.1, 3 and 4, the debuginfo packages are available at this address (again, depending on the specific flavor):

https://ftp.redhat.com/pub/redhat/linux/updates/enterprise/{2.1{AS,AW,ES,WS},3{AS,ES,WS,Desktop},4{AS,WS,ES,Desktop}}/en/os/Debuginfo/{arch}/

Alternatively, see the Appendix for directions on how to manually download debuginfo files from the Red Hat Customer Portal for Red Hat Enterprise Linux 4 and newer.

Appendix

An unsupported, but useful, tool exists for looking up debug info packages for Red Hat Enterprise Linux 3, 4, and 5 on the ftp site. See Unsupported Debuginfo tool for Red Hat Enterprise Linux 3, 4, and 5

Packages can also be downloaded through the web interface of the Red Hat Customer Portal as explained in the steps below. We are using the Red Hat Enterprise Linux kernel from the server variant of the OS as the package in this example:

  1. Log in to the Red Hat Customer Portal with your username and password.
  2. Click the Downloads link at the top of the page.
  3. Click the Red Hat Enterprise Linux link to access packages from that product.
  4. Click the Packages tab, change the Version and Architecture dropdown boxes at the top of the page to the correct major version and architecture, and enter kernel in the filter box.
  5. You will be presented with a list of search results. Scroll down until you find kernel under the heading of Red Hat Enterprise Linux $VER Server (RPMs) and click it (replacing $VER with the appropriate major version, such as 5, 6, or 7). Make sure the heading does not indicate that the packages are for a beta build unless you are looking for beta packages. You may need to move off the first page of search results to find the listing for kernel under the proper heading.
  6. When the kernel page loads, change the Version and Architecture dropdown boxes to match the version and architecture of the kernel you require.
  7. Scroll down to the Download section and click the Download Now button(s) to download the required debuginfo package(s).

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments