How to edit /etc/fstab when at Fedora “Repair filesystem” prompt?

I faced this situation yesterday when I was working on Fedora Core 6 distribution and was setting up a DRBD cluster for Mysql replication.

I created a separate partition while installing the operating system and mounted it on ‘/data’. Fedora installation does not let you go without specifying the mount point while creating partitions as OS installation time so i did using ‘/data’. I did this for both the machines for cluster and when I configured DRBD for this partition, mount point has been changed.

Mistake: I forgot to remove this entry from /etc/fstab file which takes care of all the mount points. During the setup we did ‘REBOOT’ and STUCK!

Now system was unable to boot the system because it was reading /etc/fstab file was unable to find the device for it. This can also happen when you have some external hard-drive attached with your linux system and you remove device but forgot to clean its entry from /etc/fstab file.

Linux gives you a “Repair Filesystem” prompt in this situation and you can enter that by providing the root password. The problem is that on “Repair Filesystem” prompt, linux file system and rest of the file systems are generally not mounted and if mounted then it is “Read-Only” so you can not change files.

Solution:

Use following command to mount the filesystem with writable permission:

Repair filesystem # mount -w -o remount /

After this you can go and change /etc/fstab file. Restart your computer and that’s it.

Most Commented Posts

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

Great .. Tan Q

Your most welcome Paul. I am glad that this post become useful for you.

i very scare when i got this mesage, i try to recoved from single use mode but it not happen….
but after this is working fine…
actually i am doing diskoquota and changed /etc/fstab entry
and after modification i got error…
thanks a lot

you rock dude! thanks for the solution.

Thanks Man! Good to see that I solved a problem which is getting used by few of us.

Thanks for your encouraging comment.

your single line of commands solved my problem.
you are a genius.
thanks.

I join the others, on the spot!
Too bad it took me like 3 hours of troubleshoot before I found this page. Still quicker than a reinstallation.
Thanks a lot.

Thanks for taking the time to post this.

This really worked great

Thanks every one for your comments! I am very pleased that some thing penned down by me is getting useful for you all.

Great Help. Saved me several hours. Last night I added an erroneous entry into fstab and I was stuck at the repair prompt.

Thanks a tonne !

aadil

Thanks aadil for you comment. Glad to know that you also saved your time using this post.

Great..it works ! Thanks !

Thanks for your comment. I am glad it got used.

hallelujah & cheers
thnx man

bravo!

Thanks Man!!

thanks broo…….

Excellent tip !!!

Thanks Sreejith for your comment and time.

WOW! U R Da Man!

Great help.

Potentially saved me hours.

Thanks a lot.

Thanks For This artical. Such a nice and easy way to expain the fstab problem.

Thanks for the SIMPLE and straightforward article to solve a real problem. Its now saved me TWICE!!

Thanks you for above article

Repair filesystem # mount -w -o remount /
Repair filesystem # reboot

system restart
after some minute
automatically restart
Fedora 11 problem repaired…

Thanks a lot, excellent help!!!

greetings from Germany

Andreas

Thanks Andreas. Glad to know that it saved your time and was a help to you.

Thanks Yahya for your comment.

Leave a comment

(required)

(required)