In the world of Linux system administration, encountering issues like forgetting the root password or facing errors in the fstab partition table can be daunting. However, Linux offers powerful tools to address such challenges effectively. In this guide, we’ll dive into two essential techniques for system recovery: using rd.break to recover the root password and leveraging Systemd maintenance mode to fix fstab partition table issues.
Recovering Root Password
Boot into Single-User Mode with rd.break
- Start or reboot the system.
- Access the GRUB menu during boot by pressing a key.

- Highlight the desired kernel entry and press ‘e’ to edit.
- Find the line starting with linux or linux16 and append rd.break at the end.

- Press ‘Ctrl + X’ or ‘F10’ to boot with the modified settings.
Remount File System and Change Root Password
After booting, the system enters emergency mode with root access.
- Remount the root file system as read/write:
# mount -o remount,rw /sysroot
- Chroot to the real root file system
# chroot /sysroot
- Reset the root password using the passwd command:
# passwd
- Configure the system to perform a full SELinux relabeling after booting.
# touch /.autorelabel
- Exit and reboot the system.
Using Systemd Maintenance Mode to Fix Fstab
Boot into Systemd Maintenance Mode
- Start or reboot the system.
- Access the GRUB menu during boot by pressing a key.
- Highlight the desired kernel entry and press ‘e’ to edit.
- Append systemd.unit=emergency.target to the end of the kernel command line.

- Give the root password to login to emergency mode.
Remount File System and Edit Fstab
After booting into rescue mode, the root file system is mounted in read-only mode.
# Remount the root file system as read/write
mount -o remount,rw /
Check the file system.

Edit the fstab file using a text editor like vim
# vim /etc/fstab
Save Changes and Reboot. Now yo can login ti your system normally.

Conclusion
The rd.break and Systemd emergency mode are invaluable tools for Linux system recovery. By understanding how to leverage these techniques, administrators can effectively recover lost root passwords and fix issues with the fstab partition table, ensuring the smooth operation of Linux systems. Remember to exercise caution and make backups before making any changes to critical system configurations. With these skills in your arsenal, you’ll be well-prepared to handle unexpected challenges in Linux system administration.