Errors

Troubleshoot fstab Repair Filesystem Errors

In this article, we’ll troubleshoot fstab repair filesystem errors. Misconfigured /etc/fstab can cause boot time errors and we unable to boot the system. We cannot use the rescue.target to fix an /etc/fstab error.

In order to resolve the issue, we need to use the emergency.target.

Troubleshoot fstab Repair Filesystem Errors

Important: After editing the /etc/fstab file in emergency mode, you must run the following for safety measures:

# systemctl daemon-reload

Here is a walkthrough example of booting into emergency mode to remove a false entry in /etc/fstab.

  1. Interrupt the grub2 menu by pressing "e" to edit when prompted with the grub menu.
  2. Find the line that specifies the kernel version (vmlinuz) and append the following to it: systemd.unit=emergency.target
  3. Press "Ctrl+x" to boot.
  4. You will be prompted with the root password to continue.
  5. Remount / so that we can make changes to the fstab file: # mount -oremount,rw /
  6. We can use the mount command to see which entry is causing the error: # mount -a
  7. Remove the offending entry from the fstab file.
  8. Use mount -a again to make sure the error has been resolved.
  9. Use systemctl daemon-reload to reload all unit files, and recreate the entire dependency tree.

Once you exit the emergency shell, the system will finish booting from the emergency target. Now,  you have gained your server access.

In this article, we have troubleshoot fstab repair filesystem errors.

Get high performance Intel Xeon duel E5 series server and KVM VPS instantly.

Related Articles