Troubleshooting RHEL

Nov 17, 2025

Troubleshooting Modes

Knowledge Check

  • If you cannot reach the grub menu
    • Boot into a boot/installation disk.
  • If there is an issue that prevents systemd from starting
    • Boot into minimal shell by adding init=/bin/bash to grub boot command
  • If there is an issue in the early boot after systemd starts
    • Boot into systemd.unit=emergency.target
  • If there is an issue after the early boot
    • Boot into systemd.unit=rescue.target
  • If there is an issue with the graphical target
    • Boot into multi-user.target

Setting Root User Password for Emergency Mode

  • Boot into minimal bash shell (add init=/bin/bash to grub boot command)
  • Remount the root filesystem in read/write mode, mount -o remount,rw /
  • Change the root password, passwd root
  • Deal with SELinux, touch /.autorelabel
  • Force a sync echo s > /proc/sysrq-trigger
  • Reboot echo b > /proc/sysrq-trigger
    • Or start systemd, exec /usr/lib/systemd/systemd

Boot Debug Shell

Fedora - Debug Shell

  • The debug-shell.service provides an option to open a root shell without having to enter a password
  • It can be useful for troubleshooting, but should be immediately be disabled once no longer needed

Filesystem Issues

  • Most filesystem issues are automatically fixed on modern systems
  • Fragmentation can be an issue (not important for exam)
    • xfs_fsr is the XFS File System Reorganizer, it optimizes XFS filesystems
    • e4defrag can be used to defragment Ext4

Most importantly for the RHCSA exam, you need to be able to fix an fstab error by booting into a minimal bash shell and mounting the root filesystem in read/write mode to resolve the issue(s).

Network Issues

Common issues:

  • Wrong subnet mask: all network nodes should be in the same subnet
  • Wrong router: ensure router is in the local network
  • DNS not working: check /etc/resolv.conf

Example:

ip addr
ip route
ping 8.8.8.8 -c3
cat /etc/resolv.conf
ping google.com
tracepath google.com
dig google.com  

Use nmtui to modify incorrect network settings.

Performance Issues

  • Not an important topic for RHCSA
  • Four key areas of performance
    • memory
    • CPU load
    • disk load
    • network
  • Use top first, then result to more specialized tools

Software Issues

  • Dependency problems in RPM’s should not occur when using repositories
  • Library problems (eg missing symbols)
    • Run ldconfig to update the library cache
  • Use containers or Flatpak applications to avoid software dependency version issues

Addressing Memory Shortage

There’s really only two options here

  • Add memory
  • Add swap
    • Use vmstat 2 25 to make sure that adding swap space doesn’t lead to too much I/O traffic

Exercise

  • Boot with very limited memory (add mem=1G to grub boot command)
  • View memory and swap stats with top
  • View the swap in/out (si and so) and block in/out (bi and bo) values from vmstat 2 25
    • If swap in/out is close to or greater than block in/out, you have a memory shortage
    • Another way of looking at it is to cat /proc/meminfo
  • Use systemctl isoloate multi-user.target to view how the memory load changes without the graphical interface

Using SOS Report

  • sos report is used to gather system information for Red Hat Support

Consulting Red Hat Websites

Red Hat Access RHEL 10 Docs

Lab Exercise

  • Let’s assume that you have lost the root user password. Reset it.

- Clint Jordan