I modified the fstab
file and while saving a file, I made the mistake of naming it fstg
. Because of this mistake, my system is not able to boot. It just boots into a maintenance shell. I am unable to change the name of fstg
back to fstab
. I tried doing this with su
but nothing changes.
Any idea of how to correct this?
3 Answers
What you need to do is to mount the root filesystem read-write. The maintenance shell has it mounted read-only.
One way to do this is:
mount / -o remount,rw
Or maybe:
mount -n -o remount,rw /
After that you can rename the file back to its proper name.
Before rebooting you should run sync
. Possibly you should remount / read-only again or the filesystem will need a fsck or journal replay on boot.
The easiest way is to rename it from a liveCD because your system can't mount the root filesystem right now.
-
how do u go about in vm? I am running ubuntu in a virtual box. I shud have taken a snapshot– agent.smithCommented Apr 29, 2011 at 22:27
-
1@agent, you can run a live cd in a VM. Just download it and mount it in the virtual cd rom drive. Commented Apr 29, 2011 at 23:57
Are you sure that the file was named fstag? Or do you mean /etc/fstab? Also, it would help if you could state the distribution you are using.
Either way, try to use the distribution LiveCD or SystemRescueCd which is a Linux system rescue disk that enables you to perform administration tasks.
I hope this helps.
-
it is ubuntu maverik in sun vbox. It is /etc/fstab.– agent.smithCommented Apr 29, 2011 at 22:25
fstag
? Are you sure you didn't meanfstab
?su
when you are already in a root ("maintenance") shell. Also, the drive might be mounted read-only.