=^.^=

Failed to mount /sysroot on RedHat (CentOS/RHEL/Fedora/Rocky Linux)

karma

Power outage, VM tanked, whatever the reason you may need to run xfs_repair from the recovery console.
Mounting /sysroot... [ ***] A start job is running for /sysroot (3min 59s / 4min 31s)[240.527013] INFO: task mount:406 blocked for more than 120 seconds. [ 240.527056] "echo 0 > /proc/sys/kernel/hung_task_timeout+secs" disables this message." [FAILED] Failed to mount /sysroot. See 'systemctl status sysroot.mount' for more details. [DEPEND] Dependency failed for Initrd Root File System. [DEPEND] Dependency failed for Reload Configration from the Real Root. [ OK ] Stopped dracut pre-pivot and cleanup hook. [ OK ] Stopped target Initrd Default Target. [ OK ] Reached target Initrd File System. [ OK ] Stopped dracut mount hook. [ OK ] Stopped target Basic System. [ OK ] Stopped System Initialization. Starting Emergency Shell... Genrating "/run/initramfs/rdsosreport.txt" Entering emergancy mode. Exit the shell to continue. Type "journalctl" to view system logs. You might want to save "/run/initramfs/rdsosreport.txt" to usb stick or /boot after mounting them and attach it to a bug report. :/#

Solution:
xfs_repair -v /dev/dm-0
Be sure to include any other volumes before rebooting, i.e.: /dev/dm-1.

Credit to https://unix.stackexchange.com/questions/337289/how-to-repair-centos-failed-to-mount-sysroot for full error message copypasta. Mine was in a GUI in an RDP in a bump in a hole in the log down by the river~

Comments

There are no comments for this item.