Understanding Troubleshooting Modes

The boot procedure can be interrupted in various ways:
- Kernel Arguments can be used to within the Grub2 Menu
- The Kernel Argument
rd.break
can be used to interrupt the boot process right after the kernel and drivers are loaded - Systemd can be replaced with
init=/bin/bash
- The system can be booted into the Emergency Target right before the basic operating system is loaded
- The system can be booted into the Rescue Target before the network services are loaded
Kernel arguments should be used to interrupt the boot process if there is an issue loading the current kernel version
If the kernel is loading, but it is necessary to load the system right after the kernel is loaded, use rd.break
If there is an issue with loading into a target, use either emergency.target
or rescue.target
Changing the Root Password
- Reboot system
- Select Up Arrow or Down Arrow to interrupt automatic boot
- Hover over kernel entry and select
e
- Locate line ending in
rhgb
and add the following to the end of the line:
rd.break enforcing=0
- Select Ctrl +X
- Remount the
sysroot
directory usingmount
as Read/Write:
mount -oremount,rw /sysroot
- Mount the
sysroot
directory as the root directory usingchroot
:
chroot /sysroot
- Pass the
passwd
command to change theroot
password - Create the
/.autorelabel
file for SELinux:
touch /.autorelabel
- Exit
chroot
andsysroot
to reboot:
sh-4.2# exit
exit
- Once the system boots, open a terminal and run:
restorecon /etc/shadow
setneforce 1
Troubleshooting Filesystem Issues
Real filesystem corruption does occur, but most often automatically fixed
Problems occur when making typo’s in /etc/fstab
To repair these type of issues, remount the filesystem in a read/write state and edit /etc/fstab
by booting into the Emergency Target
Fragmentation can be fixed by:
xfs_fsr
: The XFS Filesystem organizer that optimizes XFS filesystemse4defrag
: Used to defragment Ext4 Filesystems
Troubleshooting Networking Issues
Common Network Issues
- Wrong subnet mask
- Wrong router
- DNS is not working
Use ip a
to check the current DNS configuration on the system network devices
Use ip a d [IP_ADDRESS] dev [DEVICE_NAME]
to remove any unwanted IP Addresses
Use ip a a dev [DEVICE_NAME] [IP_ADDRESS]
to add an IP Address
Use ip route show
to list the current network routes, and ip route add default via [IP_ADDRESS]
to add a default route
To make changes persistently, use nmtui
Use dhclient
to renew the IP Address from the DHCP server
Troubleshooting Performance Issues
Focus on the four key area’s of performance:
- Memory
- CPU Load
- Disk Load
- Network
Utilize top
to obtain an overview of the system’s overall health, and either renice or kill processes