This guide documents the troubleshooting steps used to recover a Rocky Linux 10.2 system that failed to boot into a graphical desktop after removing the GNOME Workstation environment group.
Root Cause Summary
Removing the Workstation group unpulled critical system dependencies, including the default dnf command wrapper, LVM utilities (lvm2), and desktop target configurations. Additionally, an unresolved mount reference for /home in /etc/fstab caused systemd to time out and drop into Emergency Mode, where login was blocked due to a locked root account.
Step 1: Bypass Emergency Mode via GRUB
Because the root account was locked in Emergency Mode, booting directly into a root bash shell allowed access to the file system without requiring a Live USB.
- Reboot the machine and highlight the standard Rocky Linux entry in the GRUB boot menu.
- Press
eto edit the kernel boot parameters. - Locate the line beginning with
linuxorlinuxefi. - Navigate to the end of that line, add a space, and append:
rw init=/bin/bash
- Press
Ctrl + XorF10to boot into the directbash-5.2#root shell.
Step 2: Remount Root and Bypass the Failing /home Mount
Once inside the root bash shell, remount the root partition as read-write and temporarily comment out the failing /home entry in /etc/fstab so the system can complete a normal boot.
- Remount the root file system with read and write permissions:
Terminal window mount -o remount,rw / - Comment out the
/homemount line in/etc/fstab:Terminal window sed -i '/\/home/s/^/#/' /etc/fstab - Verify the edit:
Terminal window cat /etc/fstab - Trigger an SELinux file system relabel on the next startup:
Terminal window touch /.autorelabel - Flush pending disk writes and force a reboot:
Terminal window syncreboot -f
Step 3: Restore PATH, dnf, LVM Tools, and KDE Plasma
After rebooting and logging into the text console (tty), restore your shell environment paths and use dnf4 (which remained available in /usr/bin/dnf4) to reinstall the missing utilities and desktop packages.
- Export the standard system paths for the current terminal session:
Terminal window export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - Reinstall the
dnfwrapper and LVM management utilities:Terminal window sudo dnf4 install -y dnf lvm2 - Reinstall the KDE Plasma Workspaces and Core system groups:
Terminal window sudo dnf4 groupinstall -y "KDE Plasma Workspaces" "Core" --skip-broken
Step 4: Restore /home Mount and Enable Graphical Boot
With LVM utilities and KDE packages restored, re-enable your /home mount and configure systemd to boot into the SDDM graphical login manager.
- Open
/etc/fstab:Terminal window sudo nano /etc/fstab - Remove the
#symbol from the beginning of the/homemount line, then save and exit (Ctrl + O,Enter,Ctrl + X). - Mount all file systems:
Terminal window sudo mount -a - Enable the SDDM display manager and set the default boot target to graphical:
Terminal window sudo systemctl enable sddmsudo systemctl set-default graphical.target - Reboot into the restored KDE Plasma desktop:
Terminal window sudo reboot