How to recover /etc/fstab in Linux
Applies to:
Enterprise Linux – Version: 5
Description:
I have an error in my /etc/fstab
file and when I restart the computer it directly went to the “Repair filesystem”
prompt asking the root password. When I
went to correct the errors in the /etc/fstab file it is giving the following
error:
Unable to open swap
file for "fstab" , recovery impossible.
Changes cannot be
saved.
Solution:
Boot
up from any LiveCD, mount / partition and edit /etc/fstab file.
OR
I restart the computer it
directly went to the “Repair filesystem” prompt asking the root password, enter
root password.
Before
editing fstab mount / on rw mode.
#
mount -w -o remount / # Write allowed
After
that you should be able to fix the fstab, and restart the computer.
Your comments, especially which will help us
improve the functionality, will be greatly appreciatedJ